Add collect_histograms_as_distributions option to OpenMetrics V2 #25378
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 312 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.344
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #25378"
general
weight: 0.35
steveny91
What does this PR do?
Adds an opt-in OpenMetrics V2 option,
collect_histograms_as_distributions. It sends histogram buckets as distributions without theupper_boundandlower_boundtags, so each series becomes one distribution instead of one per bucket. The numeric bounds are still sent with each bucket. The option stands alone: it implieshistogram_buckets_as_distributions, so new users only need to set this one.AgentCheck.submit_histogram_bucket(..., multiple_buckets=True), which calls a new aggregator builtin,submit_histogram_bucket_multi. That builtin is added in DataDog/datadog-agent#57029 and routes to the Agent's per-bounds bucket path.submit_histogram_bucket_multi, or the check runs underprocess_isolation, the check fails at configuration time with aConfigurationError, instead of sending broken data._bucketblocks in the histogram transformer are merged into one helper.AggregatorStuband the discovery probe proxy support the new builtin.assert_histogram_bucketgains amultiple_bucketsfilter.Motivation
AI-7188. The
upper_boundandlower_boundtags create one context per bucket, which drives a large share of the cardinality of histogram distributions. The Agent needs the tags today because it tracks bucket deltas per context, and the tags are what keep each bucket's context unique. The new datadog-agent path tracks state per context and bounds, so the tags can be dropped.The option is opt-in because existing dashboards, monitors and queries may group or filter by these tags, and they stop matching once the tags are removed.
Follow-ups:
submit_histogram_bucket_multibuiltin.Review checklist (to be filled by reviewers)
qa/requiredif this PR needs QA validation, orqa/skip-qaif it does not. Exactly one of the two is required.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged