Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document how to enable ingest old data (#87)
* Fix/improvement for issue #81 #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... * Fix for Watttime - was missing the is_estimated label... 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"} * Cleaned up some commented code * It turns out that all the other providers return estimated values Thus, we are setting IsEstimated to true. See for more info #83 (comment) * Some renaming as suggested by Chris * Update pkg/provider/electricity_maps.go Co-authored-by: Ross Fairbanks <ross@rossfairbanks.com> * Document how to fix "old" samples not being ingested in Prometheus. Related to PR #83 "For the Prometheus exporter, the values based on ElecticityMaps provider are estimations and not the real values" * Corrections suggested by Ross Co-authored-by: Ross Fairbanks <ross@rossfairbanks.com> --------- Co-authored-by: Flavia Paganelli <flavia@30mhz.com> Co-authored-by: Ross Fairbanks <ross@rossfairbanks.com>
- Loading branch information