This repository was archived by the owner on Sep 15, 2025. It is now read-only.
[OTEL-2697][pkg/otlp/metrics] Add WithInferDeltaInterval option#765
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #765 +/- ##
==========================================
+ Coverage 81.20% 81.33% +0.12%
==========================================
Files 53 53
Lines 4215 4244 +29
==========================================
+ Hits 3423 3452 +29
Misses 688 688
Partials 104 104 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jade-guiton-dd
suggested changes
Aug 19, 2025
jade-guiton-dd
approved these changes
Aug 19, 2025
Member
Author
The breaking changes check was also broken for Jasmine's PR so I think this is just a bug in this check |
This was referenced Aug 19, 2025
Closed
mx-psi
added a commit
to open-telemetry/opentelemetry-collector-contrib
that referenced
this pull request
Sep 8, 2025
…aMetrics' feature gate (#42494) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Adds a new `exporter.datadogexporter.InferIntervalForDeltaMetrics` feature gate. This feature gate will set the interval field for OTLP delta metrics when it can be inferred (i.e. when the difference between Timestamp and StartTimestamp is close enough to a whole number of seconds). Relates to [DataDog/opentelemetry-mapping-go/pull/765](DataDog/opentelemetry-mapping-go#765)
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What does this PR do?
Adds option to infer interval field. This only works for delta sums that have a
startTimestampset. We set the interval if and only if it is 'close' (within the tolerance, fixed to 0.1 seconds) to a whole number of seconds (since the Datadog API only supports a whole number of seconds as an interval). The tolerance accounts for jitter. The solution should be robust against network errors.Motivation
While ultimately we can only set the interval for users in a subset of cases, we can do so in this case reasonably well