Skip to content

Update AggregateEntry to Split OK/Error Latencies#11719

Open
mhlidd wants to merge 1 commit into
masterfrom
mhlidd/otlp_trace_metrics_aggregate_entry
Open

Update AggregateEntry to Split OK/Error Latencies#11719
mhlidd wants to merge 1 commit into
masterfrom
mhlidd/otlp_trace_metrics_aggregate_entry

Conversation

@mhlidd

@mhlidd mhlidd commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

This PR updates AggregateEntry to properly be able to capture separate counts for OK and Error latencies for the purposes of OTLP trace metrics.

Motivation

Additional Notes

Contributor Checklist

  • Format the title according to the contribution guidelines
  • Assign the type: and (comp: or inst:) labels in addition to any other useful labels
  • Avoid using close, fix, or any linking keywords when referencing an issue
    Use solves instead, and assign the PR milestone to the issue
  • Update the CODEOWNERS file on source file addition, migration, or deletion
  • Update public documentation with any new configuration flags or behaviors
  • Add your completed PR to the merge queue by commenting /merge. You can also:
    • Customize the commit message associated with the merge with /merge --commit-message "..."
    • Remove your PR from the merge queue with /merge -c
    • Skip all merge queue checks with /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)
    • Get more information in this doc

Jira ticket: [PROJ-IDENT]

@dd-octo-sts

dd-octo-sts Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 13.98 s 13.97 s [-0.7%; +0.8%] (no difference)
startup:insecure-bank:tracing:Agent 12.92 s 12.98 s [-1.1%; +0.2%] (no difference)
startup:petclinic:appsec:Agent 16.95 s 16.78 s [+0.2%; +1.9%] (maybe worse)
startup:petclinic:iast:Agent 16.87 s 16.92 s [-0.9%; +0.3%] (no difference)
startup:petclinic:profiling:Agent 16.86 s 17.08 s [-2.4%; -0.2%] (maybe better)
startup:petclinic:sca:Agent 16.86 s 16.78 s [-0.4%; +1.4%] (no difference)
startup:petclinic:tracing:Agent 16.06 s 16.12 s [-1.4%; +0.8%] (no difference)

Commit: 2d8a515b · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

Base automatically changed from mhlidd/otlp_trace_metrics_config to master June 24, 2026 18:09
@mhlidd mhlidd changed the title init Update AggregateEntry to Fit OTLP Trace Metrics Keys Jun 24, 2026
@mhlidd mhlidd added type: enhancement Enhancements and improvements type: refactoring comp: metrics Metrics labels Jun 24, 2026
@mhlidd mhlidd marked this pull request as ready for review June 24, 2026 18:12
@mhlidd mhlidd requested a review from a team as a code owner June 24, 2026 18:12
@mhlidd

mhlidd commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3be9e267af

ℹ️ 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".

Comment thread dd-trace-core/src/main/java/datadog/trace/common/metrics/AggregateEntry.java Outdated
@dougqh

dougqh commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

I'm 75% through reworking this code. I'm trying to decide how best to slot this in.
The last major structural change is #11387. It adds per component / tag cardinality limiters, and it looks that is going to interact with this.

@mhlidd

mhlidd commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@dougqh Happy to get this PR to a mergable state and wait to merge after your changes go in. I took a quick look and it doesn't look like your PR introduces anything that would logically prevent my changes from working. Would you be able to confirm that? 🙇‍♂️

@dougqh

dougqh commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@dougqh Happy to get this PR to a mergable state and wait to merge after your changes go in. I took a quick look and it doesn't look like your PR introduces anything that would logically prevent my changes from working. Would you be able to confirm that? 🙇‍♂️

@mhlidd Yeah, after thinking it through, I'd like to land #11387 first -- precisely because it gives us a safety mechanism that is important there.

Because origin is externally controlled, I want to be careful how we handle it. Right now, the DDCache can constantly churn, so an external actor can still cause constant UTF8BytesString allocation.

#11387 introduces a cardinality limiter that allows us to clamp allocation, so blunt that attack vector.

@mhlidd mhlidd marked this pull request as draft July 2, 2026 13:54
@mhlidd mhlidd force-pushed the mhlidd/otlp_trace_metrics_aggregate_entry branch from fb6b228 to 2d8a515 Compare July 2, 2026 18:23
@mhlidd mhlidd changed the title Update AggregateEntry to Fit OTLP Trace Metrics Keys Update AggregateEntry to Split OK/Error Latencies Jul 2, 2026
@mhlidd

mhlidd commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

@mcculls After internal discussion, origin will not be introduced w/ OTLP trace metrics. When native CSS decides to include origin tagging, OTLP can capture it as well then. Thus, there will be no cardinality increases introduced in this PR.

@datadog-official

This comment has been minimized.

@mhlidd mhlidd marked this pull request as ready for review July 2, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: metrics Metrics type: enhancement Enhancements and improvements type: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants