Cleanup Java8BytecodeBridge and align it more with OTel#11857
Conversation
* added static imports for all method calls * dropped the `get` prefix from context methods * added `currentSpan` method * added `baggageFromContext` method * pruned unused methods (may add them back later if/when needed)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2691b55fd1
ℹ️ 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".
| * @see Context#current() | ||
| */ | ||
| public static Context getCurrentContext() { | ||
| public static Context currentContext() { |
There was a problem hiding this comment.
Update remaining RxJava3 bridge callers
This rename removes getCurrentContext()/getRootContext(), but a repo-wide search still finds the RxJava3 instrumentations calling Java8BytecodeBridge.getCurrentContext() and Java8BytecodeBridge.getRootContext() under dd-java-agent/instrumentation/rxjava/rxjava-3.0/src/main/java. Those main sources will no longer compile against this updated bridge, so either keep compatibility aliases or update the RxJava3 callers as well.
Useful? React with 👍 / 👎.
|
🎯 Code Coverage (details) 🔗 Commit SHA: 62c8c9b | Docs | Datadog PR Page | Give us feedback! |
🟢 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. |
0aed531 to
62c8c9b
Compare
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
|
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
|
mhlidd
left a comment
There was a problem hiding this comment.
LGTM following a fix to the new RxJava3 instrumentation
bric3
left a comment
There was a problem hiding this comment.
I also restarted the muzzle job
What Does This Do
getprefix from context methodscurrentSpanmethodbaggageFromContextmethodMotivation
Consistency with https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/javaagent-extension-api/src/main/java/io/opentelemetry/javaagent/bootstrap/Java8BytecodeBridge.java#L22
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]