-
Notifications
You must be signed in to change notification settings - Fork 1k
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
PrometheusMeterRegistry not exporting all data #4091
Comments
Hi, Having different set of tag keys for the same metric name is not recommended by the Prometheus server and as far as I remember, the Prometheus Java client also has issues, so this:
should look like this instead:
So instead of this: if (isNotNullOrEmpty(job.getDynamicQueue())) {
timerBuilder.tag("job.dynamic-queue", job.getDynamicQueue());
} You should do something like this: if (isNotNullOrEmpty(job.getDynamicQueue())) {
timerBuilder.tag("job.dynamic-queue", job.getDynamicQueue());
}
else {
timerBuilder.tag("job.dynamic-queue", "none");
} WIth this let me close the issue, please let us know if this does not work and/or I misunderstood something and we can reopen. |
Hi @jonatan-ivanov ! Thanks for the feedback, that's what I've done at the end. Would it be possible to add a warning message if a different set of tag keys for the same metric name is being used? Or add it in the documentation when registering a counter/meter in the registry? |
We send out a notification about it: Lines 590 to 596 in 8d18d8c
You need to add a "meter registration failed" listener to subscribe to these events: micrometer/micrometer-core/src/main/java/io/micrometer/core/instrument/MeterRegistry.java Lines 803 to 806 in 8d18d8c
|
Describe the bug
Hi there! I'm Ronald, the author of JobRunr.
For JobRunr Pro, we've added support for MicroMeter. We noticed that when using the
PrometheusMeterRegistry
, only the first timer is exported.Is this related to #877?
Environment
To Reproduce
How to reproduce the bug:
The important part to note is that the
job.getJobSignature()
is different for each job.In Spring Boot, I see the correct info using the
/actuator/metrics
endpoint yet the/actuator/prometheus/
endpoint is only showing the first recordedjobSignature
. This contradicts the documentation which says:Expected behavior
Prometheus also showing all the different timers (so also with other tags)
Additional context
Perhaps related to #877?
This is quite an important issue in my point of view as it makes the
PrometheusMeterRegistry
not usable.The text was updated successfully, but these errors were encountered: