fix: use delta base aggregation to fit current export behaviour#42
Closed
JeremyAube wants to merge 2 commits into
Closed
fix: use delta base aggregation to fit current export behaviour#42JeremyAube wants to merge 2 commits into
JeremyAube wants to merge 2 commits into
Conversation
The current metric store implementation clear all the metrics after sending it to the OTLP endpoint at lib/otel_metric_exporter/metric_store.ex:226. This implementation fits the Delta Temporal Aggregation method of sending metrics where we send the delta between the last export as compared to the currently configured Cumulative Temporal Aggregation where we would instead send the accumulation of all metrics since the start of the application on every export. More information can be found in the OTEL docs here: https://opentelemetry.io/docs/specs/otel/metrics/data-model/#temporality This doesn't cause an issue with Prometheus since it uses `start_time_unix_nano` from the exported metric to trigger reset detection. Since we update this start time on every new export, this essentially means that reset detection is triggered for every new "cummulative" metric export. Prometheus seems to handle gracefully even though it can lead to some innacuracies from what I heard. On the other hand, providers like New Relic doesn't seem to handle this as gracefully and makes the metric unusable for reasons unknown to me at this moment. The change the Delta Temporal Aggregation does fix the issue for New Relic, on top of reducing unnecessary work for Premetheus.
Author
|
Actually, I just noticed that it does seem to cause an issue with Prometheus. I will investigate this further. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current metric store implementation clear all the metrics after sending it to the OTLP endpoint at
lib/otel_metric_exporter/metric_store.ex:226.
This implementation fits the Delta Temporal Aggregation method of sending metrics where we send the delta between the last export as compared to the currently configured Cumulative Temporal Aggregation where we would instead send the accumulation of all metrics since the start of the application on every export. More information can be found in the OTEL docs here:
https://opentelemetry.io/docs/specs/otel/metrics/data-model/#temporality
This doesn't cause an issue with Prometheus since it uses
start_time_unix_nanofrom the exported metric to trigger reset detection. Since we update this start time on every new export, this essentially means that reset detection is triggered for every new "cummulative" metric export. Prometheus seems to handle gracefully even though it can lead to some innacuracies from what I heard. On the other hand, providers like New Relic doesn't seem to handle this as gracefully and makes the metric unusable for reasons unknown to me at this moment.The change the Delta Temporal Aggregation does fix the issue for New Relic, on top of reducing unnecessary work for Premetheus.