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

Why the Prometheus exporter uses start_ts as timestamp and not end_ts #1862

Closed
ondra-novak opened this issue Dec 14, 2022 · 2 comments
Closed
Assignees
Labels
area:metrics OpenTelemetry metrics do-not-stale

Comments

@ondra-novak
Copy link

auto time = metric_data.start_ts.time_since_epoch();

Why the Prometheus exporter uses start_ts as timestamp and not end_ts?

As I understand, start_ts defines point when measuring started, and end_ts when ends. According to example in specification, start_ts should be always same, because Prometheus use cumulative temporality and thus starting time should equal to start of the program.

Am I wrong?

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/img/model-cumulative-sum.png

Associated error message (Prometheus log]

level=warn ts=2022-12-14T15:10:11.093Z caller=scrape.go:1167 component="scrape manager" scrape_pool=example target=http://localhost:9464/metrics msg="Error on ingesting samples with different value but same timestamp" num_dropped=15
@lalitb lalitb added the area:metrics OpenTelemetry metrics label Dec 14, 2022
@github-actions
Copy link

This issue was marked as stale due to lack of activity.

@github-actions github-actions bot added the Stale label Feb 13, 2023
@lalitb lalitb added do-not-stale and removed Stale labels Feb 13, 2023
@marcalff marcalff assigned marcalff and unassigned esigo Jun 20, 2023
@marcalff
Copy link
Member

Closing as a duplicate of:

for which there is a PR already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics OpenTelemetry metrics do-not-stale
Projects
None yet
Development

No branches or pull requests

4 participants