You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Service discovery is the responsibility of Prometheus #178
Bottom-line, this simplified the code necessary to emit metrics. If it was removed, it would mean more complexity and repetition in our own code, and no (easy) ability to label default metrics in a way we would expect.
Due to timelines/prioritization this was a feature we found useful - especially when not having access to modify prometheus config.
Would a note about the recommended approach be sufficient here without a full removal?
I would like to point out that there is a legitimate use case for using prom-client's default labels feature:
When using node cluster node, it can be used to apply a "worker" label with the worker id. This cannot be done outside of prom-client using regular prometheus relabeling.
All of the official prometheus client libraries are for languages that are multi-threaded (rather than multi-process), so they don't need this feature.
Is there support for the multi-target pattern in this library? It doesn't seem like there's any way to pass parameters into exporters with this client, and that can be a blocker for certain setups
We had to roll our own for OTEL to handle PM2 instance-IDs to avoid count clobbering. I agree that process per core languages struggle with disambiguation. #687 speeds this code up quite a bit. I’m happy to double down on this feature.
All of the official prometheus client libraries are for languages that are multi-threaded (rather than multi-process), so they don't need this feature.
Exactly. Prometheus and OTEL are both actively hostile to NodeJS, Bun. Ruby, Python and they didn’t need to be. But here we are doing our best.
I'd also like to know how the committee imagines you distinguish telemetry data between two different versions of your product if you don't include those versions in all of your telemetry. I think the committee might be engaging in 'design by committee' behavior here.
I personally don't much like carrying open bugs that I wontfix and prefer to close them. I think maybe this one counts as such if you want to tidy up a bit @zbjornson@SimenB
Activity
SimenB commentedon Mar 26, 2018
It came from #83 (feature request) and #137 (PR), cc @goofballLogic @nwest1 thoughts?
nwest1 commentedon Mar 26, 2018
Thanks for the mention -
Bottom-line, this simplified the code necessary to emit metrics. If it was removed, it would mean more complexity and repetition in our own code, and no (easy) ability to label default metrics in a way we would expect.
Due to timelines/prioritization this was a feature we found useful - especially when not having access to modify prometheus config.
Would a note about the recommended approach be sufficient here without a full removal?
brian-brazil commentedon Mar 26, 2018
This is such a common misunderstanding of the Prometheus architecture that it should be removed. You should switch to relabelling for this.
benny-medflyt commentedon Jan 14, 2019
I would like to point out that there is a legitimate use case for using
prom-client's default labels feature:When using node cluster node, it can be used to apply a "worker" label with the worker id. This cannot be done outside of
prom-clientusing regular prometheus relabeling.All of the official prometheus client libraries are for languages that are multi-threaded (rather than multi-process), so they don't need this feature.
brian-brazil commentedon Jan 14, 2019
The Python client's multi-process mode handles this internally. Instrumentation shouldn't have to care how exposition is done.
benny-medflyt commentedon Jan 14, 2019
I would be happy if
prom-clientwould also handle this internally and automatically 👍forresthopkinsa commentedon Sep 1, 2021
Is there support for the multi-target pattern in this library? It doesn't seem like there's any way to pass parameters into exporters with this client, and that can be a blocker for certain setups
jdmarshall commentedon Jul 13, 2025
We had to roll our own for OTEL to handle PM2 instance-IDs to avoid count clobbering. I agree that process per core languages struggle with disambiguation. #687 speeds this code up quite a bit. I’m happy to double down on this feature.
Exactly. Prometheus and OTEL are both actively hostile to NodeJS, Bun. Ruby, Python and they didn’t need to be. But here we are doing our best.
I'd also like to know how the committee imagines you distinguish telemetry data between two different versions of your product if you don't include those versions in all of your telemetry. I think the committee might be engaging in 'design by committee' behavior here.
jdmarshall commentedon Jul 16, 2025
Achtually... The current page on Prometheus naming and labeling does not mention any of the concerns listed in this bug report.
https://prometheus.io/docs/practices/naming/
I personally don't much like carrying open bugs that I wontfix and prefer to close them. I think maybe this one counts as such if you want to tidy up a bit @zbjornson @SimenB
jdmarshall commentedon Aug 20, 2026
So to reiterate, don't label your data with threadId or you're going to have a bad time when the accountants see the bill.