fix(openfeature): use delta temporality for OTLP metrics export#11426
Conversation
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
This comment has been minimized.
This comment has been minimized.
4f318d6 to
4880dbe
Compare
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
This PR is rejected because it was updated |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
This PR is rejected because it was updated |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master resultsStartup Time
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
Changes the OTLP metrics exporter from
alwaysCumulative()todeltaPreferred()for feature flag evaluation metrics.Motivation
OTLP receivers (like the Datadog Agent) expect delta temporality for counter metrics. With cumulative temporality, each export sends the total count since start (5, 10, 15...), and receivers that sum these values produce overcounted results (5, 15, 30...).
With delta temporality, each export sends only the increment since the last export (5, 5, 5...), which receivers correctly sum to the actual total.
Testing in https://github.com/DataDog/ffe-dogfooding I saw Java was overcounting with OTLP, compared to the other SDKs.
This aligns with Datadog's OTLP documentation which recommends delta temporality for metrics.
Additional Notes
deltaPreferred()uses DELTA for Counter/Histogram and CUMULATIVE for UpDownCounter (per OTel spec)FlagEvalMetricsis the only direct OTLP exporter in dd-trace-java; other OTel metrics go through the DogStatsD shimContributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issue