Skip to content

Cleanup Java8BytecodeBridge and align it more with OTel#11857

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
mcculls/cleanup-java8-bridge
Jul 9, 2026
Merged

Cleanup Java8BytecodeBridge and align it more with OTel#11857
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
mcculls/cleanup-java8-bridge

Conversation

@mcculls

@mcculls mcculls commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

  • 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, but only when needed)

Motivation

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

  • 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]

@mcculls mcculls added comp: core Tracer core tag: no release notes Changes to exclude from release notes type: refactoring labels Jul 3, 2026
@mcculls mcculls requested review from a team as code owners July 3, 2026 19:56
@mcculls mcculls requested review from PerfectSlayer, dougqh, jordan-wong, mtoffl01 and sarahchen6 and removed request for a team July 3, 2026 19:56

@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: 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".

@datadog-prod-us1-5

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Jul 3, 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 14.05 s 13.88 s [+0.5%; +2.0%] (maybe worse)
startup:insecure-bank:tracing:Agent 12.89 s 13.01 s [-1.7%; -0.2%] (maybe better)
startup:petclinic:appsec:Agent 16.92 s 16.61 s [+0.9%; +2.9%] (maybe worse)
startup:petclinic:iast:Agent 16.86 s 16.88 s [-1.0%; +0.8%] (no difference)
startup:petclinic:profiling:Agent 16.56 s 16.83 s [-2.9%; -0.3%] (maybe better)
startup:petclinic:sca:Agent 17.00 s 16.16 s [+0.6%; +9.7%] (maybe worse)
startup:petclinic:tracing:Agent 16.12 s 16.08 s [-0.5%; +1.0%] (no difference)

Commit: 89f86534 · 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.

@mcculls mcculls force-pushed the mcculls/cleanup-java8-bridge branch from 0aed531 to 62c8c9b Compare July 3, 2026 22:46
@pr-commenter

pr-commenter Bot commented Jul 3, 2026

Copy link
Copy Markdown

Kafka / producer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/cleanup-java8-bridge
git_commit_date 1783546422 1783547398
git_commit_sha f2461a0 89f8653
See matching parameters
Baseline Candidate
ci_job_date 1783548785 1783548785
ci_job_id 1843667703 1843667703
ci_pipeline_id 123658086 123658086
cpu_model Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz
jdkVersion 11.0.25 11.0.25
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/producer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/producer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.25+9-post-Ubuntu-1ubuntu122.04 11.0.25+9-post-Ubuntu-1ubuntu122.04

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics.

See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-disabled-benchmarks/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-enabled-benchmarks/KafkaProduceBenchmark.benchProduce same

@pr-commenter

pr-commenter Bot commented Jul 3, 2026

Copy link
Copy Markdown

Kafka / consumer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master mcculls/cleanup-java8-bridge
git_commit_date 1783546422 1783547398
git_commit_sha f2461a0 89f8653
See matching parameters
Baseline Candidate
ci_job_date 1783548797 1783548797
ci_job_id 1843667343 1843667343
ci_pipeline_id 123658086 123658086
cpu_model Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz
jdkVersion 11.0.25 11.0.25
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/consumer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/consumer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.25+9-post-Ubuntu-1ubuntu122.04 11.0.25+9-post-Ubuntu-1ubuntu122.04

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics.

See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaConsumerBenchmark.benchConsume same
scenario:only-tracing-dsm-disabled-benchmarks/KafkaConsumerBenchmark.benchConsume unsure
[-8995.814op/s; -553.497op/s] or [-3.589%; -0.221%]
scenario:only-tracing-dsm-enabled-benchmarks/KafkaConsumerBenchmark.benchConsume same

@mhlidd mhlidd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM following a fix to the new RxJava3 instrumentation

@bric3 bric3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I also restarted the failing muzzle job

@PerfectSlayer PerfectSlayer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A bit tedious to review with that many changes but there is not much other option 😓
I left minors comments

@mcculls

mcculls commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

A bit tedious to review with that many changes but there is not much other option 😓 I left minor comments

@PerfectSlayer thanks for making the effort to check everything over

@PerfectSlayer PerfectSlayer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for making the effort to check everything over

No problem 🤝

 * 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)

Limit use of Java8BytecodeBridge to advice code that might be patched into pre-Java8 bytecode
@mcculls mcculls force-pushed the mcculls/cleanup-java8-bridge branch from 291064f to 89f8653 Compare July 8, 2026 21:54
@mcculls mcculls added this pull request to the merge queue Jul 8, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Jul 8, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-07-08 22:58:39 UTC ℹ️ Start processing command /merge


2026-07-08 22:58:43 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-07-09 00:02:11 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 8, 2026
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit f51d33e into master Jul 9, 2026
590 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the mcculls/cleanup-java8-bridge branch July 9, 2026 00:02
@github-actions github-actions Bot added this to the 1.65.0 milestone Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: core Tracer core tag: no release notes Changes to exclude from release notes type: refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants