Skip to content

Remove redundant null checks in rxjava2 instrumentation (current Context is never null)#11875

Open
mcculls wants to merge 1 commit into
mcculls/cleanup-java8-bridgefrom
mcculls/cleanup-rxjava2-context
Open

Remove redundant null checks in rxjava2 instrumentation (current Context is never null)#11875
mcculls wants to merge 1 commit into
mcculls/cleanup-java8-bridgefrom
mcculls/cleanup-rxjava2-context

Conversation

@mcculls

@mcculls mcculls commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Motivation

Simpler code, avoids unnecessarily storing root context - now matches the rxjava 3 instrumentation.

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 inst: others All other instrumentations tag: no release notes Changes to exclude from release notes type: refactoring labels Jul 7, 2026
@mcculls mcculls marked this pull request as ready for review July 7, 2026 11:11
@mcculls mcculls requested a review from a team as a code owner July 7, 2026 11:11
@mcculls mcculls requested review from ValentinZakharov and removed request for a team July 7, 2026 11:11
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 56.93% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0f72563 | Docs | Datadog PR Page | Give us feedback!

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

Looking good. Thanks for the follow up changes

@PerfectSlayer PerfectSlayer added the tag: concurrency Virtual Threads, Coroutines, Async, RX, Executors label Jul 7, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jul 7, 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.93 s 13.89 s [-0.5%; +1.1%] (no difference)
startup:insecure-bank:tracing:Agent 12.92 s 12.95 s [-0.7%; +0.3%] (no difference)
startup:petclinic:appsec:Agent 16.92 s 16.85 s [-0.5%; +1.4%] (no difference)
startup:petclinic:iast:Agent 16.86 s 16.45 s [-2.0%; +7.0%] (no difference)
startup:petclinic:profiling:Agent 16.80 s 16.86 s [-1.7%; +0.9%] (no difference)
startup:petclinic:sca:Agent 16.73 s 16.76 s [-1.2%; +0.8%] (no difference)
startup:petclinic:tracing:Agent 15.62 s 15.94 s [-6.1%; +2.0%] (no difference)

Commit: 0f725637 · 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-rxjava2-context branch from fcbb916 to 0f72563 Compare July 7, 2026 14:38
@pr-commenter

pr-commenter Bot commented Jul 7, 2026

Copy link
Copy Markdown

Kafka / producer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch mcculls/cleanup-java8-bridge mcculls/cleanup-rxjava2-context
git_commit_date 1783434996 1783435050
git_commit_sha 291064f 0f72563
See matching parameters
Baseline Candidate
ci_job_date 1783436298 1783436298
ci_job_id 1837454066 1837454066
ci_pipeline_id 123279465 123279465
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL 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 unsure
[-4582.157op/s; -398.459op/s] or [-3.142%; -0.273%]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: others All other instrumentations tag: concurrency Virtual Threads, Coroutines, Async, RX, Executors 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.

2 participants