Skip to content

Conversation

amarziali
Copy link
Contributor

@amarziali amarziali commented Oct 8, 2025

What Does This Do

This PR will stop returning span / tracing context when they are invalid.

Motivation

This will change the semantic of Span.fromContextOrNull() to finally return null (even if an invalid context can still be considered as valid) and will save allocating OTel wrapper objects.

Additional Notes

Contributor Checklist

Jira ticket: APMS-17294

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Oct 8, 2025

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 59.68% (-0.13%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 66a1ee4 | Docs | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Oct 8, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/context-otel
git_commit_date 1760545829 1760620231
git_commit_sha 425276d 66a1ee4
release_version 1.55.0-SNAPSHOT~425276dceb 1.55.0-SNAPSHOT~66a1ee4867
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1760622399 1760622399
ci_job_id 1182667848 1182667848
ci_pipeline_id 79491786 79491786
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-kdrhc6k8 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-kdrhc6k8 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

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

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:iast:crashtracking better
[-78.254µs; -34.284µs] or [-5.201%; -2.279%]
1.448ms 1.505ms
scenario:startup:petclinic:iast:Flare Poller better
[-375.228µs; -113.897µs] or [-8.591%; -2.608%]
4.123ms 4.367ms
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~66a1ee4867, baseline=1.55.0-SNAPSHOT~425276dceb

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.017 s) : 0, 1017401
Total [baseline] (8.738 s) : 0, 8737741
Agent [candidate] (1.015 s) : 0, 1015311
Total [candidate] (8.659 s) : 0, 8658912
section iast
Agent [baseline] (1.154 s) : 0, 1154097
Total [baseline] (9.281 s) : 0, 9280848
Agent [candidate] (1.148 s) : 0, 1147975
Total [candidate] (9.261 s) : 0, 9260826
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.017 s -
Agent iast 1.154 s 136.695 ms (13.4%)
Total tracing 8.738 s -
Total iast 9.281 s 543.106 ms (6.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.015 s -
Agent iast 1.148 s 132.664 ms (13.1%)
Total tracing 8.659 s -
Total iast 9.261 s 601.915 ms (7.0%)
gantt
    title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~66a1ee4867, baseline=1.55.0-SNAPSHOT~425276dceb

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.479 ms) : 0, 1479
crashtracking [candidate] (1.458 ms) : 0, 1458
BytebuddyAgent [baseline] (692.282 ms) : 0, 692282
BytebuddyAgent [candidate] (691.646 ms) : 0, 691646
GlobalTracer [baseline] (242.264 ms) : 0, 242264
GlobalTracer [candidate] (241.184 ms) : 0, 241184
AppSec [baseline] (32.685 ms) : 0, 32685
AppSec [candidate] (32.703 ms) : 0, 32703
Debugger [baseline] (6.474 ms) : 0, 6474
Debugger [candidate] (6.399 ms) : 0, 6399
Remote Config [baseline] (711.566 µs) : 0, 712
Remote Config [candidate] (704.348 µs) : 0, 704
Telemetry [baseline] (9.301 ms) : 0, 9301
Telemetry [candidate] (9.137 ms) : 0, 9137
Flare Poller [baseline] (11.062 ms) : 0, 11062
Flare Poller [candidate] (10.981 ms) : 0, 10981
section iast
crashtracking [baseline] (1.505 ms) : 0, 1505
crashtracking [candidate] (1.448 ms) : 0, 1448
BytebuddyAgent [baseline] (818.936 ms) : 0, 818936
BytebuddyAgent [candidate] (813.122 ms) : 0, 813122
GlobalTracer [baseline] (230.998 ms) : 0, 230998
GlobalTracer [candidate] (230.877 ms) : 0, 230877
IAST [baseline] (26.365 ms) : 0, 26365
IAST [candidate] (26.253 ms) : 0, 26253
AppSec [baseline] (35.034 ms) : 0, 35034
AppSec [candidate] (35.781 ms) : 0, 35781
Debugger [baseline] (6.123 ms) : 0, 6123
Debugger [candidate] (6.086 ms) : 0, 6086
Remote Config [baseline] (627.906 µs) : 0, 628
Remote Config [candidate] (609.345 µs) : 0, 609
Telemetry [baseline] (8.709 ms) : 0, 8709
Telemetry [candidate] (8.465 ms) : 0, 8465
Flare Poller [baseline] (4.207 ms) : 0, 4207
Flare Poller [candidate] (4.123 ms) : 0, 4123
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~66a1ee4867, baseline=1.55.0-SNAPSHOT~425276dceb

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.023 s) : 0, 1022988
Total [baseline] (10.654 s) : 0, 10654203
Agent [candidate] (1.022 s) : 0, 1021610
Total [candidate] (10.801 s) : 0, 10800521
section appsec
Agent [baseline] (1.195 s) : 0, 1194868
Total [baseline] (11.128 s) : 0, 11128211
Agent [candidate] (1.217 s) : 0, 1217391
Total [candidate] (11.096 s) : 0, 11096107
section iast
Agent [baseline] (1.157 s) : 0, 1157214
Total [baseline] (11.113 s) : 0, 11113165
Agent [candidate] (1.152 s) : 0, 1151797
Total [candidate] (10.91 s) : 0, 10910340
section profiling
Agent [baseline] (1.161 s) : 0, 1161411
Total [baseline] (11.055 s) : 0, 11054977
Agent [candidate] (1.166 s) : 0, 1166099
Total [candidate] (11.136 s) : 0, 11135633
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.023 s -
Agent appsec 1.195 s 171.881 ms (16.8%)
Agent iast 1.157 s 134.226 ms (13.1%)
Agent profiling 1.161 s 138.423 ms (13.5%)
Total tracing 10.654 s -
Total appsec 11.128 s 474.007 ms (4.4%)
Total iast 11.113 s 458.962 ms (4.3%)
Total profiling 11.055 s 400.774 ms (3.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.022 s -
Agent appsec 1.217 s 195.781 ms (19.2%)
Agent iast 1.152 s 130.188 ms (12.7%)
Agent profiling 1.166 s 144.489 ms (14.1%)
Total tracing 10.801 s -
Total appsec 11.096 s 295.585 ms (2.7%)
Total iast 10.91 s 109.818 ms (1.0%)
Total profiling 11.136 s 335.111 ms (3.1%)
gantt
    title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~66a1ee4867, baseline=1.55.0-SNAPSHOT~425276dceb

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.482 ms) : 0, 1482
crashtracking [candidate] (1.47 ms) : 0, 1470
BytebuddyAgent [baseline] (697.439 ms) : 0, 697439
BytebuddyAgent [candidate] (696.625 ms) : 0, 696625
GlobalTracer [baseline] (243.073 ms) : 0, 243073
GlobalTracer [candidate] (242.587 ms) : 0, 242587
AppSec [baseline] (32.435 ms) : 0, 32435
AppSec [candidate] (33.009 ms) : 0, 33009
Debugger [baseline] (6.429 ms) : 0, 6429
Debugger [candidate] (6.438 ms) : 0, 6438
Remote Config [baseline] (704.367 µs) : 0, 704
Remote Config [candidate] (720.789 µs) : 0, 721
Telemetry [baseline] (9.182 ms) : 0, 9182
Telemetry [candidate] (9.1 ms) : 0, 9100
Flare Poller [baseline] (10.964 ms) : 0, 10964
Flare Poller [candidate] (10.371 ms) : 0, 10371
section appsec
crashtracking [baseline] (1.468 ms) : 0, 1468
crashtracking [candidate] (1.497 ms) : 0, 1497
BytebuddyAgent [baseline] (717.773 ms) : 0, 717773
BytebuddyAgent [candidate] (732.184 ms) : 0, 732184
GlobalTracer [baseline] (234.591 ms) : 0, 234591
GlobalTracer [candidate] (238.868 ms) : 0, 238868
IAST [baseline] (24.817 ms) : 0, 24817
IAST [candidate] (25.462 ms) : 0, 25462
AppSec [baseline] (175.796 ms) : 0, 175796
AppSec [candidate] (178.204 ms) : 0, 178204
Debugger [baseline] (6.166 ms) : 0, 6166
Debugger [candidate] (6.257 ms) : 0, 6257
Remote Config [baseline] (644.273 µs) : 0, 644
Remote Config [candidate] (670.292 µs) : 0, 670
Telemetry [baseline] (8.553 ms) : 0, 8553
Telemetry [candidate] (8.674 ms) : 0, 8674
Flare Poller [baseline] (3.898 ms) : 0, 3898
Flare Poller [candidate] (4.068 ms) : 0, 4068
section iast
crashtracking [baseline] (1.471 ms) : 0, 1471
crashtracking [candidate] (1.461 ms) : 0, 1461
BytebuddyAgent [baseline] (820.025 ms) : 0, 820025
BytebuddyAgent [candidate] (815.347 ms) : 0, 815347
GlobalTracer [baseline] (232.5 ms) : 0, 232500
GlobalTracer [candidate] (231.827 ms) : 0, 231827
IAST [baseline] (26.746 ms) : 0, 26746
IAST [candidate] (26.57 ms) : 0, 26570
AppSec [baseline] (35.107 ms) : 0, 35107
AppSec [candidate] (35.797 ms) : 0, 35797
Debugger [baseline] (6.148 ms) : 0, 6148
Debugger [candidate] (6.122 ms) : 0, 6122
Remote Config [baseline] (604.016 µs) : 0, 604
Remote Config [candidate] (628.42 µs) : 0, 628
Telemetry [baseline] (8.636 ms) : 0, 8636
Telemetry [candidate] (8.581 ms) : 0, 8581
Flare Poller [baseline] (4.367 ms) : 0, 4367
Flare Poller [candidate] (4.123 ms) : 0, 4123
section profiling
crashtracking [baseline] (1.429 ms) : 0, 1429
crashtracking [candidate] (1.436 ms) : 0, 1436
BytebuddyAgent [baseline] (720.296 ms) : 0, 720296
BytebuddyAgent [candidate] (722.021 ms) : 0, 722021
GlobalTracer [baseline] (217.93 ms) : 0, 217930
GlobalTracer [candidate] (218.776 ms) : 0, 218776
AppSec [baseline] (32.423 ms) : 0, 32423
AppSec [candidate] (33.387 ms) : 0, 33387
Debugger [baseline] (6.52 ms) : 0, 6520
Debugger [candidate] (6.525 ms) : 0, 6525
Remote Config [baseline] (784.541 µs) : 0, 785
Remote Config [candidate] (700.005 µs) : 0, 700
Telemetry [baseline] (16.251 ms) : 0, 16251
Telemetry [candidate] (16.604 ms) : 0, 16604
Flare Poller [baseline] (4.141 ms) : 0, 4141
Flare Poller [candidate] (4.343 ms) : 0, 4343
ProfilingAgent [baseline] (108.289 ms) : 0, 108289
ProfilingAgent [candidate] (109.107 ms) : 0, 109107
Profiling [baseline] (109.425 ms) : 0, 109425
Profiling [candidate] (110.221 ms) : 0, 110221
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/context-otel
git_commit_date 1760545829 1760620231
git_commit_sha 425276d 66a1ee4
release_version 1.55.0-SNAPSHOT~425276dceb 1.55.0-SNAPSHOT~66a1ee4867
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1760622064 1760622064
ci_job_id 1182667851 1182667851
ci_pipeline_id 79491786 79491786
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-1-n46sm0fg 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-1-n46sm0fg 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

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

scenario Δ mean http_req_duration Δ mean throughput candidate mean http_req_duration candidate mean throughput baseline mean http_req_duration baseline mean throughput
scenario:load:insecure-bank:tracing:high_load better
[-547.669µs; -312.429µs] or [-6.964%; -3.973%]
unstable
[-48.705op/s; +116.392op/s] or [-8.270%; +19.763%]
7.434ms 622.781op/s 7.864ms 588.938op/s
scenario:load:insecure-bank:iast_FULL:high_load worse
[+284.767µs; +912.392µs] or [+2.014%; +6.452%]
unstable
[-54.006op/s; +27.569op/s] or [-16.393%; +8.368%]
14.739ms 316.219op/s 14.141ms 329.438op/s
scenario:load:insecure-bank:iast_GLOBAL:high_load worse
[+426.864µs; +844.739µs] or [+4.043%; +8.001%]
unstable
[-80.698op/s; +31.385op/s] or [-18.334%; +7.130%]
11.194ms 415.500op/s 10.558ms 440.156op/s
scenario:load:petclinic:iast:high_load better
[-3.163ms; -2.331ms] or [-6.852%; -5.051%]
unstable
[-1.032op/s; +13.657op/s] or [-1.017%; +13.463%]
43.415ms 107.750op/s 46.162ms 101.438op/s
scenario:load:petclinic:appsec:high_load worse
[+2.337ms; +3.228ms] or [+5.030%; +6.948%]
unstable
[-12.466op/s; +1.141op/s] or [-12.373%; +1.132%]
49.240ms 95.088op/s 46.457ms 100.750op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~66a1ee4867, baseline=1.55.0-SNAPSHOT~425276dceb
    dateFormat X
    axisFormat %s
section baseline
no_agent (37.268 ms) : 36967, 37569
.   : milestone, 37268,
appsec (46.457 ms) : 46049, 46866
.   : milestone, 46457,
code_origins (45.059 ms) : 44670, 45448
.   : milestone, 45059,
iast (46.162 ms) : 45760, 46565
.   : milestone, 46162,
profiling (46.639 ms) : 46192, 47087
.   : milestone, 46639,
tracing (44.725 ms) : 44339, 45110
.   : milestone, 44725,
section candidate
no_agent (38.072 ms) : 37763, 38382
.   : milestone, 38072,
appsec (49.24 ms) : 48821, 49659
.   : milestone, 49240,
code_origins (44.743 ms) : 44349, 45138
.   : milestone, 44743,
iast (43.415 ms) : 43045, 43785
.   : milestone, 43415,
profiling (45.718 ms) : 45279, 46158
.   : milestone, 45718,
tracing (45.328 ms) : 44944, 45712
.   : milestone, 45328,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.268 ms [36.967 ms, 37.569 ms] -
appsec 46.457 ms [46.049 ms, 46.866 ms] 9.189 ms (24.7%)
code_origins 45.059 ms [44.67 ms, 45.448 ms] 7.792 ms (20.9%)
iast 46.162 ms [45.76 ms, 46.565 ms] 8.894 ms (23.9%)
profiling 46.639 ms [46.192 ms, 47.087 ms] 9.371 ms (25.1%)
tracing 44.725 ms [44.339 ms, 45.11 ms] 7.457 ms (20.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 38.072 ms [37.763 ms, 38.382 ms] -
appsec 49.24 ms [48.821 ms, 49.659 ms] 11.167 ms (29.3%)
code_origins 44.743 ms [44.349 ms, 45.138 ms] 6.671 ms (17.5%)
iast 43.415 ms [43.045 ms, 43.785 ms] 5.342 ms (14.0%)
profiling 45.718 ms [45.279 ms, 46.158 ms] 7.646 ms (20.1%)
tracing 45.328 ms [44.944 ms, 45.712 ms] 7.256 ms (19.1%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~66a1ee4867, baseline=1.55.0-SNAPSHOT~425276dceb
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.393 ms) : 4340, 4446
.   : milestone, 4393,
iast (9.77 ms) : 9609, 9931
.   : milestone, 9770,
iast_FULL (14.141 ms) : 13853, 14428
.   : milestone, 14141,
iast_GLOBAL (10.558 ms) : 10373, 10744
.   : milestone, 10558,
profiling (8.632 ms) : 8497, 8766
.   : milestone, 8632,
tracing (7.864 ms) : 7752, 7977
.   : milestone, 7864,
section candidate
no_agent (4.42 ms) : 4362, 4477
.   : milestone, 4420,
iast (9.638 ms) : 9474, 9803
.   : milestone, 9638,
iast_FULL (14.739 ms) : 14444, 15035
.   : milestone, 14739,
iast_GLOBAL (11.194 ms) : 10992, 11396
.   : milestone, 11194,
profiling (8.492 ms) : 8362, 8621
.   : milestone, 8492,
tracing (7.434 ms) : 7328, 7540
.   : milestone, 7434,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.393 ms [4.34 ms, 4.446 ms] -
iast 9.77 ms [9.609 ms, 9.931 ms] 5.377 ms (122.4%)
iast_FULL 14.141 ms [13.853 ms, 14.428 ms] 9.748 ms (221.9%)
iast_GLOBAL 10.558 ms [10.373 ms, 10.744 ms] 6.165 ms (140.3%)
profiling 8.632 ms [8.497 ms, 8.766 ms] 4.238 ms (96.5%)
tracing 7.864 ms [7.752 ms, 7.977 ms] 3.471 ms (79.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.42 ms [4.362 ms, 4.477 ms] -
iast 9.638 ms [9.474 ms, 9.803 ms] 5.219 ms (118.1%)
iast_FULL 14.739 ms [14.444 ms, 15.035 ms] 10.32 ms (233.5%)
iast_GLOBAL 11.194 ms [10.992 ms, 11.396 ms] 6.774 ms (153.3%)
profiling 8.492 ms [8.362 ms, 8.621 ms] 4.072 ms (92.1%)
tracing 7.434 ms [7.328 ms, 7.54 ms] 3.015 ms (68.2%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/context-otel
git_commit_date 1760545829 1760620231
git_commit_sha 425276d 66a1ee4
release_version 1.55.0-SNAPSHOT~425276dceb 1.55.0-SNAPSHOT~66a1ee4867
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1760622549 1760622549
ci_job_id 1182667852 1182667852
ci_pipeline_id 79491786 79491786
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-r0g9bi32 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-r0g9bi32 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

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

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~66a1ee4867, baseline=1.55.0-SNAPSHOT~425276dceb
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.476 ms) : 1464, 1488
.   : milestone, 1476,
appsec (3.74 ms) : 3520, 3959
.   : milestone, 3740,
iast (2.212 ms) : 2149, 2275
.   : milestone, 2212,
iast_GLOBAL (2.249 ms) : 2186, 2313
.   : milestone, 2249,
profiling (2.061 ms) : 2010, 2113
.   : milestone, 2061,
tracing (2.024 ms) : 1975, 2073
.   : milestone, 2024,
section candidate
no_agent (1.477 ms) : 1466, 1489
.   : milestone, 1477,
appsec (3.68 ms) : 3465, 3895
.   : milestone, 3680,
iast (2.204 ms) : 2141, 2267
.   : milestone, 2204,
iast_GLOBAL (2.252 ms) : 2188, 2316
.   : milestone, 2252,
profiling (2.049 ms) : 1998, 2099
.   : milestone, 2049,
tracing (2.04 ms) : 1990, 2090
.   : milestone, 2040,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.476 ms [1.464 ms, 1.488 ms] -
appsec 3.74 ms [3.52 ms, 3.959 ms] 2.264 ms (153.4%)
iast 2.212 ms [2.149 ms, 2.275 ms] 735.997 µs (49.9%)
iast_GLOBAL 2.249 ms [2.186 ms, 2.313 ms] 773.302 µs (52.4%)
profiling 2.061 ms [2.01 ms, 2.113 ms] 585.236 µs (39.6%)
tracing 2.024 ms [1.975 ms, 2.073 ms] 547.891 µs (37.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.477 ms [1.466 ms, 1.489 ms] -
appsec 3.68 ms [3.465 ms, 3.895 ms] 2.202 ms (149.1%)
iast 2.204 ms [2.141 ms, 2.267 ms] 726.61 µs (49.2%)
iast_GLOBAL 2.252 ms [2.188 ms, 2.316 ms] 774.704 µs (52.4%)
profiling 2.049 ms [1.998 ms, 2.099 ms] 571.28 µs (38.7%)
tracing 2.04 ms [1.99 ms, 2.09 ms] 562.765 µs (38.1%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~66a1ee4867, baseline=1.55.0-SNAPSHOT~425276dceb
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.546 s) : 15546000, 15546000
.   : milestone, 15546000,
appsec (15.178 s) : 15178000, 15178000
.   : milestone, 15178000,
iast (18.767 s) : 18767000, 18767000
.   : milestone, 18767000,
iast_GLOBAL (18.23 s) : 18230000, 18230000
.   : milestone, 18230000,
profiling (15.994 s) : 15994000, 15994000
.   : milestone, 15994000,
tracing (15.27 s) : 15270000, 15270000
.   : milestone, 15270000,
section candidate
no_agent (15.75 s) : 15750000, 15750000
.   : milestone, 15750000,
appsec (15.235 s) : 15235000, 15235000
.   : milestone, 15235000,
iast (18.65 s) : 18650000, 18650000
.   : milestone, 18650000,
iast_GLOBAL (18.331 s) : 18331000, 18331000
.   : milestone, 18331000,
profiling (15.143 s) : 15143000, 15143000
.   : milestone, 15143000,
tracing (15.15 s) : 15150000, 15150000
.   : milestone, 15150000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.546 s [15.546 s, 15.546 s] -
appsec 15.178 s [15.178 s, 15.178 s] -368.0 ms (-2.4%)
iast 18.767 s [18.767 s, 18.767 s] 3.221 s (20.7%)
iast_GLOBAL 18.23 s [18.23 s, 18.23 s] 2.684 s (17.3%)
profiling 15.994 s [15.994 s, 15.994 s] 448.0 ms (2.9%)
tracing 15.27 s [15.27 s, 15.27 s] -276.0 ms (-1.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.75 s [15.75 s, 15.75 s] -
appsec 15.235 s [15.235 s, 15.235 s] -515.0 ms (-3.3%)
iast 18.65 s [18.65 s, 18.65 s] 2.9 s (18.4%)
iast_GLOBAL 18.331 s [18.331 s, 18.331 s] 2.581 s (16.4%)
profiling 15.143 s [15.143 s, 15.143 s] -607.0 ms (-3.9%)
tracing 15.15 s [15.15 s, 15.15 s] -600.0 ms (-3.8%)

@amarziali amarziali force-pushed the andrea.marziali/context-otel branch from 3245121 to 9c634ef Compare October 8, 2025 08:35
// fall-through and check for non-datadog span data
} else if (OTEL_CONTEXT_ROOT_SPAN_KEY.equals(key.toString())) {
AgentSpan span = AgentSpan.fromContext(delegate);
if (span != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add the same span.isValid() check here for consistency?

Copy link
Contributor Author

@amarziali amarziali Oct 8, 2025

Choose a reason for hiding this comment

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

I was unsure about this one but I'm happy that you reacted on this one. Perhaps yes if we want to have the caller method to be consistent about the returned value in all cases

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done in 1c997f9

@amarziali amarziali marked this pull request as ready for review October 8, 2025 09:41
@amarziali amarziali requested review from a team as code owners October 8, 2025 09:41
@amarziali amarziali requested review from cecile75 and removed request for a team October 8, 2025 09:41
Copy link
Contributor

github-actions bot commented Oct 8, 2025

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@amarziali amarziali added type: enhancement Enhancements and improvements inst: opentelemetry OpenTelemetry instrumentation labels Oct 8, 2025
@amarziali amarziali requested a review from mcculls October 8, 2025 11:58
Copy link
Contributor

@mcculls mcculls left a comment

Choose a reason for hiding this comment

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

Nice!

@PerfectSlayer PerfectSlayer self-requested a review October 9, 2025 09:51
Copy link
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

📝 notes: I tried to squeeze any data possible into an invalid span context to make sure we can't loose it from this change but OTel API will drop it before you get the chance to store it into a context. -- Methods like Span.wrap(), PropagatedSpan.create() will drop any invalid data info.

So the changes look good. Thanks for the fix @amarziali ! 👍
I pushed minor changes wrt to the test suites.

@PerfectSlayer
Copy link
Contributor

Updating PR description and attaching to the JIRA card

@amarziali amarziali enabled auto-merge (squash) October 16, 2025 11:12
Moving missing trace context to a dedicated test (not dependent on other propagation style as it concerns tracecontext only).
Adding more tests related to Span.fromContextOrNull() on span activation test suite.
@PerfectSlayer PerfectSlayer force-pushed the andrea.marziali/context-otel branch from 61accd3 to 66a1ee4 Compare October 16, 2025 13:10
@amarziali amarziali merged commit ca0e845 into master Oct 16, 2025
532 checks passed
@amarziali amarziali deleted the andrea.marziali/context-otel branch October 16, 2025 14:03
@github-actions github-actions bot added this to the 1.55.0 milestone Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: opentelemetry OpenTelemetry instrumentation type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants