Skip to content

Feature request: add lane label to query related metrics #17767

Open
@applike-ss

Description

@applike-ss

Description

I would like to see the lane label on the prometheus metrics for queries.
This will allow me to visualize the effectiveness and alert based on the usage of lanes.
Specifically when this issue gets tackled/integrated, it will become even more interesting: #6993

Motivation

Right now we can't visualize our query lane usage and can only adjust configuration based on guesses or metrics that we would let our developers have our apps emit.
In the future we don't want to have to write these metrics on our own, when druid is the more sensible way to write these metrics.

EDIT: It seems that this should already be the case as per the docs here: https://druid.apache.org/docs/latest/operations/metrics/
However, even though i fired a manual query against a datasource with laning set up and got a result row, I couldn't see a druid_query_priority metric coming from either broker or router.
What i do see however is a druid_sqlquery_time metric, so my metric collection seems to work fine.

Demo Query used:

curl -X POST http://localhost:56713/druid/v2/sql \ 
     -H "Content-Type: application/json" \
     -d '{
           "query": "SELECT * FROM wikipedia WHERE __time >= TIMESTAMP '\''2024-02-01 00:00:00'\'' LIMIT 1",
           "context": {
             "lane": "lane1"
           }
         }'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions