Skip to content

minor: Emit taskType on task count metrics from the statsd and prometheus emitters - #20123

Open
amaechler wants to merge 1 commit into
apache:masterfrom
amaechler:task-count-metrics-tasktype
Open

minor: Emit taskType on task count metrics from the statsd and prometheus emitters#20123
amaechler wants to merge 1 commit into
apache:masterfrom
amaechler:task-count-metrics-tasktype

Conversation

@amaechler

Copy link
Copy Markdown
Contributor

Description

This PR adds taskType to the various task count metrics, so they can easily be filtered by type.

I came across this when trying to filter task/error/count by type. docs/operations/metrics.md already documents taskType on all five task/*/count metrics.


This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

…itters

The overlord's TaskQueue has tagged every task count RowKey with taskType
since apache#18032, and docs/operations/metrics.md documents taskType on all five
task/*/count metrics. Both emitters filter user dimensions through a
per-metric allow-list, and neither list included taskType, so the dimension
was dropped on the way out. task/run/time is already allow-listed on
["dataSource", "taskType"] in both files.

Without it a task failure ratio cannot distinguish compaction retry churn
from real streaming ingestion failures: one failing MSQ auto-compaction job
emits one controller plus one row per worker, which is enough to pin a
failure-ratio alert with no way to filter it out.

supervisorId is documented on these metrics too but is left out here. It is
set only for SeekableStreamIndexTask, and TaskCountStatsMonitor.emit reuses
a single ServiceMetricEvent.Builder across map entries, so a conditional
dimension leaks from one event into later ones. That needs fixing first.
@amaechler amaechler changed the title Emit taskType on task count metrics from the statsd and prometheus emitters minor: Emit taskType on task count metrics from the statsd and prometheus emitters Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant