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

[Feature] Record metrics according to TimeOfMeasurement instead of Scrape Time #19

Open
philosowaffle opened this issue Nov 29, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@philosowaffle
Copy link
Owner

Regarding timestamps we have:

  1. The DateUtc provided by AmbientWeather, which should be the time the data was recorded at
  2. The time the metric was scraped from ambientweather-local-server

Inherently, an Agent scraping prometheus metrics will store the time series data according to the scrape time. It assumes its getting a "live" reading of the current state of the metrics. This is how AWLS works today.

Depending on how much drift or delay there is between when AmbientWeather collected the metric and when it was scraped from the AWLS the metric data could be associated with a grossly incorrect timestamp.

Ideally, we would want our metrics associated with the time of measurement, not the scrape time. However, while prometheus does support writing a custom timestamp with a given metric, the library I'm using right now does not.

Need to investigate alternatives.

https://www.reddit.com/r/PrometheusMonitoring/comments/9h9olw/is_there_way_to_deliver_dataset_with_timestamps/
https://prometheus.io/docs/instrumenting/exposition_formats/

@philosowaffle philosowaffle added the enhancement New feature or request label Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant