Skip to content

Conversation

dougqh
Copy link
Contributor

@dougqh dougqh commented Jan 21, 2025

What Does This Do

Previously, I updated this code to be case-insensitive. In doing so, I introduced a call to String.toLowerCase which had a negative impact on response time and allocation.

By switching to TreeMap, I was able to use String::compareToIgnoreCase which avoids the allocation and has a better average complexity than String::toLowerCase.

Motivation

This change provides a 1-1.5% improvement in span creation throughput stress tests.

Previously, I updated this code to be case-insensitive.

In doing so, I introduced a call to String.toLowerCase which had a negative impact on response time and allocation.

By switching to TreeMap, I can use String::compareToIgnoreCase which avoids the allocation and has a better average complexity than toLowerCase.

This change provides a 1-1.5% improvement in a span creation throughput stress tests.
@dougqh dougqh requested a review from a team as a code owner January 21, 2025 21:24
@dougqh dougqh requested a review from ygree January 21, 2025 21:24
Copy link
Contributor

github-actions bot commented Jan 21, 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.

@dougqh dougqh added tag: performance Performance related changes comp: core Tracer core labels Jan 22, 2025
@dougqh dougqh changed the title Small improvement to agent feedback sampling Overhead improvement to agent feedback based sampling Jan 22, 2025
@dougqh dougqh added the type: enhancement Enhancements and improvements label Jan 22, 2025
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.

Good catch

@pr-commenter
Copy link

pr-commenter bot commented Jan 23, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master datadog/trace-agent-sampling-feedback-optimization
git_commit_date 1737985869 1737986136
git_commit_sha c58164b 7341990
release_version 1.46.0-SNAPSHOT~c58164b25d 1.46.0-SNAPSHOT~73419906f3
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1737988604 1737988604
ci_job_id 781455901 781455901
ci_pipeline_id 54055781 54055781
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-h9qrujh-project-304-concurrent-1-yryj7pzp 6.8.0-1018-aws #19~22.04.1-Ubuntu SMP Wed Oct 9 16:48:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Linux runner-h9qrujh-project-304-concurrent-1-yryj7pzp 6.8.0-1018-aws #19~22.04.1-Ubuntu SMP Wed Oct 9 16:48:22 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 59 metrics, 4 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.46.0-SNAPSHOT~73419906f3, baseline=1.46.0-SNAPSHOT~c58164b25d

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.037 s) : 0, 1036680
Total [baseline] (10.43 s) : 0, 10430277
Agent [candidate] (1.037 s) : 0, 1036780
Total [candidate] (10.475 s) : 0, 10475054
section appsec
Agent [baseline] (1.186 s) : 0, 1185587
Total [baseline] (10.803 s) : 0, 10802784
Agent [candidate] (1.185 s) : 0, 1184645
Total [candidate] (10.774 s) : 0, 10773878
section iast
Agent [baseline] (1.168 s) : 0, 1167790
Total [baseline] (10.944 s) : 0, 10944350
Agent [candidate] (1.169 s) : 0, 1168507
Total [candidate] (10.988 s) : 0, 10987800
section profiling
Agent [baseline] (1.255 s) : 0, 1254589
Total [baseline] (10.844 s) : 0, 10843818
Agent [candidate] (1.257 s) : 0, 1257284
Total [candidate] (10.799 s) : 0, 10799029
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.037 s -
Agent appsec 1.186 s 148.907 ms (14.4%)
Agent iast 1.168 s 131.111 ms (12.6%)
Agent profiling 1.255 s 217.909 ms (21.0%)
Total tracing 10.43 s -
Total appsec 10.803 s 372.507 ms (3.6%)
Total iast 10.944 s 514.073 ms (4.9%)
Total profiling 10.844 s 413.541 ms (4.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.037 s -
Agent appsec 1.185 s 147.864 ms (14.3%)
Agent iast 1.169 s 131.727 ms (12.7%)
Agent profiling 1.257 s 220.503 ms (21.3%)
Total tracing 10.475 s -
Total appsec 10.774 s 298.824 ms (2.9%)
Total iast 10.988 s 512.747 ms (4.9%)
Total profiling 10.799 s 323.976 ms (3.1%)
gantt
    title petclinic - break down per module: candidate=1.46.0-SNAPSHOT~73419906f3, baseline=1.46.0-SNAPSHOT~c58164b25d

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (714.675 ms) : 0, 714675
BytebuddyAgent [candidate] (713.945 ms) : 0, 713945
GlobalTracer [baseline] (238.722 ms) : 0, 238722
GlobalTracer [candidate] (238.829 ms) : 0, 238829
AppSec [baseline] (55.786 ms) : 0, 55786
AppSec [candidate] (54.938 ms) : 0, 54938
Remote Config [baseline] (726.997 µs) : 0, 727
Remote Config [candidate] (712.462 µs) : 0, 712
Telemetry [baseline] (11.52 ms) : 0, 11520
Telemetry [candidate] (13.11 ms) : 0, 13110
section appsec
BytebuddyAgent [baseline] (736.247 ms) : 0, 736247
BytebuddyAgent [candidate] (736.418 ms) : 0, 736418
GlobalTracer [baseline] (237.478 ms) : 0, 237478
GlobalTracer [candidate] (236.799 ms) : 0, 236799
AppSec [baseline] (177.539 ms) : 0, 177539
AppSec [candidate] (176.618 ms) : 0, 176618
Remote Config [baseline] (676.327 µs) : 0, 676
Remote Config [candidate] (673.821 µs) : 0, 674
Telemetry [baseline] (8.567 ms) : 0, 8567
Telemetry [candidate] (8.986 ms) : 0, 8986
IAST [baseline] (19.489 ms) : 0, 19489
IAST [candidate] (19.506 ms) : 0, 19506
section iast
BytebuddyAgent [baseline] (833.7 ms) : 0, 833700
BytebuddyAgent [candidate] (834.007 ms) : 0, 834007
GlobalTracer [baseline] (230.176 ms) : 0, 230176
GlobalTracer [candidate] (229.851 ms) : 0, 229851
AppSec [baseline] (57.988 ms) : 0, 57988
AppSec [candidate] (58.283 ms) : 0, 58283
Remote Config [baseline] (647.953 µs) : 0, 648
Remote Config [candidate] (667.271 µs) : 0, 667
Telemetry [baseline] (8.668 ms) : 0, 8668
Telemetry [candidate] (8.758 ms) : 0, 8758
IAST [baseline] (21.296 ms) : 0, 21296
IAST [candidate] (21.594 ms) : 0, 21594
section profiling
ProfilingAgent [baseline] (95.26 ms) : 0, 95260
ProfilingAgent [candidate] (95.702 ms) : 0, 95702
BytebuddyAgent [baseline] (704.098 ms) : 0, 704098
BytebuddyAgent [candidate] (706.582 ms) : 0, 706582
GlobalTracer [baseline] (348.572 ms) : 0, 348572
GlobalTracer [candidate] (348.795 ms) : 0, 348795
AppSec [baseline] (54.936 ms) : 0, 54936
AppSec [candidate] (54.039 ms) : 0, 54039
Remote Config [baseline] (711.391 µs) : 0, 711
Remote Config [candidate] (732.838 µs) : 0, 733
Telemetry [baseline] (8.827 ms) : 0, 8827
Telemetry [candidate] (8.896 ms) : 0, 8896
Profiling [baseline] (95.285 ms) : 0, 95285
Profiling [candidate] (95.726 ms) : 0, 95726
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.46.0-SNAPSHOT~73419906f3, baseline=1.46.0-SNAPSHOT~c58164b25d

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.038 s) : 0, 1038249
Total [baseline] (8.654 s) : 0, 8654247
Agent [candidate] (1.041 s) : 0, 1040781
Total [candidate] (8.649 s) : 0, 8649231
section iast
Agent [baseline] (1.17 s) : 0, 1170112
Total [baseline] (9.204 s) : 0, 9203748
Agent [candidate] (1.167 s) : 0, 1167147
Total [candidate] (9.229 s) : 0, 9228590
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.166 s) : 0, 1165599
Total [baseline] (9.18 s) : 0, 9180096
Agent [candidate] (1.166 s) : 0, 1166157
Total [candidate] (9.166 s) : 0, 9165736
section iast_TELEMETRY_OFF
Agent [baseline] (1.16 s) : 0, 1160260
Total [baseline] (9.212 s) : 0, 9211609
Agent [candidate] (1.163 s) : 0, 1163257
Total [candidate] (9.222 s) : 0, 9221596
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.038 s -
Agent iast 1.17 s 131.864 ms (12.7%)
Agent iast_HARDCODED_SECRET_DISABLED 1.166 s 127.35 ms (12.3%)
Agent iast_TELEMETRY_OFF 1.16 s 122.011 ms (11.8%)
Total tracing 8.654 s -
Total iast 9.204 s 549.501 ms (6.3%)
Total iast_HARDCODED_SECRET_DISABLED 9.18 s 525.849 ms (6.1%)
Total iast_TELEMETRY_OFF 9.212 s 557.362 ms (6.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.041 s -
Agent iast 1.167 s 126.366 ms (12.1%)
Agent iast_HARDCODED_SECRET_DISABLED 1.166 s 125.375 ms (12.0%)
Agent iast_TELEMETRY_OFF 1.163 s 122.475 ms (11.8%)
Total tracing 8.649 s -
Total iast 9.229 s 579.36 ms (6.7%)
Total iast_HARDCODED_SECRET_DISABLED 9.166 s 516.505 ms (6.0%)
Total iast_TELEMETRY_OFF 9.222 s 572.365 ms (6.6%)
gantt
    title insecure-bank - break down per module: candidate=1.46.0-SNAPSHOT~73419906f3, baseline=1.46.0-SNAPSHOT~c58164b25d

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (714.751 ms) : 0, 714751
BytebuddyAgent [candidate] (715.165 ms) : 0, 715165
GlobalTracer [baseline] (238.918 ms) : 0, 238918
GlobalTracer [candidate] (239.467 ms) : 0, 239467
AppSec [baseline] (54.943 ms) : 0, 54943
AppSec [candidate] (55.855 ms) : 0, 55855
Remote Config [baseline] (704.218 µs) : 0, 704
Remote Config [candidate] (718.702 µs) : 0, 719
Telemetry [baseline] (13.718 ms) : 0, 13718
Telemetry [candidate] (14.28 ms) : 0, 14280
section iast
BytebuddyAgent [baseline] (836.599 ms) : 0, 836599
BytebuddyAgent [candidate] (833.411 ms) : 0, 833411
GlobalTracer [baseline] (228.99 ms) : 0, 228990
GlobalTracer [candidate] (229.336 ms) : 0, 229336
AppSec [baseline] (58.394 ms) : 0, 58394
AppSec [candidate] (58.13 ms) : 0, 58130
IAST [baseline] (21.391 ms) : 0, 21391
IAST [candidate] (21.501 ms) : 0, 21501
Remote Config [baseline] (652.549 µs) : 0, 653
Remote Config [candidate] (658.542 µs) : 0, 659
Telemetry [baseline] (8.746 ms) : 0, 8746
Telemetry [candidate] (8.746 ms) : 0, 8746
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (832.721 ms) : 0, 832721
BytebuddyAgent [candidate] (832.558 ms) : 0, 832558
GlobalTracer [baseline] (228.703 ms) : 0, 228703
GlobalTracer [candidate] (229.186 ms) : 0, 229186
AppSec [baseline] (58.333 ms) : 0, 58333
AppSec [candidate] (58.314 ms) : 0, 58314
IAST [baseline] (21.178 ms) : 0, 21178
IAST [candidate] (21.368 ms) : 0, 21368
Remote Config [baseline] (652.377 µs) : 0, 652
Remote Config [candidate] (661.765 µs) : 0, 662
Telemetry [baseline] (8.725 ms) : 0, 8725
Telemetry [candidate] (8.775 ms) : 0, 8775
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (827.725 ms) : 0, 827725
BytebuddyAgent [candidate] (830.117 ms) : 0, 830117
GlobalTracer [baseline] (228.55 ms) : 0, 228550
GlobalTracer [candidate] (229.356 ms) : 0, 229356
AppSec [baseline] (58.375 ms) : 0, 58375
AppSec [candidate] (58.224 ms) : 0, 58224
IAST [baseline] (21.052 ms) : 0, 21052
IAST [candidate] (20.968 ms) : 0, 20968
Remote Config [baseline] (667.017 µs) : 0, 667
Remote Config [candidate] (649.895 µs) : 0, 650
Telemetry [baseline] (8.624 ms) : 0, 8624
Telemetry [candidate] (8.676 ms) : 0, 8676
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-01-27T14:06:38 2025-01-27T14:13:40
git_branch master datadog/trace-agent-sampling-feedback-optimization
git_commit_date 1737985869 1737986136
git_commit_sha c58164b 7341990
release_version 1.46.0-SNAPSHOT~c58164b25d 1.46.0-SNAPSHOT~73419906f3
start_time 2025-01-27T14:06:24 2025-01-27T14:13:26
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1737987577 1737987577
ci_job_id 781455902 781455902
ci_pipeline_id 54055781 54055781
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-h9qrujh-project-304-concurrent-2-zg0sw155 6.8.0-1018-aws #19~22.04.1-Ubuntu SMP Wed Oct 9 16:48:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Linux runner-h9qrujh-project-304-concurrent-2-zg0sw155 6.8.0-1018-aws #19~22.04.1-Ubuntu SMP Wed Oct 9 16:48:22 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 11 metrics, 17 unstable metrics.

Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~73419906f3, baseline=1.46.0-SNAPSHOT~c58164b25d
    dateFormat X
    axisFormat %s
section baseline
no_agent (372.862 µs) : 353, 392
.   : milestone, 373,
iast (502.836 µs) : 480, 526
.   : milestone, 503,
iast_FULL (737.344 µs) : 716, 759
.   : milestone, 737,
iast_GLOBAL (548.472 µs) : 525, 572
.   : milestone, 548,
iast_HARDCODED_SECRET_DISABLED (504.275 µs) : 481, 527
.   : milestone, 504,
iast_INACTIVE (456.598 µs) : 435, 478
.   : milestone, 457,
iast_TELEMETRY_OFF (495.098 µs) : 472, 518
.   : milestone, 495,
tracing (451.719 µs) : 430, 473
.   : milestone, 452,
section candidate
no_agent (372.912 µs) : 353, 393
.   : milestone, 373,
iast (506.121 µs) : 482, 530
.   : milestone, 506,
iast_FULL (737.873 µs) : 715, 761
.   : milestone, 738,
iast_GLOBAL (550.367 µs) : 528, 573
.   : milestone, 550,
iast_HARDCODED_SECRET_DISABLED (506.022 µs) : 483, 530
.   : milestone, 506,
iast_INACTIVE (454.698 µs) : 434, 476
.   : milestone, 455,
iast_TELEMETRY_OFF (490.233 µs) : 469, 512
.   : milestone, 490,
tracing (448.78 µs) : 428, 470
.   : milestone, 449,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 372.862 µs [353.251 µs, 392.473 µs] -
iast 502.836 µs [479.896 µs, 525.776 µs] 129.974 µs (34.9%)
iast_FULL 737.344 µs [715.514 µs, 759.174 µs] 364.482 µs (97.8%)
iast_GLOBAL 548.472 µs [525.249 µs, 571.696 µs] 175.611 µs (47.1%)
iast_HARDCODED_SECRET_DISABLED 504.275 µs [481.243 µs, 527.307 µs] 131.413 µs (35.2%)
iast_INACTIVE 456.598 µs [435.083 µs, 478.114 µs] 83.737 µs (22.5%)
iast_TELEMETRY_OFF 495.098 µs [471.779 µs, 518.418 µs] 122.237 µs (32.8%)
tracing 451.719 µs [430.398 µs, 473.04 µs] 78.857 µs (21.1%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 372.912 µs [352.922 µs, 392.901 µs] -
iast 506.121 µs [482.413 µs, 529.829 µs] 133.209 µs (35.7%)
iast_FULL 737.873 µs [715.114 µs, 760.633 µs] 364.962 µs (97.9%)
iast_GLOBAL 550.367 µs [528.017 µs, 572.717 µs] 177.455 µs (47.6%)
iast_HARDCODED_SECRET_DISABLED 506.022 µs [482.526 µs, 529.518 µs] 133.11 µs (35.7%)
iast_INACTIVE 454.698 µs [433.662 µs, 475.733 µs] 81.786 µs (21.9%)
iast_TELEMETRY_OFF 490.233 µs [468.96 µs, 511.506 µs] 117.321 µs (31.5%)
tracing 448.78 µs [427.655 µs, 469.905 µs] 75.868 µs (20.3%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~73419906f3, baseline=1.46.0-SNAPSHOT~c58164b25d
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.353 ms) : 1333, 1373
.   : milestone, 1353,
appsec (1.74 ms) : 1716, 1764
.   : milestone, 1740,
appsec_no_iast (1.75 ms) : 1728, 1772
.   : milestone, 1750,
iast (1.495 ms) : 1470, 1520
.   : milestone, 1495,
profiling (1.527 ms) : 1503, 1552
.   : milestone, 1527,
tracing (1.484 ms) : 1459, 1509
.   : milestone, 1484,
section candidate
no_agent (1.35 ms) : 1330, 1371
.   : milestone, 1350,
appsec (1.733 ms) : 1710, 1757
.   : milestone, 1733,
appsec_no_iast (1.745 ms) : 1722, 1768
.   : milestone, 1745,
iast (1.498 ms) : 1473, 1522
.   : milestone, 1498,
profiling (1.543 ms) : 1519, 1567
.   : milestone, 1543,
tracing (1.505 ms) : 1481, 1530
.   : milestone, 1505,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.353 ms [1.333 ms, 1.373 ms] -
appsec 1.74 ms [1.716 ms, 1.764 ms] 386.88 µs (28.6%)
appsec_no_iast 1.75 ms [1.728 ms, 1.772 ms] 396.829 µs (29.3%)
iast 1.495 ms [1.47 ms, 1.52 ms] 141.886 µs (10.5%)
profiling 1.527 ms [1.503 ms, 1.552 ms] 174.127 µs (12.9%)
tracing 1.484 ms [1.459 ms, 1.509 ms] 130.713 µs (9.7%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.35 ms [1.33 ms, 1.371 ms] -
appsec 1.733 ms [1.71 ms, 1.757 ms] 382.916 µs (28.4%)
appsec_no_iast 1.745 ms [1.722 ms, 1.768 ms] 395.033 µs (29.3%)
iast 1.498 ms [1.473 ms, 1.522 ms] 147.413 µs (10.9%)
profiling 1.543 ms [1.519 ms, 1.567 ms] 192.718 µs (14.3%)
tracing 1.505 ms [1.481 ms, 1.53 ms] 155.103 µs (11.5%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master datadog/trace-agent-sampling-feedback-optimization
git_commit_date 1737985869 1737986136
git_commit_sha c58164b 7341990
release_version 1.46.0-SNAPSHOT~c58164b25d 1.46.0-SNAPSHOT~73419906f3
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1737988021 1737988021
ci_job_id 781455903 781455903
ci_pipeline_id 54055781 54055781
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-nvtssqy9-project-304-concurrent-0-dci52pa8 6.8.0-1018-aws #19~22.04.1-Ubuntu SMP Wed Oct 9 16:48:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux Linux runner-nvtssqy9-project-304-concurrent-0-dci52pa8 6.8.0-1018-aws #19~22.04.1-Ubuntu SMP Wed Oct 9 16:48:22 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 11 metrics, 1 unstable metrics.

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.46.0-SNAPSHOT~73419906f3, baseline=1.46.0-SNAPSHOT~c58164b25d
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.253 s) : 15253000, 15253000
.   : milestone, 15253000,
appsec (14.964 s) : 14964000, 14964000
.   : milestone, 14964000,
iast (18.821 s) : 18821000, 18821000
.   : milestone, 18821000,
iast_GLOBAL (18.137 s) : 18137000, 18137000
.   : milestone, 18137000,
profiling (14.966 s) : 14966000, 14966000
.   : milestone, 14966000,
tracing (15.191 s) : 15191000, 15191000
.   : milestone, 15191000,
section candidate
no_agent (15.341 s) : 15341000, 15341000
.   : milestone, 15341000,
appsec (15.207 s) : 15207000, 15207000
.   : milestone, 15207000,
iast (18.415 s) : 18415000, 18415000
.   : milestone, 18415000,
iast_GLOBAL (18.051 s) : 18051000, 18051000
.   : milestone, 18051000,
profiling (14.913 s) : 14913000, 14913000
.   : milestone, 14913000,
tracing (15.344 s) : 15344000, 15344000
.   : milestone, 15344000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.253 s [15.253 s, 15.253 s] -
appsec 14.964 s [14.964 s, 14.964 s] -289.0 ms (-1.9%)
iast 18.821 s [18.821 s, 18.821 s] 3.568 s (23.4%)
iast_GLOBAL 18.137 s [18.137 s, 18.137 s] 2.884 s (18.9%)
profiling 14.966 s [14.966 s, 14.966 s] -287.0 ms (-1.9%)
tracing 15.191 s [15.191 s, 15.191 s] -62.0 ms (-0.4%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.341 s [15.341 s, 15.341 s] -
appsec 15.207 s [15.207 s, 15.207 s] -134.0 ms (-0.9%)
iast 18.415 s [18.415 s, 18.415 s] 3.074 s (20.0%)
iast_GLOBAL 18.051 s [18.051 s, 18.051 s] 2.71 s (17.7%)
profiling 14.913 s [14.913 s, 14.913 s] -428.0 ms (-2.8%)
tracing 15.344 s [15.344 s, 15.344 s] 3.0 ms (0.0%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.46.0-SNAPSHOT~73419906f3, baseline=1.46.0-SNAPSHOT~c58164b25d
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.473 ms) : 1461, 1484
.   : milestone, 1473,
appsec (2.36 ms) : 2317, 2403
.   : milestone, 2360,
iast (2.113 ms) : 2058, 2167
.   : milestone, 2113,
iast_GLOBAL (2.158 ms) : 2103, 2213
.   : milestone, 2158,
profiling (2.461 ms) : 2273, 2648
.   : milestone, 2461,
tracing (1.941 ms) : 1899, 1983
.   : milestone, 1941,
section candidate
no_agent (1.471 ms) : 1460, 1483
.   : milestone, 1471,
appsec (2.362 ms) : 2319, 2405
.   : milestone, 2362,
iast (2.1 ms) : 2045, 2154
.   : milestone, 2100,
iast_GLOBAL (2.151 ms) : 2096, 2206
.   : milestone, 2151,
profiling (1.989 ms) : 1945, 2034
.   : milestone, 1989,
tracing (1.946 ms) : 1903, 1988
.   : milestone, 1946,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.473 ms [1.461 ms, 1.484 ms] -
appsec 2.36 ms [2.317 ms, 2.403 ms] 887.449 µs (60.3%)
iast 2.113 ms [2.058 ms, 2.167 ms] 639.971 µs (43.5%)
iast_GLOBAL 2.158 ms [2.103 ms, 2.213 ms] 685.305 µs (46.5%)
profiling 2.461 ms [2.273 ms, 2.648 ms] 988.187 µs (67.1%)
tracing 1.941 ms [1.899 ms, 1.983 ms] 468.228 µs (31.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.471 ms [1.46 ms, 1.483 ms] -
appsec 2.362 ms [2.319 ms, 2.405 ms] 891.009 µs (60.6%)
iast 2.1 ms [2.045 ms, 2.154 ms] 628.226 µs (42.7%)
iast_GLOBAL 2.151 ms [2.096 ms, 2.206 ms] 679.407 µs (46.2%)
profiling 1.989 ms [1.945 ms, 2.034 ms] 517.663 µs (35.2%)
tracing 1.946 ms [1.903 ms, 1.988 ms] 474.034 µs (32.2%)

@dougqh dougqh added tag: performance Performance related changes and removed tag: performance Performance related changes labels Jan 27, 2025
@dougqh dougqh merged commit 8c6ec67 into master Jan 27, 2025
196 checks passed
@dougqh dougqh deleted the datadog/trace-agent-sampling-feedback-optimization branch January 27, 2025 18:01
@github-actions github-actions bot added this to the 1.46.0 milestone Jan 27, 2025
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Jan 31, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
|
[com.google.cloud:google-cloud-datastore](https://github.com/googleapis/java-datastore)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`2.25.4` -> `2.26.0` |
| [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.45.2` -> `1.46.0` |
| [com.datadoghq:dd-trace-ot](https://github.com/datadog/dd-trace-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.45.2` -> `1.46.0` |
| [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
|
[software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
| [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
| [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
| [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |
| [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.9` -> `2.30.10` |

---

### Release Notes

<details>
<summary>googleapis/java-datastore
(com.google.cloud:google-cloud-datastore)</summary>

###
[`v2.26.0`](https://github.com/googleapis/java-datastore/blob/HEAD/CHANGELOG.md#2260-2025-01-29)

##### Features

- Add firestoreInDatastoreMode for datastore emulator
([#&#8203;1698](googleapis/java-datastore#1698))
([50f106d](googleapis/java-datastore@50f106d))

##### Dependencies

- Update dependency com.google.cloud:sdk-platform-java-config to v3.42.0
([#&#8203;1725](googleapis/java-datastore#1725))
([1cbaf22](googleapis/java-datastore@1cbaf22))

</details>

<details>
<summary>datadog/dd-trace-java (com.datadoghq:dd-trace-api)</summary>

###
[`v1.46.0`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.46.0):
1.46.0

##### Breaking Changes

> \[!WARNING]
> jnr-unixsocket is now an external dependency of dd-trace-ot and must
be included when deploying dd-trace-ot.

> \[!NOTE]
> The API `TracerScope.setAsync(boolean)`, used to manually control
asynchronous span propagation, does no more apply to the scope instance
but to the active span scope.

##### Components

##### Application Security Management (IAST)

- 🐛 Fix String.replace instrumentation for IAST
([#&#8203;8281](DataDog/dd-trace-java#8281) -
[@&#8203;Mariovido](https://github.com/Mariovido))
- ✨ Apply the standard nomenclature to the stacktrace configs
([#&#8203;8244](DataDog/dd-trace-java#8244) -
[@&#8203;jandro996](https://github.com/jandro996))
- 🐛 Exclude false positive weak randomness
([#&#8203;8232](DataDog/dd-trace-java#8232) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Propagation of translateEscapes of String class
([#&#8203;8186](DataDog/dd-trace-java#8186) -
[@&#8203;sezen-datadog](https://github.com/sezen-datadog))
- ✨ Add security control metrics
([#&#8203;8175](DataDog/dd-trace-java#8175) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Increase IAST propagation to StringBuffer setLength
([#&#8203;8128](DataDog/dd-trace-java#8128) -
[@&#8203;Mariovido](https://github.com/Mariovido))
- ✨ Add IAST taint tracking for DB values
([#&#8203;8072](DataDog/dd-trace-java#8072) -
[@&#8203;Mariovido](https://github.com/Mariovido))

##### Application Security Management (WAF)

- 🐛 Prevents a NPE when there is no subscriber for user events
([#&#8203;8258](DataDog/dd-trace-java#8258) -
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))
- ✨ Apply the standard nomenclature to the stacktrace configs
([#&#8203;8244](DataDog/dd-trace-java#8244) -
[@&#8203;jandro996](https://github.com/jandro996))
- 🐛 Ensure cached subscriptions are cleared on reconfiguration via
RC ([#&#8203;8229](DataDog/dd-trace-java#8229)
-
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))
- ✨ Add support for session tracking in Vertx
([#&#8203;8167](DataDog/dd-trace-java#8167) -
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))
- ✨ Create span tag: \_dd.appsec.rasp.timeout
([#&#8203;8269](DataDog/dd-trace-java#8269) -
[@&#8203;Mariovido](https://github.com/Mariovido))

##### Build & Tooling

- 🐛 Ensure shaded helpers have unique names when injected into
class-loaders
([#&#8203;8192](DataDog/dd-trace-java#8192) -
[@&#8203;mcculls](https://github.com/mcculls))

##### Configuration at Runtime

- 🐛 Remove filtering of `DD_SERVICE` and `DD_ENV` from the tracer
([#&#8203;8176](DataDog/dd-trace-java#8176) -
[@&#8203;mhlidd](https://github.com/mhlidd))

##### Continuous Integration Visibility

- 🧹 Generalize TestRetryPolicy to TestExecutionPolicy
([#&#8203;8302](DataDog/dd-trace-java#8302) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🧹 Parallelize CI Visibility settings requests
([#&#8203;8299](DataDog/dd-trace-java#8299) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🧹 Generalize test retry logic
([#&#8203;8289](DataDog/dd-trace-java#8289) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🧹 Generalize tests skipping logic
([#&#8203;8288](DataDog/dd-trace-java#8288) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🧹 Remove skip and shouldBeSkipped methods from TestEventsHandler
in favor of isSkippable
([#&#8203;8286](DataDog/dd-trace-java#8286) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- ✨⚡ Optimize Git repository information computation
([#&#8203;8270](DataDog/dd-trace-java#8270) -
[@&#8203;dougqh](https://github.com/dougqh))
- ✨ Always request known tests from the backend
([#&#8203;8268](DataDog/dd-trace-java#8268) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- ✨ Fix NPE when trying to get retry analyzer in Test NG
([#&#8203;8253](DataDog/dd-trace-java#8253) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🐛 Set test framework and test framework version tags atomically
([#&#8203;8252](DataDog/dd-trace-java#8252) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- ✨ Add debug logging to Android Gradle module layout logic
([#&#8203;8251](DataDog/dd-trace-java#8251) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🐛 Fix source and destination folders computation for Android
Gradle projects
([#&#8203;8190](DataDog/dd-trace-java#8190) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- ✨ Add basic Scala Weaver sbt support
([#&#8203;8189](DataDog/dd-trace-java#8189) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Implement impacted tests detection
([#&#8203;8188](DataDog/dd-trace-java#8188) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))

##### Data Streams Monitoring

- ✨ Change hash computation for protobuf to better represent
impacting changes + save proto number in schema
([#&#8203;8201](DataDog/dd-trace-java#8201) -
[@&#8203;vandonr](https://github.com/vandonr))

##### Database Monitoring

- Add peer service tag in dbm sql commenter
([#&#8203;7913](DataDog/dd-trace-java#7913) -
[@&#8203;jordan-wong](https://github.com/jordan-wong))

##### Dynamic Instrumentation

- ✨ Add support for SymDB to scan directories
([#&#8203;8306](DataDog/dd-trace-java#8306) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- ✨ Add SymDB report for any jar scanning failures
([#&#8203;8300](DataDog/dd-trace-java#8300) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- ✨ Use two budgets depending on type
([#&#8203;8283](DataDog/dd-trace-java#8283) -
[@&#8203;evanchooly](https://github.com/evanchooly))
- ✨ Institute a 10 snapshot per probe per trace budget
([#&#8203;8277](DataDog/dd-trace-java#8277) -
[@&#8203;evanchooly](https://github.com/evanchooly))
- 🐛 Avoid double snapshots for Exception Replay
([#&#8203;8273](DataDog/dd-trace-java#8273) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- ✨ Simplify code origins. Separate out snapshot generation.
([#&#8203;8263](DataDog/dd-trace-java#8263) -
[@&#8203;evanchooly](https://github.com/evanchooly))
- ✨ Add Exception probe custom instrumentation
([#&#8203;8230](DataDog/dd-trace-java#8230) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- ✨ Enhance log probes to honor debug session tags
([#&#8203;8215](DataDog/dd-trace-java#8215) -
[@&#8203;evanchooly](https://github.com/evanchooly))
- 🐛 Don't redact env tokens from debugger probe snapshots
([#&#8203;8211](DataDog/dd-trace-java#8211) -
[@&#8203;watson](https://github.com/watson))
- ✨⚡ Move Trace/SpanId capture at commit time
([#&#8203;8184](DataDog/dd-trace-java#8184) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Capture values at entry for method probe
([#&#8203;8169](DataDog/dd-trace-java#8169) -
[@&#8203;jpbempel](https://github.com/jpbempel))

##### JMX fetch

- 🐛 Mute JMXFetch Shutdown in progress error
([#&#8203;8068](DataDog/dd-trace-java#8068) -
[@&#8203;ygree](https://github.com/ygree))

##### OpenTracing

- ⚠️🧹 Make jnr-unixsocket an explicit dependency of
dd-trace-ot
([#&#8203;8307](DataDog/dd-trace-java#8307) -
[@&#8203;mcculls](https://github.com/mcculls))

##### Profiling

- 🐛 Avoid unsupported API call for creating folders on windows
([#&#8203;8304](DataDog/dd-trace-java#8304) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- ✨ Tag profiles for serverless
([#&#8203;8279](DataDog/dd-trace-java#8279) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- ✨ add queue type and length to queue events
([#&#8203;8242](DataDog/dd-trace-java#8242) -
[@&#8203;richardstartin](https://github.com/richardstartin))
- 🐛 TempLocationManager Fixes and Improvements
([#&#8203;8191](DataDog/dd-trace-java#8191) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- ✨ Bump ddprof to 1.18.0
([#&#8203;8173](DataDog/dd-trace-java#8173) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- ✨ Report profiler initialization and configuration errors to
telemetry
([#&#8203;8171](DataDog/dd-trace-java#8171) -
[@&#8203;jbachorik](https://github.com/jbachorik))

##### Telemetry

- ✨ Add pending traces report in tracer flares
([#&#8203;8053](DataDog/dd-trace-java#8053) -
[@&#8203;mhlidd](https://github.com/mhlidd))

##### Testing

- ✨ Test http server requests in parallel
([#&#8203;8222](DataDog/dd-trace-java#8222) -
[@&#8203;amarziali](https://github.com/amarziali))

##### Trace context propagation

- ✨ Add non default propagator registration
([#&#8203;8310](DataDog/dd-trace-java#8310) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))

##### Tracer core

- ✨ Probe for existence of IBMSASL or ACCP security providers
([#&#8203;8276](DataDog/dd-trace-java#8276) -
[@&#8203;mcculls](https://github.com/mcculls))
- ✨⚡ Overhead improvement to agent feedback based sampling
([#&#8203;8265](DataDog/dd-trace-java#8265) -
[@&#8203;dougqh](https://github.com/dougqh))
- 🧹 Move async propagation API from scope to tracer
([#&#8203;8231](DataDog/dd-trace-java#8231) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))
- ✨ Introduce context propagation API
([#&#8203;8161](DataDog/dd-trace-java#8161) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))
- ✨🧪 Use env-entry to add tags per webapp deployment
([#&#8203;8138](DataDog/dd-trace-java#8138) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Introduce context helpers API
([#&#8203;8134](DataDog/dd-trace-java#8134) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))
- ✨ Support IPv6 values for `DD_AGENT_HOST` and
`DD_TRACE_AGENT_URL`
([#&#8203;7984](DataDog/dd-trace-java#7984) -
[@&#8203;mhlidd](https://github.com/mhlidd))

##### Instrumentations

##### Apache HttpComponents

- 🐛 Properly finish spans and support latest apache httpclient5
([#&#8203;8272](DataDog/dd-trace-java#8272) -
[@&#8203;amarziali](https://github.com/amarziali))

##### AWS Lambda instrumentation

- 🐛 Properly capture lambda payloads for all handler types.
([#&#8203;8264](DataDog/dd-trace-java#8264) -
[@&#8203;purple4reina](https://github.com/purple4reina))

##### AWS S3 instrumentation

- 💡 Create S3 instrumentation + add span pointers
([#&#8203;8075](DataDog/dd-trace-java#8075) -
[@&#8203;nhulston](https://github.com/nhulston))

##### AWS SDK instrumentation

- 🐛 Revert "Add avoid double instrumenting lambda non-streaming
handlers."
([#&#8203;8247](DataDog/dd-trace-java#8247) -
[@&#8203;nhulston](https://github.com/nhulston))

##### Cassandra

- ✨ Allow extracting keyspace from statement result
([#&#8203;8239](DataDog/dd-trace-java#8239) -
[@&#8203;amarziali](https://github.com/amarziali))

##### Core Java language instrumentation

- ✨ Propagation of translateEscapes of String class
([#&#8203;8186](DataDog/dd-trace-java#8186) -
[@&#8203;sezen-datadog](https://github.com/sezen-datadog))

##### Eclipse Vert.x instrumentation

- 🐛 Fix vertx worker propagation and error handling
([#&#8203;8237](DataDog/dd-trace-java#8237) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Support vertx 5
([#&#8203;8220](DataDog/dd-trace-java#8220) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Add support for session tracking in Vertx
([#&#8203;8167](DataDog/dd-trace-java#8167) -
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))

##### Kafka instrumentation

- 🐛 Prevent possible NPE calculating Kafka record header size
([#&#8203;8292](DataDog/dd-trace-java#8292) -
[@&#8203;ygree](https://github.com/ygree))

##### Mule instrumentation

- 🐛 Fix crash using Mule with JPMS
([#&#8203;8187](DataDog/dd-trace-java#8187) -
[@&#8203;amarziali](https://github.com/amarziali))

##### Protocol Buffer instrumentation

- ✨ Change hash computation for protobuf to better represent
impacting changes + save proto number in schema
([#&#8203;8201](DataDog/dd-trace-java#8201) -
[@&#8203;vandonr](https://github.com/vandonr))

##### Spring instrumentation

- 🐛 Preserve getQualifier from spring scheduling runnables
([#&#8203;8293](DataDog/dd-trace-java#8293) -
[@&#8203;amarziali](https://github.com/amarziali))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: bb09d47e4eed77a003f630273b4d0a84003eb899
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: core Tracer core tag: performance Performance related changes type: enhancement Enhancements and improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants