-
Notifications
You must be signed in to change notification settings - Fork 18
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
Metric Sample TimeStamp is zero #7
Comments
https://prometheus.io/docs/instrumenting/exposition_formats/ The timestamp is an int64 (milliseconds since epoch, i.e. 1970-01-01 00:00:00 UTC, excluding leap seconds), represented as required by Go's ParseInt() function. |
I've doing some research today about this topic. If I remember (myself) well, I've added the timestamp field initially as a placeholder, since it was used to export metrics in text format. I have not taken care of its value since then. :) Exploring some code of other client libraries, it seems this field has something to do with exemplars, but I have not implemented these ones yet. I think it might be more useful to temporarily remove the field to avoid ambiguity and doubts, and add it again when there will be features that make use of it, assigning and managing it appropriately. I will close the issue with a targeted commit. Thanks again for your feedback and support to the project! 💘 Marco. |
@marcobreveglieri my colleague has done some work to populate the timestamp field. It is used by Prometheus to build the time series collection where the data has been scrapped from other systems. |
Hi @fastbike, Have you (or your colleague) tested what you said in a real scenario? I would like to give this timestamp field the right purpose it deserves. 😄 Regards, |
The TSample record declares a field TimeStamp which is annotated "The timestamp of this sample."
However the collectors never populate this, setting it to zero.
Also, the value is not output when the Collect method is rendered if the value is non zero.
What is the purpose and how should this been used ?
The text was updated successfully, but these errors were encountered: