Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - Prototyping context propagation API #8271

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

PerfectSlayer
Copy link
Contributor

What Does This Do

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@PerfectSlayer PerfectSlayer added the tag: do not merge Do not merge changes label Jan 23, 2025
Comment on lines 591 to 598
ExtractedSpan(AgentSpanContext spanContext) {
this.spanContext = spanContext;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Consider adding super() or this() to your constructor (...read more)

In Java, it is suggested to call super() in an extended class. This rule will report a violation if both a call to super() and an overloaded constructor are absent.

View in Datadog  Leave us feedback  Documentation

@PerfectSlayer PerfectSlayer force-pushed the bbujon/context-propagation branch from 017e5a4 to ddb0406 Compare January 23, 2025 09:54
@pr-commenter
Copy link

pr-commenter bot commented Jan 23, 2025

Kafka / producer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/context-propagation
git_commit_date 1738565038 1738680597
git_commit_sha 2a09977 1a1fb0a
See matching parameters
Baseline Candidate
ci_job_date 1738681832 1738681832
ci_job_id 793328308 793328308
ci_pipeline_id 54846488 54846488
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 same

@pr-commenter
Copy link

pr-commenter bot commented Jan 23, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/context-propagation
git_commit_date 1738664773 1738680597
git_commit_sha b9533be 1a1fb0a
release_version 1.47.0-SNAPSHOT~b9533be551 1.47.0-SNAPSHOT~1a1fb0a6c6
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1738683107 1738683107
ci_job_id 793328304 793328304
ci_pipeline_id 54846488 54846488
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-yk6jynms-project-304-concurrent-1-ehj7lt2z 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:50:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Linux runner-yk6jynms-project-304-concurrent-1-ehj7lt2z 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:50:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None
variant iast iast

Summary

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

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.47.0-SNAPSHOT~1a1fb0a6c6, baseline=1.47.0-SNAPSHOT~b9533be551

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.049 s) : 0, 1048874
Total [baseline] (8.67 s) : 0, 8670200
Agent [candidate] (1.045 s) : 0, 1044800
Total [candidate] (8.678 s) : 0, 8678130
section iast
Agent [baseline] (1.179 s) : 0, 1178949
Total [baseline] (9.205 s) : 0, 9205009
Agent [candidate] (1.168 s) : 0, 1168290
Total [candidate] (9.24 s) : 0, 9239709
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.172 s) : 0, 1171711
Total [baseline] (9.216 s) : 0, 9216136
Agent [candidate] (1.172 s) : 0, 1171995
Total [candidate] (9.222 s) : 0, 9221747
section iast_TELEMETRY_OFF
Agent [baseline] (1.17 s) : 0, 1170190
Total [baseline] (9.236 s) : 0, 9235905
Agent [candidate] (1.168 s) : 0, 1167768
Total [candidate] (9.242 s) : 0, 9241866
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.049 s -
Agent iast 1.179 s 130.076 ms (12.4%)
Agent iast_HARDCODED_SECRET_DISABLED 1.172 s 122.837 ms (11.7%)
Agent iast_TELEMETRY_OFF 1.17 s 121.317 ms (11.6%)
Total tracing 8.67 s -
Total iast 9.205 s 534.809 ms (6.2%)
Total iast_HARDCODED_SECRET_DISABLED 9.216 s 545.936 ms (6.3%)
Total iast_TELEMETRY_OFF 9.236 s 565.705 ms (6.5%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.045 s -
Agent iast 1.168 s 123.49 ms (11.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.172 s 127.195 ms (12.2%)
Agent iast_TELEMETRY_OFF 1.168 s 122.968 ms (11.8%)
Total tracing 8.678 s -
Total iast 9.24 s 561.579 ms (6.5%)
Total iast_HARDCODED_SECRET_DISABLED 9.222 s 543.617 ms (6.3%)
Total iast_TELEMETRY_OFF 9.242 s 563.736 ms (6.5%)
gantt
    title insecure-bank - break down per module: candidate=1.47.0-SNAPSHOT~1a1fb0a6c6, baseline=1.47.0-SNAPSHOT~b9533be551

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (719.632 ms) : 0, 719632
BytebuddyAgent [candidate] (717.536 ms) : 0, 717536
GlobalTracer [baseline] (244.045 ms) : 0, 244045
GlobalTracer [candidate] (243.305 ms) : 0, 243305
AppSec [baseline] (54.878 ms) : 0, 54878
AppSec [candidate] (56.289 ms) : 0, 56289
Remote Config [baseline] (717.186 µs) : 0, 717
Remote Config [candidate] (734.014 µs) : 0, 734
Telemetry [baseline] (14.361 ms) : 0, 14361
Telemetry [candidate] (11.667 ms) : 0, 11667
section iast
BytebuddyAgent [baseline] (839.282 ms) : 0, 839282
BytebuddyAgent [candidate] (833.48 ms) : 0, 833480
GlobalTracer [baseline] (235.387 ms) : 0, 235387
GlobalTracer [candidate] (230.751 ms) : 0, 230751
IAST [baseline] (24.145 ms) : 0, 24145
IAST [candidate] (24.233 ms) : 0, 24233
AppSec [baseline] (55.474 ms) : 0, 55474
AppSec [candidate] (55.416 ms) : 0, 55416
Remote Config [baseline] (623.482 µs) : 0, 623
Remote Config [candidate] (610.615 µs) : 0, 611
Telemetry [baseline] (8.756 ms) : 0, 8756
Telemetry [candidate] (8.661 ms) : 0, 8661
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (833.655 ms) : 0, 833655
BytebuddyAgent [candidate] (834.837 ms) : 0, 834837
GlobalTracer [baseline] (233.98 ms) : 0, 233980
GlobalTracer [candidate] (232.498 ms) : 0, 232498
IAST [baseline] (27.407 ms) : 0, 27407
IAST [candidate] (25.053 ms) : 0, 25053
AppSec [baseline] (52.121 ms) : 0, 52121
AppSec [candidate] (54.894 ms) : 0, 54894
Remote Config [baseline] (611.192 µs) : 0, 611
Remote Config [candidate] (610.454 µs) : 0, 610
Telemetry [baseline] (8.699 ms) : 0, 8699
Telemetry [candidate] (8.785 ms) : 0, 8785
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (832.248 ms) : 0, 832248
BytebuddyAgent [candidate] (832.276 ms) : 0, 832276
GlobalTracer [baseline] (234.236 ms) : 0, 234236
GlobalTracer [candidate] (231.784 ms) : 0, 231784
IAST [baseline] (26.998 ms) : 0, 26998
IAST [candidate] (25.261 ms) : 0, 25261
AppSec [baseline] (52.117 ms) : 0, 52117
AppSec [candidate] (53.941 ms) : 0, 53941
Remote Config [baseline] (607.322 µs) : 0, 607
Remote Config [candidate] (618.186 µs) : 0, 618
Telemetry [baseline] (8.691 ms) : 0, 8691
Telemetry [candidate] (8.665 ms) : 0, 8665
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.47.0-SNAPSHOT~1a1fb0a6c6, baseline=1.47.0-SNAPSHOT~b9533be551

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.044 s) : 0, 1043544
Total [baseline] (10.52 s) : 0, 10519633
Agent [candidate] (1.04 s) : 0, 1039684
Total [candidate] (10.492 s) : 0, 10491776
section appsec
Agent [baseline] (1.188 s) : 0, 1187618
Total [baseline] (10.748 s) : 0, 10747561
Agent [candidate] (1.188 s) : 0, 1187569
Total [candidate] (10.803 s) : 0, 10803228
section iast
Agent [baseline] (1.176 s) : 0, 1176100
Total [baseline] (10.991 s) : 0, 10990744
Agent [candidate] (1.171 s) : 0, 1170651
Total [candidate] (10.948 s) : 0, 10948073
section profiling
Agent [baseline] (1.263 s) : 0, 1262693
Total [baseline] (10.855 s) : 0, 10854592
Agent [candidate] (1.259 s) : 0, 1258607
Total [candidate] (10.923 s) : 0, 10923344
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.044 s -
Agent appsec 1.188 s 144.074 ms (13.8%)
Agent iast 1.176 s 132.556 ms (12.7%)
Agent profiling 1.263 s 219.149 ms (21.0%)
Total tracing 10.52 s -
Total appsec 10.748 s 227.928 ms (2.2%)
Total iast 10.991 s 471.111 ms (4.5%)
Total profiling 10.855 s 334.959 ms (3.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.04 s -
Agent appsec 1.188 s 147.885 ms (14.2%)
Agent iast 1.171 s 130.967 ms (12.6%)
Agent profiling 1.259 s 218.923 ms (21.1%)
Total tracing 10.492 s -
Total appsec 10.803 s 311.452 ms (3.0%)
Total iast 10.948 s 456.297 ms (4.3%)
Total profiling 10.923 s 431.568 ms (4.1%)
gantt
    title petclinic - break down per module: candidate=1.47.0-SNAPSHOT~1a1fb0a6c6, baseline=1.47.0-SNAPSHOT~b9533be551

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (715.801 ms) : 0, 715801
BytebuddyAgent [candidate] (715.066 ms) : 0, 715066
GlobalTracer [baseline] (243.81 ms) : 0, 243810
GlobalTracer [candidate] (240.59 ms) : 0, 240590
AppSec [baseline] (55.046 ms) : 0, 55046
AppSec [candidate] (55.785 ms) : 0, 55785
Remote Config [baseline] (726.154 µs) : 0, 726
Remote Config [candidate] (721.569 µs) : 0, 722
Telemetry [baseline] (12.908 ms) : 0, 12908
Telemetry [candidate] (12.357 ms) : 0, 12357
section appsec
BytebuddyAgent [baseline] (735.161 ms) : 0, 735161
BytebuddyAgent [candidate] (736.102 ms) : 0, 736102
GlobalTracer [baseline] (241.099 ms) : 0, 241099
GlobalTracer [candidate] (238.984 ms) : 0, 238984
AppSec [baseline] (176.212 ms) : 0, 176212
AppSec [candidate] (176.85 ms) : 0, 176850
Remote Config [baseline] (662.663 µs) : 0, 663
Remote Config [candidate] (654.319 µs) : 0, 654
Telemetry [baseline] (8.275 ms) : 0, 8275
Telemetry [candidate] (8.691 ms) : 0, 8691
IAST [baseline] (21.911 ms) : 0, 21911
IAST [candidate] (22.018 ms) : 0, 22018
section iast
BytebuddyAgent [baseline] (835.511 ms) : 0, 835511
BytebuddyAgent [candidate] (834.77 ms) : 0, 834770
GlobalTracer [baseline] (235.798 ms) : 0, 235798
GlobalTracer [candidate] (231.856 ms) : 0, 231856
AppSec [baseline] (55.004 ms) : 0, 55004
AppSec [candidate] (52.788 ms) : 0, 52788
Remote Config [baseline] (627.696 µs) : 0, 628
Remote Config [candidate] (611.634 µs) : 0, 612
Telemetry [baseline] (8.715 ms) : 0, 8715
Telemetry [candidate] (8.706 ms) : 0, 8706
IAST [baseline] (25.107 ms) : 0, 25107
IAST [candidate] (26.681 ms) : 0, 26681
section profiling
ProfilingAgent [baseline] (96.179 ms) : 0, 96179
ProfilingAgent [candidate] (95.638 ms) : 0, 95638
BytebuddyAgent [baseline] (705.846 ms) : 0, 705846
BytebuddyAgent [candidate] (705.964 ms) : 0, 705964
GlobalTracer [baseline] (353.334 ms) : 0, 353334
GlobalTracer [candidate] (350.722 ms) : 0, 350722
AppSec [baseline] (55.549 ms) : 0, 55549
AppSec [candidate] (54.497 ms) : 0, 54497
Remote Config [baseline] (706.988 µs) : 0, 707
Remote Config [candidate] (699.284 µs) : 0, 699
Telemetry [baseline] (8.899 ms) : 0, 8899
Telemetry [candidate] (8.885 ms) : 0, 8885
Profiling [baseline] (96.204 ms) : 0, 96204
Profiling [candidate] (95.662 ms) : 0, 95662
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-02-04T15:03:52 2025-02-04T15:10:55
git_branch master bbujon/context-propagation
git_commit_date 1738664773 1738680597
git_commit_sha b9533be 1a1fb0a
release_version 1.47.0-SNAPSHOT~b9533be551 1.47.0-SNAPSHOT~1a1fb0a6c6
start_time 2025-02-04T15:03:38 2025-02-04T15:10:41
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1738682212 1738682212
ci_job_id 793328305 793328305
ci_pipeline_id 54846488 54846488
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-yv4uugyy-project-304-concurrent-0-z0s4x29q 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:50:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Linux runner-yv4uugyy-project-304-concurrent-0-z0s4x29q 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:50:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
variant iast iast

Summary

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

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.47.0-SNAPSHOT~1a1fb0a6c6, baseline=1.47.0-SNAPSHOT~b9533be551
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.349 ms) : 1329, 1368
.   : milestone, 1349,
appsec (1.747 ms) : 1723, 1771
.   : milestone, 1747,
appsec_no_iast (1.745 ms) : 1721, 1770
.   : milestone, 1745,
iast (1.516 ms) : 1492, 1539
.   : milestone, 1516,
profiling (1.549 ms) : 1524, 1573
.   : milestone, 1549,
tracing (1.482 ms) : 1457, 1508
.   : milestone, 1482,
section candidate
no_agent (1.361 ms) : 1341, 1381
.   : milestone, 1361,
appsec (1.733 ms) : 1709, 1756
.   : milestone, 1733,
appsec_no_iast (1.757 ms) : 1734, 1781
.   : milestone, 1757,
iast (1.506 ms) : 1482, 1531
.   : milestone, 1506,
profiling (1.513 ms) : 1488, 1537
.   : milestone, 1513,
tracing (1.476 ms) : 1451, 1502
.   : milestone, 1476,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.349 ms [1.329 ms, 1.368 ms] -
appsec 1.747 ms [1.723 ms, 1.771 ms] 397.768 µs (29.5%)
appsec_no_iast 1.745 ms [1.721 ms, 1.77 ms] 396.423 µs (29.4%)
iast 1.516 ms [1.492 ms, 1.539 ms] 166.636 µs (12.4%)
profiling 1.549 ms [1.524 ms, 1.573 ms] 199.71 µs (14.8%)
tracing 1.482 ms [1.457 ms, 1.508 ms] 133.269 µs (9.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.361 ms [1.341 ms, 1.381 ms] -
appsec 1.733 ms [1.709 ms, 1.756 ms] 371.886 µs (27.3%)
appsec_no_iast 1.757 ms [1.734 ms, 1.781 ms] 396.675 µs (29.2%)
iast 1.506 ms [1.482 ms, 1.531 ms] 145.849 µs (10.7%)
profiling 1.513 ms [1.488 ms, 1.537 ms] 151.942 µs (11.2%)
tracing 1.476 ms [1.451 ms, 1.502 ms] 115.646 µs (8.5%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.47.0-SNAPSHOT~1a1fb0a6c6, baseline=1.47.0-SNAPSHOT~b9533be551
    dateFormat X
    axisFormat %s
section baseline
no_agent (374.66 µs) : 354, 395
.   : milestone, 375,
iast (497.765 µs) : 476, 519
.   : milestone, 498,
iast_FULL (739.958 µs) : 718, 762
.   : milestone, 740,
iast_GLOBAL (551.175 µs) : 529, 573
.   : milestone, 551,
iast_HARDCODED_SECRET_DISABLED (502.862 µs) : 481, 524
.   : milestone, 503,
iast_INACTIVE (455.485 µs) : 434, 477
.   : milestone, 455,
iast_TELEMETRY_OFF (493.569 µs) : 471, 516
.   : milestone, 494,
tracing (449.299 µs) : 428, 470
.   : milestone, 449,
section candidate
no_agent (375.192 µs) : 355, 396
.   : milestone, 375,
iast (506.447 µs) : 483, 530
.   : milestone, 506,
iast_FULL (739.54 µs) : 718, 761
.   : milestone, 740,
iast_GLOBAL (548.665 µs) : 526, 571
.   : milestone, 549,
iast_HARDCODED_SECRET_DISABLED (509.185 µs) : 486, 532
.   : milestone, 509,
iast_INACTIVE (463.902 µs) : 442, 486
.   : milestone, 464,
iast_TELEMETRY_OFF (493.094 µs) : 471, 515
.   : milestone, 493,
tracing (447.059 µs) : 427, 467
.   : milestone, 447,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 374.66 µs [354.121 µs, 395.2 µs] -
iast 497.765 µs [476.279 µs, 519.25 µs] 123.104 µs (32.9%)
iast_FULL 739.958 µs [718.152 µs, 761.764 µs] 365.297 µs (97.5%)
iast_GLOBAL 551.175 µs [529.466 µs, 572.884 µs] 176.515 µs (47.1%)
iast_HARDCODED_SECRET_DISABLED 502.862 µs [481.461 µs, 524.262 µs] 128.201 µs (34.2%)
iast_INACTIVE 455.485 µs [434.156 µs, 476.815 µs] 80.825 µs (21.6%)
iast_TELEMETRY_OFF 493.569 µs [471.312 µs, 515.825 µs] 118.908 µs (31.7%)
tracing 449.299 µs [428.457 µs, 470.141 µs] 74.639 µs (19.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 375.192 µs [354.802 µs, 395.582 µs] -
iast 506.447 µs [483.282 µs, 529.611 µs] 131.254 µs (35.0%)
iast_FULL 739.54 µs [717.606 µs, 761.474 µs] 364.347 µs (97.1%)
iast_GLOBAL 548.665 µs [526.157 µs, 571.174 µs] 173.473 µs (46.2%)
iast_HARDCODED_SECRET_DISABLED 509.185 µs [486.044 µs, 532.325 µs] 133.992 µs (35.7%)
iast_INACTIVE 463.902 µs [442.28 µs, 485.523 µs] 88.709 µs (23.6%)
iast_TELEMETRY_OFF 493.094 µs [471.148 µs, 515.04 µs] 117.902 µs (31.4%)
tracing 447.059 µs [426.624 µs, 467.494 µs] 71.867 µs (19.2%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/context-propagation
git_commit_date 1738664773 1738680597
git_commit_sha b9533be 1a1fb0a
release_version 1.47.0-SNAPSHOT~b9533be551 1.47.0-SNAPSHOT~1a1fb0a6c6
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1738682668 1738682668
ci_job_id 793328306 793328306
ci_pipeline_id 54846488 54846488
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-hf2spk2o-project-304-concurrent-1-q5477lqx 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:50:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Linux runner-hf2spk2o-project-304-concurrent-1-q5477lqx 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:50:46 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
variant appsec appsec

Summary

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

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.47.0-SNAPSHOT~1a1fb0a6c6, baseline=1.47.0-SNAPSHOT~b9533be551
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.862 s) : 14862000, 14862000
.   : milestone, 14862000,
appsec (15.038 s) : 15038000, 15038000
.   : milestone, 15038000,
iast (18.631 s) : 18631000, 18631000
.   : milestone, 18631000,
iast_GLOBAL (17.61 s) : 17610000, 17610000
.   : milestone, 17610000,
profiling (15.616 s) : 15616000, 15616000
.   : milestone, 15616000,
tracing (14.673 s) : 14673000, 14673000
.   : milestone, 14673000,
section candidate
no_agent (15.633 s) : 15633000, 15633000
.   : milestone, 15633000,
appsec (15.203 s) : 15203000, 15203000
.   : milestone, 15203000,
iast (19.175 s) : 19175000, 19175000
.   : milestone, 19175000,
iast_GLOBAL (18.114 s) : 18114000, 18114000
.   : milestone, 18114000,
profiling (14.803 s) : 14803000, 14803000
.   : milestone, 14803000,
tracing (14.78 s) : 14780000, 14780000
.   : milestone, 14780000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.862 s [14.862 s, 14.862 s] -
appsec 15.038 s [15.038 s, 15.038 s] 176.0 ms (1.2%)
iast 18.631 s [18.631 s, 18.631 s] 3.769 s (25.4%)
iast_GLOBAL 17.61 s [17.61 s, 17.61 s] 2.748 s (18.5%)
profiling 15.616 s [15.616 s, 15.616 s] 754.0 ms (5.1%)
tracing 14.673 s [14.673 s, 14.673 s] -189.0 ms (-1.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.633 s [15.633 s, 15.633 s] -
appsec 15.203 s [15.203 s, 15.203 s] -430.0 ms (-2.8%)
iast 19.175 s [19.175 s, 19.175 s] 3.542 s (22.7%)
iast_GLOBAL 18.114 s [18.114 s, 18.114 s] 2.481 s (15.9%)
profiling 14.803 s [14.803 s, 14.803 s] -830.0 ms (-5.3%)
tracing 14.78 s [14.78 s, 14.78 s] -853.0 ms (-5.5%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.47.0-SNAPSHOT~1a1fb0a6c6, baseline=1.47.0-SNAPSHOT~b9533be551
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.474 ms) : 1463, 1486
.   : milestone, 1474,
appsec (2.368 ms) : 2325, 2411
.   : milestone, 2368,
iast (2.1 ms) : 2045, 2154
.   : milestone, 2100,
iast_GLOBAL (2.151 ms) : 2096, 2206
.   : milestone, 2151,
profiling (1.958 ms) : 1915, 2001
.   : milestone, 1958,
tracing (1.95 ms) : 1908, 1992
.   : milestone, 1950,
section candidate
no_agent (1.471 ms) : 1460, 1483
.   : milestone, 1471,
appsec (2.369 ms) : 2325, 2412
.   : milestone, 2369,
iast (2.101 ms) : 2047, 2156
.   : milestone, 2101,
iast_GLOBAL (2.147 ms) : 2093, 2202
.   : milestone, 2147,
profiling (1.988 ms) : 1943, 2032
.   : milestone, 1988,
tracing (1.947 ms) : 1905, 1989
.   : milestone, 1947,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.474 ms [1.463 ms, 1.486 ms] -
appsec 2.368 ms [2.325 ms, 2.411 ms] 893.728 µs (60.6%)
iast 2.1 ms [2.045 ms, 2.154 ms] 625.305 µs (42.4%)
iast_GLOBAL 2.151 ms [2.096 ms, 2.206 ms] 676.876 µs (45.9%)
profiling 1.958 ms [1.915 ms, 2.001 ms] 483.539 µs (32.8%)
tracing 1.95 ms [1.908 ms, 1.992 ms] 475.513 µs (32.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.471 ms [1.46 ms, 1.483 ms] -
appsec 2.369 ms [2.325 ms, 2.412 ms] 897.245 µs (61.0%)
iast 2.101 ms [2.047 ms, 2.156 ms] 629.821 µs (42.8%)
iast_GLOBAL 2.147 ms [2.093 ms, 2.202 ms] 676.023 µs (45.9%)
profiling 1.988 ms [1.943 ms, 2.032 ms] 516.336 µs (35.1%)
tracing 1.947 ms [1.905 ms, 1.989 ms] 475.799 µs (32.3%)

@pr-commenter
Copy link

pr-commenter bot commented Jan 23, 2025

Kafka / consumer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/context-propagation
git_commit_date 1738565038 1738680597
git_commit_sha 2a09977 1a1fb0a
See matching parameters
Baseline Candidate
ci_job_date 1738681870 1738681870
ci_job_id 793328309 793328309
ci_pipeline_id 54846488 54846488
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/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 same
scenario:only-tracing-dsm-enabled-benchmarks/KafkaConsumerBenchmark.benchConsume same

@PerfectSlayer PerfectSlayer force-pushed the bbujon/context-propagation branch 9 times, most recently from 7ff13cb to b9bb806 Compare January 28, 2025 17:12
@PerfectSlayer PerfectSlayer force-pushed the bbujon/context-propagation branch from b9bb806 to 7d1167d Compare January 30, 2025 13:21
void set(C carrier, String key, String value);
}

<C> AgentSpanContext.Extracted extract(C carrier, ContextVisitor<C> getter);
default <C> AgentSpanContext.Extracted extract(final C carrier, final ContextVisitor<C> getter) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
default <C> AgentSpanContext.Extracted extract(final C carrier, final ContextVisitor<C> getter) {
default <C> AgentSpanContext.Extracted extract(C carrier, final ContextVisitor<C> getter) {
Avoid declaring as final as it may not be used (...read more)

The rule "Avoid useless final type in interface method" advises against the unnecessary use of the final keyword in the method parameters of an interface. In Java, the final keyword is used to denote that a variable cannot be changed once assigned. However, in the context of an interface method, this is redundant as the value of the parameter cannot be changed within the method anyway.

The importance of this rule lies in the clarity and simplicity of code. Unnecessary use of final in this context can lead to confusion for those reading the code, as it suggests that there may be a specific reason for its use when there is not. It can also clutter the code, making it less readable.

Good coding practices to avoid this rule violation include simply not using the final keyword in the method parameters of an interface. This does not affect the functionality of the code, but it makes it cleaner and easier to understand. For example, instead of writing void process(final Object arg);, you can write void process(Object arg);. This maintains the same functionality but improves the readability of the code.

View in Datadog  Leave us feedback  Documentation

return span.with(dsmContext);
}

private LinkedHashMap<String, String> getTags(String queueUrl) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
private LinkedHashMap<String, String> getTags(String queueUrl) {
private Map<String, String> getTags(String queueUrl) {
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation

}

public static DataStreamContext fromTagsWithoutCheckpoint(
LinkedHashMap<String, String> sortedTags) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
LinkedHashMap<String, String> sortedTags) {
Map<String, String> sortedTags) {
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation

return context.get(CONTEXT_KEY);
}

public static DataStreamContext fromTags(LinkedHashMap<String, String> sortedTags) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
public static DataStreamContext fromTags(LinkedHashMap<String, String> sortedTags) {
public static DataStreamContext fromTags(Map<String, String> sortedTags) {
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation

private static final ContextKey<DataStreamContext> CONTEXT_KEY =
ContextKey.named("dsm-context-key");

final LinkedHashMap<String, String> sortedTags;
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
final LinkedHashMap<String, String> sortedTags;
final Map<String, String> sortedTags;
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation


// That's basically a record for now
private DataStreamContext(
LinkedHashMap<String, String> sortedTags,
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
LinkedHashMap<String, String> sortedTags,
Map<String, String> sortedTags,
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation

…tracer

Introduce Java 8 bytecode bridge
Remove unused eligibleForDropping method
Improve Javadoc
@PerfectSlayer PerfectSlayer force-pushed the bbujon/context-propagation branch from 7d1167d to cb598c9 Compare February 3, 2025 08:31
public static final class Context extends NoopSpanContext {
public static final Context INSTANCE = new Context();

private Context() {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Consider adding super() or this() to your constructor (...read more)

In Java, it is suggested to call super() in an extended class. This rule will report a violation if both a call to super() and an overloaded constructor are absent.

View in Datadog  Leave us feedback  Documentation

Comment on lines +9 to +11
public BlackHoleSpan(final DDTraceId traceId) {
this.traceId = traceId;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Consider adding super() or this() to your constructor (...read more)

In Java, it is suggested to call super() in an extended class. This rule will report a violation if both a call to super() and an overloaded constructor are absent.

View in Datadog  Leave us feedback  Documentation

Comment on lines +19 to +21
ExtractedSpan(AgentSpanContext spanContext) {
this.spanContext = spanContext;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Consider adding super() or this() to your constructor (...read more)

In Java, it is suggested to call super() in an extended class. This rule will report a violation if both a call to super() and an overloaded constructor are absent.

View in Datadog  Leave us feedback  Documentation

class NoopSpan extends ImmutableSpan implements AgentSpan {
static final NoopSpan INSTANCE = new NoopSpan();

NoopSpan() {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Consider adding super() or this() to your constructor (...read more)

In Java, it is suggested to call super() in an extended class. This rule will report a violation if both a call to super() and an overloaded constructor are absent.

View in Datadog  Leave us feedback  Documentation

@PerfectSlayer PerfectSlayer force-pushed the bbujon/context-propagation branch from cb598c9 to 3f7c076 Compare February 3, 2025 09:25

// That's basically a record for now
private DataStreamsContext(
LinkedHashMap<String, String> sortedTags,
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
LinkedHashMap<String, String> sortedTags,
Map<String, String> sortedTags,
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation

return context.get(CONTEXT_KEY);
}

public static DataStreamsContext fromTags(LinkedHashMap<String, String> sortedTags) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
public static DataStreamsContext fromTags(LinkedHashMap<String, String> sortedTags) {
public static DataStreamsContext fromTags(Map<String, String> sortedTags) {
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation

}

public static DataStreamsContext fromTagsWithoutCheckpoint(
LinkedHashMap<String, String> sortedTags) {
Copy link
Contributor

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 bot Feb 3, 2025

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
LinkedHashMap<String, String> sortedTags) {
Map<String, String> sortedTags, long defaultTimestamp, long payloadSizeBytes) {
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation

this.sendCheckpoint = sendCheckpoint;
}

public LinkedHashMap<String, String> sortedTags() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
public LinkedHashMap<String, String> sortedTags() {
public Map<String, String> sortedTags() {
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation

private static final ContextKey<DataStreamsContext> CONTEXT_KEY =
ContextKey.named("dsm-context-key");

final LinkedHashMap<String, String> sortedTags;
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
final LinkedHashMap<String, String> sortedTags;
final Map<String, String> sortedTags;
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation

@PerfectSlayer PerfectSlayer force-pushed the bbujon/context-propagation branch from 3f7c076 to 28914b5 Compare February 3, 2025 10:29

@Override
public void setCheckpoint(
LinkedHashMap<String, String> sortedTags,
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
LinkedHashMap<String, String> sortedTags,
Map<String, String> sortedTags,
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation

@Override
public void setCheckpoint(
AgentSpan span,
LinkedHashMap<String, String> sortedTags,
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
LinkedHashMap<String, String> sortedTags,
Map<String, String> sortedTags,
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation


@Override
public void setCheckpoint(
LinkedHashMap<String, String> sortedTags, Consumer<StatsPoint> pointConsumer) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
LinkedHashMap<String, String> sortedTags, Consumer<StatsPoint> pointConsumer) {}
Map<String, String> sortedTags, Consumer<StatsPoint> pointConsumer) {}
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation

public static final NoopDataStreamsMonitoring INSTANCE = new NoopDataStreamsMonitoring();

@Override
public void trackBacklog(LinkedHashMap<String, String> sortedTags, long value) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
public void trackBacklog(LinkedHashMap<String, String> sortedTags, long value) {}
public void trackBacklog(Map<String, String> sortedTags, long value) {}
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation

* @return the created context.
*/
public static DataStreamsContext create(
LinkedHashMap<String, String> sortedTags, long defaultTimestamp, long payloadSizeBytes) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Code Quality Violation

Suggested change
LinkedHashMap<String, String> sortedTags, long defaultTimestamp, long payloadSizeBytes) {
Map<String, String> sortedTags, long defaultTimestamp, long payloadSizeBytes) {
Avoid using a specific implementation type; use the more general Map instead (...read more)

Relying on particular implementation types, such as, HashSet or LinkedList can limit your adaptability to embrace alternative implementations in the future, particularly as your requirements change and your code needs to undergo changes.

It is recommended to opt for general types such as Set or List when declaring variables and parameters.

View in Datadog  Leave us feedback  Documentation

@PerfectSlayer PerfectSlayer force-pushed the bbujon/context-propagation branch from f5e6dc1 to a4c1e16 Compare February 4, 2025 12:35
@PerfectSlayer PerfectSlayer force-pushed the bbujon/context-propagation branch from a4c1e16 to 1a1fb0a Compare February 4, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag: do not merge Do not merge changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant