Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus extension adding underscores to datasource names in some metrics #17648

Open
sixtus opened this issue Jan 21, 2025 · 2 comments
Open

Comments

@sixtus
Copy link
Contributor

sixtus commented Jan 21, 2025

The prometheus extension is reporting the dataSource wrapped in underscores in some metrics, while as in in others it's reported as is.

Affected Version

I noticed this in Druid 31, it must have been introduced as a regression earlier, as this used to work.

Description

I am using prometheus extension to source the following grafana alert:

max_over_time(druid_ingest_kafka_lag{dataSource!~".*test.*"}[3m]) / on (dataSource) sum(rate(druid_ingest_events_processed_total{dataSource!~".*test.*"}[3m])) by (dataSource) > 60*15

In words: Alert if the ingestion lag is more than 15min based on the reported consumption speed. Like I said, this used to work just fine.

However:

druid_ingest_events_processed_total now reports dataSource with underscores, i.e. "_foo_" instead of "foo", while druid_ingest_kafka_lag still reports the dataSource as "foo". Thus they don't match anymore and my alert when silent.

Expected behavior

All prometheus metrics should report the dataSource as is and not wrap them in underscores. And if that's a feature, at least be consistent.

@sixtus
Copy link
Contributor Author

sixtus commented Jan 22, 2025

I was able to circle it in a bit.

It seems to affect all (but only) metrics starting with "ingest" and tracing a bit through the git changes, I came to

https://github.com/apache/druid/blob/master/indexing-service/src/main/java/org/apache/druid/indexing/common/TaskRealtimeMetricsMonitorBuilder.java#L45

being added 7 months ago, just in time to qualify as the source of my issue.

@clintropolis any thoughts?

@ashwintumma23
Copy link
Contributor

@sixtus,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants