Fix datadog_metrics handling of Prometheus +Inf histogram buckets - #26135
Fix datadog_metrics handling of Prometheus +Inf histogram buckets#26135anvithsg2004 wants to merge 2 commits into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa0cd0170c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
aa0cd01 to
4c1df75
Compare
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c1df75ddb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
4c1df75 to
48d9b4f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48d9b4fb86
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
48d9b4f to
cc619bb
Compare
What does this PR do?
This fixes an issue where Prometheus histogram observations that fall into the implicit
+Infbucket can be lost by thedatadog_metricssink and result in an empty Datadog sketch payload.The Prometheus parser previously removed the
+Infbucket after converting cumulative bucket counts to per-bucket counts. This caused valid observations above the highest finite bucket to be discarded.This PR:
+Infbucket and its observations in the Prometheus parser.+Infbucket during DDSketch interpolation.Sketchmetrics as well.Why?
For example, a histogram such as:
represents four valid observations above
1.0.Previously, the
+Infbucket was removed, leaving no bucket observations to insert into the DDSketch. This could produce an empty sketch, which was subsequently encoded as an emptySketchPayloadand rejected by Datadog with HTTP400 Bad Request.The
+Infbucket is now preserved, allowing the observations to be represented in the DDSketch.Tests
Added and updated tests covering:
+Infbuckets.+Infbuckets.+Infbucket.+Infobservations.