Stabilize OTLP->Prometheus: Gauges and Sums#5034
Stabilize OTLP->Prometheus: Gauges and Sums#5034ArthurSens wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
| - If the aggregation temporality is delta and the sum is monotonic, it SHOULD be converted to a cumulative temporality and become a Prometheus Counter. The following behaviors are expected: | ||
| - The new data point type must be the same as the accumulated data point type. | ||
| - The new data point's start time must match the time of the accumulated data point. If not, see [detecting alignment issues](../metrics/data-model.md#sums-detecting-alignment-issues). | ||
| - Otherwise, it MUST be dropped. |
There was a problem hiding this comment.
@open-telemetry/prometheus-interoperability, I'm a bit unsure about this one.
In the collector, there's a component that transforms deltas into cumulative, and as far as I know, using this is the recommended way for folks trying to consume Delta and expose Prometheus.
I'm a bit inclined to adjust the wording to say that Deltas MUST be dropped, and recommend that this transformation should happen outside of the Prometheus domain
There was a problem hiding this comment.
Agree. Lets drop this language
There was a problem hiding this comment.
Turns out we do support delta -> Cumulative in the prometheusexporter: open-telemetry/opentelemetry-collector-contrib#47721. We should discuss whether we want to remove that support.
There was a problem hiding this comment.
What are the downsides of using deltatocumulativeprocessor instead? If there isn't any, or if they are very minimal, I'd prefer that we drop this 😬
There was a problem hiding this comment.
Probably mostly memory usage. Both deltatocumulativeprocessor and prometheusexporter have an internal state of all metrics that they accumulate. It would be twice as expensive.
WDYT about just changing this to MAY convert delta to cumulative instead of SHOULD?
There was a problem hiding this comment.
I'm not sure I'm following. If folks use deltatocumulative, then deltatocumulative will retain state, and everything will be cumulative when it reaches the Prometheus exporter. We're just moving the same operation from one place to another.
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Fixes #4919
Fixes #4920
Changes
Stabilizes the converstion of OTLP Gauges and Sums to their Prometheus counterparts.
For non-trivial changes, follow the change proposal process.
CHANGELOG.mdfile updated for non-trivial changes[chore]in the PR title to skip the changelog check