client_golang
client_golang copied to clipboard
Check metric uniqueness against timestamp
It is possible to pass multiple value-timestamp pairs of the same metric name and same labels to Prometheus. If its not something horrible to do, then maybe we could add some kind of check for that. Possible fix for (#1137)
It is possible to pass multiple value-timestamp pairs of the same metric name and same labels to Prometheus.
While that's true, it's not a behavior covered by the specification of the exposition format. (Arguably, Prometheus is following the robustness principle here. Prometheus could stop this behavior at any time and would still be compliant. Instrumentation libraries must not depend on this behavior to exist. (Or to continue following the robustness principle narrative: The instrumentation libraries should stick to the spec as closely as possible, even though (or actually: precisely because) Prometheus is tolerant in what it accepts.)
@bwplotka and @kakkoyun are you able to take a look?
Hey, I looked, and this is not desired functionality, I am afraid. ):
Explained in https://github.com/prometheus/client_golang/issues/1137
Hope that makes sense. I will close this PR to avoid confusion but feel free discuss - maybe I missed something. We can always reopen. Thanks!
Discussion moved forwared in the issue, I think we could change it as in PR. Can we at least add unit test that proves multiple samples of same metric are possible?
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.