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. |
Debugger benchmarksParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 5 unstable metrics. See unchanged results
Request duration reports for reportsgantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (364.751 µs) : 333, 397
. : milestone, 365,
basic (340.586 µs) : 333, 349
. : milestone, 341,
loop (8.116 ms) : 8052, 8180
. : milestone, 8116,
section candidate
noprobe (361.356 µs) : 331, 391
. : milestone, 361,
basic (340.533 µs) : 334, 347
. : milestone, 341,
loop (8.117 ms) : 8053, 8181
. : milestone, 8117,
|
| */ | ||
| @Advice.OnMethodEnter(suppress = Throwable.class) | ||
| public static TraceScope methodEnter( | ||
| public static AutoCloseable methodEnter( |
There was a problem hiding this comment.
This change was necessary so we could continue to use AgentTracer::closeActive in a specific edge-case. Since this is a SAM type (Single Abstract Method) we need to find a similar SAM type in the hierarchy, and the closest was AutoCloseable.
|
@DataDog review |
Kafka / consumer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
There was a problem hiding this comment.
More details
The new ContextScope path keeps span extraction and scope life cycle behavior.
🤖 Datadog Autotest · Commit a002980 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a136127df
ℹ️ 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".
There was a problem hiding this comment.
More details
The migration keeps scope lifecycle order and gets spans from the scope context. Advice code uses the Java 8 bytecode bridge.
🤖 Datadog Autotest · Commit 8a13612 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
Kafka / producer-benchmarkParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics. See unchanged results
|
daniel-mohedano
left a comment
There was a problem hiding this comment.
LGTM on CiVis side!
What Does This Do
After the continuation migration
AgentScopewas left as a thin bridge interface involvingContextScope+TraceScope+span(). This PR finishes that migration:AgentScopeis deleted entirely, and every scope-returning/consuming call site now usesContextScopedirectly, withAgentSpan.fromScope(scope)/Java8BytecodeBridge.spanFromScope(scope)helpers replacingscope.span().Note the
AgentSpan.fromContextmethod used by the helpers is optimized for the common case where the span is the context.AgentScopefromTraceScopefirst (isolated, low-risk step) to prove nothing depended on the deprecated async-propagation methods through that interface.AgentSpan.fromScope(ContextScope)to extract the active span from a scope's context.AgentScopetoContextScopeacrossinternal-api,dd-trace-core,dd-trace-ot, and alldd-java-agentinstrumentation modules (~195 files), plus debugger, LLM Observability, and test modules.AgentScope.java.ARCHITECTURE.md,docs/add_new_instrumentation.md,docs/how_instrumentations_work.md) and theapm-integrationsskill reference to describeContextScopeinstead ofAgentScope, including fixing a pre-existing doc issue which mentionedContinuationinAgentScope(we now useContextContinuationas the continuation type).AgentScopementions in comments (ConfigInversionLinter.kt,DDLLMObsSpanTest.groovy) and renamedAgentScope-named identifiers inStreamTaskContext/KafkaStreamTaskInstrumentation(kafka-streams-0.11) to match. Also corrected theConfigInversionLinter.ktcomment to say Undertow's legacyDD_UNDERTOW_CONTINUATIONkey stores aContextContinuation, not aContextScope.NoopAgentScopeJaCoCo coverage exclusion ininternal-api/build.gradle.kts.Motivation
AgentScopeadded a layer of indirection with no remaining unique behaviour. Every implementer is aContextScope, and the default methods contributed byTraceScopewere unused. Switching toContextScopesimplifies the scope hierarchy and continues the tracer's move toward the genericContextAPIAdditional Notes
Performance
Ran several load-test runs using
dd-java-agent/benchmark-integrationwith a realDDAgentWriterserializing via a local trace agent. Comparing this branch againstmasteracross workloads from<1msto10ms: throughput and latency are statistically indistinguishable between the two (differences within ~0.2%, well under normal run-to-run noise). No measurable performance impact.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 issueJira ticket: [PROJ-IDENT]