-
Notifications
You must be signed in to change notification settings - Fork 82
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
Allow to optionally specify timestamps #126
Comments
Very much in favor of this. What do you think of adding this to the new As an aside, as a developer of an exporter, I would greatly appreciate input on the new |
@mxinden adding it to Will have a look at a custom collector trait but very likely only in a couple of days. From a short glimpse it could potentially change how I am driving metrics generation in my exporter. |
Why is |
Good point, should indeed be enough |
One important note here: Prometheus requires millisecond timestamps while the OpenMetrics spec uses seconds. Since this is a Prometheus client not an OpenMetrics client it seems to be sensible to go with milliseconds but I wanted to bring it up. |
My understanding is that the old Prometheus format expects @lstrojny can you confirm that this is / is not the case? |
It would be terrific to be able to pass an optional chrono instance as a timestamp to specify the recency of the particular metric. My usecase is a prometheus exporter where the metrics are cached and it would therefore be correct to specify the time of the original retrieval of the metric instead of leaving out the timestamp which implicitly states "now".
The text was updated successfully, but these errors were encountered: