-
Notifications
You must be signed in to change notification settings - Fork 378
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
Timestamps should be in seconds, eg in setToCurrentTime methods #167
Comments
Very good point. Mind sending a PR for it? It's a breaking change, but that's fine. It will match the java client: https://github.com/prometheus/client_java/blob/1a8bf7da57402f444861c32abc9e0c7cd313748e/simpleclient/src/main/java/io/prometheus/client/Gauge.java#L178-L180 |
Oh that one slipped under the radar! If you create a PR don't forget the change log :) |
This can be done without breakage by adding a default-true flag I will probably PR this soon. |
I'm leaning towards making the breaking change right away instead of starting to add legacy properties, what do you think @SimenB ? |
+1 for just breaking. What we do now is wrong, I see no reason to keep supporting it |
Happy to do either! :-) |
I think this is the only instance where this is incorrect. Breaking change Fixes siimon#167
* Use base units (seconds) for current time in gauge I think this is the only instance where this is incorrect. Breaking change Fixes #167 * Update changelog
The implementation of setToCurrentTime for gauges uses the value of
Date.now()
which is in milliseconds. The suggested conventions for client libraries is to use base units for all recorded metrics.The text was updated successfully, but these errors were encountered: