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

Document how to enable ingest old data #87

Merged

Conversation

locomundo
Copy link
Contributor

This PR just adds some documentation about how to allow your Prometheus to ingest "old" data. It's a follow up of this PR 83 and intended to avoid people having this issue.

Basically we want to avoid Prometheus failing to ingest "old" data from ElectricityMaps. In those cases you will see this error:

Error on ingesting samples that are too old or are too far into the future

Flavia Paganelli and others added 11 commits June 3, 2024 17:24
thegreenwebfoundation#81

- Now sending always the timestamp in the Prometheus metrics.
- For ElectricityMaps, we now use the historic endpoint instead of the carbon-intensity one, so we can get both the latest estimated and real values.
- Tested that it works with Ember and CarbonIntensityOrgUK, Watttime not yet (I need to register)
- The label is_estimated has been added in the Prometheus metrics. For ElectricityMaps it can provide values for both, or for one of the two, depending on the location.
- For the other providers it always returns the value as is_estimated=false (the default) because I didn't make any changes. I'm. not 100% sure this is correct for all of them, or if some of the providers also return estimations (to investigate).
- The error handling when parsing generates a lot of clutter, not sure if there's a better way to do it in go...
for relative carbon intensity

Otherwise we see this error, for example:

panic: inconsistent label cardinality: expected 5 label values but got 6 in []string{"CAISO_NORTH", "", "WattTime", "", "percent", "false"}
in Prometheus.

Related to PR thegreenwebfoundation#83 "For the Prometheus exporter, the values based on ElecticityMaps provider are estimations and not the real values"
@locomundo
Copy link
Contributor Author

@rossf7 This is what we discussed a while ago - it took me a bit of time to actually make the PR, with the holidays in the middle...

README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@rossf7 rossf7 left a comment

Choose a reason for hiding this comment

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

LGTM

@locomundo thank you for following up on this!

Co-authored-by: Ross Fairbanks <[email protected]>
@rossf7 rossf7 merged commit e9456c2 into thegreenwebfoundation:main Aug 29, 2024
3 checks passed
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.

2 participants