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

Only custom collectors should be able to expose timestamps #177

Closed
brian-brazil opened this issue Mar 26, 2018 · 6 comments
Closed

Only custom collectors should be able to expose timestamps #177

brian-brazil opened this issue Mar 26, 2018 · 6 comments

Comments

@brian-brazil
Copy link

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.

@brian-brazil
Copy link
Author

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.

@SimenB
Copy link
Collaborator

SimenB commented Mar 26, 2018

Oh, I didn't know that!

What's the role of collectors? Is it something we should support?

@brian-brazil
Copy link
Author

This is a bug report, this issue is actively causing problems.

What's the role of collectors? Is it something we should support?

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.

@SimenB
Copy link
Collaborator

SimenB commented Mar 26, 2018

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.

@brian-brazil
Copy link
Author

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.

@SimenB
Copy link
Collaborator

SimenB commented Feb 22, 2020

#333

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

3 participants