Skip to content

feat: emit lane and priority in query metrics - #19747

Draft
jtuglu1 wants to merge 2 commits into
apache:masterfrom
jtuglu1:emit-lane-and-priority-in-query-time-metric
Draft

feat: emit lane and priority in query metrics#19747
jtuglu1 wants to merge 2 commits into
apache:masterfrom
jtuglu1:emit-lane-and-priority-in-query-time-metric

Conversation

@jtuglu1

@jtuglu1 jtuglu1 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Description

Currently, identifying a query's assigned lane/priority via metrics is very difficult without logs. This adds lane and priority dimensions to all relevant query metrics (lane is added conditionally, priority is added always). This helps to quickly map a given query ID to a lane/priority, while also allowing metric queries to identify relationship between query latency, shape, etc. and lane/priority for better tuning.

Release note

Emit lane and priority dimensions in query timing 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.

@jtuglu1
jtuglu1 force-pushed the emit-lane-and-priority-in-query-time-metric branch from afdf59e to 3093c1e Compare July 25, 2026 04:38
Currently, identifying a query's assigned lane/priority via metrics is impossible. This adds "lane" and "priority" dimensions to all relevant query metrics, helping to better understand relationship between lane and latency and tune these laning/priority configs.
@jtuglu1
jtuglu1 force-pushed the emit-lane-and-priority-in-query-time-metric branch from 3093c1e to 128983f Compare July 25, 2026 04:40
Prometheus sorts metric dimensions alphabetically, so adding lane and
priority to query/time shifts the index of type in the dimension array.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

2 participants