Wire OTLP Trace Metrics Writers into Metrics Aggregators#11680
Conversation
This comment has been minimized.
This comment has been minimized.
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9be5584c2a
ℹ️ 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".
| return maps | ||
| } | ||
|
|
||
| def "Datadog-Client-Computed-Stats header set when either stats pipeline is enabled (otlpSpanMetrics=#otlpSpanMetrics, nativeMetrics=#nativeMetrics)"() { |
There was a problem hiding this comment.
Move the new stats-header coverage to JUnit 5
The root AGENTS.md says, "Always use JUnit 5" and "Do not write new Groovy / Spock tests"; this adds a new Spock feature method to DDAgentApiTest.groovy. Please move this coverage to a JUnit 5 test (or migrate the existing file) instead of adding new Groovy/Spock test code.
Useful? React with 👍 / 👎.
| return new ConflatingMetricsAggregator( | ||
| config, sharedCommunicationObjects, healthMetrics, new OtlpStatsMetricWriter(config)); |
There was a problem hiding this comment.
Avoid enabling OTLP stats without a sender
For traces.span.metrics.enabled=true with otlp.metrics.protocol=http/json, OtlpStatsMetricWriter.createSender returns null and finishBucket() drops the payload, but this factory still selects the OTLP stats aggregator. On the DD-agent writer path, the same config also marks Datadog-Client-Computed-Stats true and activates p0 dropping, so no SDK stats are delivered and the agent is told not to compute them either; gate this selection on a supported OTLP metrics transport or fall back instead.
Useful? React with 👍 / 👎.
eefcc42 to
a00f34b
Compare
9be5584 to
3d2a088
Compare
What Does This Do
This PR wires the OTLP Trace Metrics logic and writers into the existing Metrics Aggregators used for Client Side Stats.
This involves:
ConflatingMetricsAggregatorwhich uses theOtlpStatsMetricWriterintroduced in Define OTLP Trace Metrics Histogram and Writers #11656Datadog-Client-Computed-Statsheader when OTLP Trace Metrics are active to prevent dual writing in the AgentConflatingMetricsAggregatorfor testing purposesMotivation
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue/merge. You can also:/merge --commit-message "..."/merge -c/merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level (note: the PR still needs to be mergeable, this will only skip the pre-merge build)Jira ticket: [PROJ-IDENT]