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

Add support for parsing timestamps. #483

Merged
merged 2 commits into from Oct 29, 2019

Conversation

asherf
Copy link
Contributor

@asherf asherf commented Oct 26, 2019

Closes: #461

Signed-off-by: Asher Foa <asher@asherfoa.com>
b = CounterMetricFamily("b", "help", value=2)
a.add_metric(["bar"], 1, timestamp=0)
b = CounterMetricFamily("b", "help")
b.add_metric([], 2, timestamp=1234567890)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't right, Prometheus timestamp are in milliseconds whereas the Python client is using the OpenMetrics data model so is working in seconds.

…reas the Python client is using the OpenMetrics data model so is working in seconds.

Signed-off-by: Asher Foa <asher@asherfoa.com>
@brian-brazil brian-brazil merged commit f11b6d9 into prometheus:master Oct 29, 2019
@brian-brazil
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Difference in parser behaviour compared to prometheus/common/expfmt
2 participants