-
Notifications
You must be signed in to change notification settings - Fork 379
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
Only custom collectors should be able to expose timestamps #177
Comments
It looks like this client does not support custom collectors as it doesn't support collectors (it's all metric based), so as it stands there's no need for any timestamp-related functionality. |
Oh, I didn't know that! What's the role of collectors? Is it something we should support? |
This is a bug report, this issue is actively causing problems.
They're mainly needed for writing exporters, though they can also come up in applications sometimes. It's up to you if you want to support them. |
What issues is it causing? It's possible to strip the timestamp from the textual representation (see https://github.com/siimon/prom-client#register) Not to say I'm against removing them, but "actively causing problems" should at least be possible to work around until we remove it. |
It's causing duplicate timestamp errors at the least. It's also going to be causing quite a few problems when trying to use affected metrics via PromQL due to staleness handling. |
https://github.com/siimon/prom-client#timestamps indicates that direct instrumentation can specify timestamps, and other code indicates that a /metrics will always have timestamps.
This makes no sense semantically, and breaks ingestion, timestamps, and staleness on the Prometheus end. All ability to set timestamps with direct instrumentation should be removed, and there should be no timestamps on /metrics in normal circumstances.
The text was updated successfully, but these errors were encountered: