Skip to content

Conversation

@kr-igor
Copy link
Contributor

@kr-igor kr-igor commented Nov 3, 2025

What Does This Do

Initial transaction tracking implementation.

  • Support for extractors configuration
  • Serialization for extractors
  • API for transaction tracking
  • Extractors for http / kafka (in/out)
  • Updated / added unit tests

Motivation

Multiple customers mentioned the need to track individual message across multiple service and environments and log messages which haven't reached the end of the pre-defined pipeline.
See this document for details.

Additional Notes

Transaction tracking is currently in closed beta, so the configuration flags will be documented after public availability.

Technical details

trackTransaction method can be used to add transaction information to the DSM payload.
Transactions are accumulated in the in-mem container until they reach 512kb in size or until the DSM flush loop executes.
All http requests / kafka produce and consume operations now check for DSM extractors and apply them if any were registered. The overhead for customers without DSM / Extractors should not be noticeable, as we only execute 1 additional EnumMap lookup.

@datadog-datadog-prod-us1

This comment has been minimized.

@pr-commenter
Copy link

pr-commenter bot commented Nov 3, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master kr-igor/dsm-transaction-extractors
git_commit_date 1769086485 1769114045
git_commit_sha 3d62379 39426c4
release_version 1.59.0-SNAPSHOT~3d62379c90 1.56.0-SNAPSHOT~39426c4fe6
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1769115887 1769115887
ci_job_id 1371291527 1371291527
ci_pipeline_id 92363178 92363178
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-ee9fi2a3 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-ee9fi2a3 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 1 performance improvements and 0 performance regressions! Performance is the same for 55 metrics, 9 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:petclinic:profiling:Remote Config better
[-112.100µs; -50.647µs] or [-16.410%; -7.414%]
601.760µs 683.133µs
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.56.0-SNAPSHOT~39426c4fe6, baseline=1.59.0-SNAPSHOT~3d62379c90

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.086 s) : 0, 1086409
Total [baseline] (8.758 s) : 0, 8757586
Agent [candidate] (1.095 s) : 0, 1095454
Total [candidate] (8.758 s) : 0, 8758101
section iast
Agent [baseline] (1.225 s) : 0, 1224792
Total [baseline] (9.351 s) : 0, 9350999
Agent [candidate] (1.228 s) : 0, 1228401
Total [candidate] (9.333 s) : 0, 9333357
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.086 s -
Agent iast 1.225 s 138.383 ms (12.7%)
Total tracing 8.758 s -
Total iast 9.351 s 593.412 ms (6.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.095 s -
Agent iast 1.228 s 132.947 ms (12.1%)
Total tracing 8.758 s -
Total iast 9.333 s 575.256 ms (6.6%)
gantt
    title insecure-bank - break down per module: candidate=1.56.0-SNAPSHOT~39426c4fe6, baseline=1.59.0-SNAPSHOT~3d62379c90

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.193 ms) : 0, 1193
crashtracking [candidate] (1.189 ms) : 0, 1189
BytebuddyAgent [baseline] (652.993 ms) : 0, 652993
BytebuddyAgent [candidate] (656.568 ms) : 0, 656568
GlobalTracer [baseline] (283.763 ms) : 0, 283763
GlobalTracer [candidate] (288.003 ms) : 0, 288003
AppSec [baseline] (32.425 ms) : 0, 32425
AppSec [candidate] (33.224 ms) : 0, 33224
Debugger [baseline] (66.543 ms) : 0, 66543
Debugger [candidate] (66.754 ms) : 0, 66754
Remote Config [baseline] (609.364 µs) : 0, 609
Remote Config [candidate] (622.017 µs) : 0, 622
Telemetry [baseline] (8.806 ms) : 0, 8806
Telemetry [candidate] (8.861 ms) : 0, 8861
Flare Poller [baseline] (4.603 ms) : 0, 4603
Flare Poller [candidate] (4.573 ms) : 0, 4573
section iast
crashtracking [baseline] (1.179 ms) : 0, 1179
crashtracking [candidate] (1.182 ms) : 0, 1182
BytebuddyAgent [baseline] (793.265 ms) : 0, 793265
BytebuddyAgent [candidate] (793.283 ms) : 0, 793283
GlobalTracer [baseline] (256.602 ms) : 0, 256602
GlobalTracer [candidate] (259.639 ms) : 0, 259639
AppSec [baseline] (32.273 ms) : 0, 32273
AppSec [candidate] (32.724 ms) : 0, 32724
Debugger [baseline] (66.638 ms) : 0, 66638
Debugger [candidate] (66.787 ms) : 0, 66787
Remote Config [baseline] (570.633 µs) : 0, 571
Remote Config [candidate] (525.737 µs) : 0, 526
Telemetry [baseline] (8.357 ms) : 0, 8357
Telemetry [candidate] (8.474 ms) : 0, 8474
Flare Poller [baseline] (3.569 ms) : 0, 3569
Flare Poller [candidate] (3.481 ms) : 0, 3481
IAST [baseline] (27.007 ms) : 0, 27007
IAST [candidate] (27.012 ms) : 0, 27012
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.56.0-SNAPSHOT~39426c4fe6, baseline=1.59.0-SNAPSHOT~3d62379c90

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.101 s) : 0, 1100693
Total [baseline] (10.811 s) : 0, 10810708
Agent [candidate] (1.096 s) : 0, 1096093
Total [candidate] (10.819 s) : 0, 10819424
section appsec
Agent [baseline] (1.265 s) : 0, 1264669
Total [baseline] (11.06 s) : 0, 11059974
Agent [candidate] (1.27 s) : 0, 1269637
Total [candidate] (10.966 s) : 0, 10965848
section iast
Agent [baseline] (1.227 s) : 0, 1227296
Total [baseline] (11.203 s) : 0, 11202672
Agent [candidate] (1.233 s) : 0, 1232604
Total [candidate] (11.291 s) : 0, 11291381
section profiling
Agent [baseline] (1.208 s) : 0, 1207754
Total [baseline] (10.896 s) : 0, 10895673
Agent [candidate] (1.206 s) : 0, 1206433
Total [candidate] (10.868 s) : 0, 10867841
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.101 s -
Agent appsec 1.265 s 163.976 ms (14.9%)
Agent iast 1.227 s 126.604 ms (11.5%)
Agent profiling 1.208 s 107.061 ms (9.7%)
Total tracing 10.811 s -
Total appsec 11.06 s 249.265 ms (2.3%)
Total iast 11.203 s 391.963 ms (3.6%)
Total profiling 10.896 s 84.964 ms (0.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.096 s -
Agent appsec 1.27 s 173.544 ms (15.8%)
Agent iast 1.233 s 136.511 ms (12.5%)
Agent profiling 1.206 s 110.34 ms (10.1%)
Total tracing 10.819 s -
Total appsec 10.966 s 146.424 ms (1.4%)
Total iast 11.291 s 471.957 ms (4.4%)
Total profiling 10.868 s 48.417 ms (0.4%)
gantt
    title petclinic - break down per module: candidate=1.56.0-SNAPSHOT~39426c4fe6, baseline=1.59.0-SNAPSHOT~3d62379c90

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.196 ms) : 0, 1196
crashtracking [candidate] (1.184 ms) : 0, 1184
BytebuddyAgent [baseline] (660.795 ms) : 0, 660795
BytebuddyAgent [candidate] (656.763 ms) : 0, 656763
GlobalTracer [baseline] (287.025 ms) : 0, 287025
GlobalTracer [candidate] (287.876 ms) : 0, 287876
AppSec [baseline] (33.214 ms) : 0, 33214
AppSec [candidate] (33.054 ms) : 0, 33054
Debugger [baseline] (67.698 ms) : 0, 67698
Debugger [candidate] (67.425 ms) : 0, 67425
Remote Config [baseline] (624.295 µs) : 0, 624
Remote Config [candidate] (606.174 µs) : 0, 606
Telemetry [baseline] (8.928 ms) : 0, 8928
Telemetry [candidate] (8.996 ms) : 0, 8996
Flare Poller [baseline] (5.373 ms) : 0, 5373
Flare Poller [candidate] (4.499 ms) : 0, 4499
section appsec
crashtracking [baseline] (1.173 ms) : 0, 1173
crashtracking [candidate] (1.166 ms) : 0, 1166
BytebuddyAgent [baseline] (690.5 ms) : 0, 690500
BytebuddyAgent [candidate] (692.086 ms) : 0, 692086
GlobalTracer [baseline] (259.075 ms) : 0, 259075
GlobalTracer [candidate] (262.564 ms) : 0, 262564
IAST [baseline] (24.43 ms) : 0, 24430
IAST [candidate] (24.753 ms) : 0, 24753
AppSec [baseline] (173.65 ms) : 0, 173650
AppSec [candidate] (173.461 ms) : 0, 173461
Debugger [baseline] (66.74 ms) : 0, 66740
Debugger [candidate] (66.685 ms) : 0, 66685
Remote Config [baseline] (762.979 µs) : 0, 763
Remote Config [candidate] (678.48 µs) : 0, 678
Telemetry [baseline] (9.417 ms) : 0, 9417
Telemetry [candidate] (9.265 ms) : 0, 9265
Flare Poller [baseline] (3.652 ms) : 0, 3652
Flare Poller [candidate] (3.58 ms) : 0, 3580
section iast
crashtracking [baseline] (1.176 ms) : 0, 1176
crashtracking [candidate] (1.187 ms) : 0, 1187
BytebuddyAgent [baseline] (794.124 ms) : 0, 794124
BytebuddyAgent [candidate] (796.034 ms) : 0, 796034
GlobalTracer [baseline] (257.371 ms) : 0, 257371
GlobalTracer [candidate] (259.794 ms) : 0, 259794
IAST [baseline] (27.057 ms) : 0, 27057
IAST [candidate] (27.015 ms) : 0, 27015
AppSec [baseline] (34.055 ms) : 0, 34055
AppSec [candidate] (35.146 ms) : 0, 35146
Debugger [baseline] (65.647 ms) : 0, 65647
Debugger [candidate] (65.382 ms) : 0, 65382
Remote Config [baseline] (576.918 µs) : 0, 577
Remote Config [candidate] (541.774 µs) : 0, 542
Telemetry [baseline] (8.434 ms) : 0, 8434
Telemetry [candidate] (8.511 ms) : 0, 8511
Flare Poller [baseline] (3.572 ms) : 0, 3572
Flare Poller [candidate] (3.456 ms) : 0, 3456
section profiling
crashtracking [baseline] (1.214 ms) : 0, 1214
crashtracking [candidate] (1.218 ms) : 0, 1218
BytebuddyAgent [baseline] (703.468 ms) : 0, 703468
BytebuddyAgent [candidate] (701.212 ms) : 0, 701212
GlobalTracer [baseline] (222.316 ms) : 0, 222316
GlobalTracer [candidate] (224.397 ms) : 0, 224397
AppSec [baseline] (32.473 ms) : 0, 32473
AppSec [candidate] (32.298 ms) : 0, 32298
Debugger [baseline] (68.205 ms) : 0, 68205
Debugger [candidate] (67.858 ms) : 0, 67858
Remote Config [baseline] (683.133 µs) : 0, 683
Remote Config [candidate] (601.76 µs) : 0, 602
Telemetry [baseline] (8.888 ms) : 0, 8888
Telemetry [candidate] (8.802 ms) : 0, 8802
Flare Poller [baseline] (3.77 ms) : 0, 3770
Flare Poller [candidate] (3.651 ms) : 0, 3651
ProfilingAgent [baseline] (96.789 ms) : 0, 96789
ProfilingAgent [candidate] (96.662 ms) : 0, 96662
Profiling [baseline] (97.364 ms) : 0, 97364
Profiling [candidate] (97.233 ms) : 0, 97233
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master kr-igor/dsm-transaction-extractors
git_commit_date 1769086485 1769114045
git_commit_sha 3d62379 39426c4
release_version 1.59.0-SNAPSHOT~3d62379c90 1.56.0-SNAPSHOT~39426c4fe6
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1769116377 1769116377
ci_job_id 1371291529 1371291529
ci_pipeline_id 92363178 92363178
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-spfdrftu 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-spfdrftu 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 1 performance regressions! Performance is the same for 19 metrics, 16 unstable metrics.

scenario Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p95 Δ mean throughput candidate mean agg_http_req_duration_p50 candidate mean agg_http_req_duration_p95 candidate mean throughput baseline mean agg_http_req_duration_p50 baseline mean agg_http_req_duration_p95 baseline mean throughput
scenario:load:petclinic:profiling:high_load unsure
[+314.189µs; +1176.305µs] or [+1.676%; +6.277%]
worse
[+0.915ms; +2.003ms] or [+3.065%; +6.715%]
unstable
[-33.113op/s; +14.675op/s] or [-13.474%; +5.972%]
19.487ms 31.294ms 236.531op/s 18.741ms 29.835ms 245.750op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~39426c4fe6, baseline=1.59.0-SNAPSHOT~3d62379c90
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.17 ms) : 1158, 1181
.   : milestone, 1170,
iast (3.127 ms) : 3086, 3167
.   : milestone, 3127,
iast_FULL (5.764 ms) : 5708, 5821
.   : milestone, 5764,
iast_GLOBAL (3.52 ms) : 3469, 3570
.   : milestone, 3520,
profiling (2.051 ms) : 2033, 2070
.   : milestone, 2051,
tracing (1.796 ms) : 1781, 1812
.   : milestone, 1796,
section candidate
no_agent (1.192 ms) : 1179, 1204
.   : milestone, 1192,
iast (3.124 ms) : 3086, 3162
.   : milestone, 3124,
iast_FULL (5.985 ms) : 5924, 6045
.   : milestone, 5985,
iast_GLOBAL (3.575 ms) : 3520, 3630
.   : milestone, 3575,
profiling (1.962 ms) : 1945, 1979
.   : milestone, 1962,
tracing (1.824 ms) : 1809, 1839
.   : milestone, 1824,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.17 ms [1.158 ms, 1.181 ms] -
iast 3.127 ms [3.086 ms, 3.167 ms] 1.957 ms (167.3%)
iast_FULL 5.764 ms [5.708 ms, 5.821 ms] 4.595 ms (392.9%)
iast_GLOBAL 3.52 ms [3.469 ms, 3.57 ms] 2.35 ms (200.9%)
profiling 2.051 ms [2.033 ms, 2.07 ms] 881.652 µs (75.4%)
tracing 1.796 ms [1.781 ms, 1.812 ms] 626.701 µs (53.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.192 ms [1.179 ms, 1.204 ms] -
iast 3.124 ms [3.086 ms, 3.162 ms] 1.932 ms (162.2%)
iast_FULL 5.985 ms [5.924 ms, 6.045 ms] 4.793 ms (402.3%)
iast_GLOBAL 3.575 ms [3.52 ms, 3.63 ms] 2.383 ms (200.0%)
profiling 1.962 ms [1.945 ms, 1.979 ms] 770.696 µs (64.7%)
tracing 1.824 ms [1.809 ms, 1.839 ms] 632.027 µs (53.0%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~39426c4fe6, baseline=1.59.0-SNAPSHOT~3d62379c90
    dateFormat X
    axisFormat %s
section baseline
no_agent (18.06 ms) : 17876, 18244
.   : milestone, 18060,
appsec (18.082 ms) : 17896, 18268
.   : milestone, 18082,
code_origins (17.586 ms) : 17412, 17759
.   : milestone, 17586,
iast (17.532 ms) : 17355, 17709
.   : milestone, 17532,
profiling (18.996 ms) : 18811, 19182
.   : milestone, 18996,
tracing (17.666 ms) : 17487, 17845
.   : milestone, 17666,
section candidate
no_agent (19.179 ms) : 18979, 19378
.   : milestone, 19179,
appsec (18.255 ms) : 18074, 18437
.   : milestone, 18255,
code_origins (17.886 ms) : 17710, 18062
.   : milestone, 17886,
iast (17.333 ms) : 17160, 17506
.   : milestone, 17333,
profiling (19.735 ms) : 19535, 19935
.   : milestone, 19735,
tracing (17.623 ms) : 17447, 17799
.   : milestone, 17623,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.06 ms [17.876 ms, 18.244 ms] -
appsec 18.082 ms [17.896 ms, 18.268 ms] 21.496 µs (0.1%)
code_origins 17.586 ms [17.412 ms, 17.759 ms] -474.45 µs (-2.6%)
iast 17.532 ms [17.355 ms, 17.709 ms] -528.486 µs (-2.9%)
profiling 18.996 ms [18.811 ms, 19.182 ms] 936.051 µs (5.2%)
tracing 17.666 ms [17.487 ms, 17.845 ms] -394.341 µs (-2.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.179 ms [18.979 ms, 19.378 ms] -
appsec 18.255 ms [18.074 ms, 18.437 ms] -923.067 µs (-4.8%)
code_origins 17.886 ms [17.71 ms, 18.062 ms] -1.293 ms (-6.7%)
iast 17.333 ms [17.16 ms, 17.506 ms] -1.845 ms (-9.6%)
profiling 19.735 ms [19.535 ms, 19.935 ms] 556.49 µs (2.9%)
tracing 17.623 ms [17.447 ms, 17.799 ms] -1.556 ms (-8.1%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master kr-igor/dsm-transaction-extractors
git_commit_date 1769086485 1769114045
git_commit_sha 3d62379 39426c4
release_version 1.59.0-SNAPSHOT~3d62379c90 1.56.0-SNAPSHOT~39426c4fe6
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1769116181 1769116181
ci_job_id 1371291532 1371291532
ci_pipeline_id 92363178 92363178
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-k0p2z0n8 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-k0p2z0n8 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.56.0-SNAPSHOT~39426c4fe6, baseline=1.59.0-SNAPSHOT~3d62379c90
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.467 ms) : 1456, 1479
.   : milestone, 1467,
appsec (3.647 ms) : 3432, 3861
.   : milestone, 3647,
iast (2.199 ms) : 2134, 2264
.   : milestone, 2199,
iast_GLOBAL (2.25 ms) : 2185, 2315
.   : milestone, 2250,
profiling (2.071 ms) : 2017, 2125
.   : milestone, 2071,
tracing (2.034 ms) : 1983, 2085
.   : milestone, 2034,
section candidate
no_agent (1.467 ms) : 1456, 1479
.   : milestone, 1467,
appsec (3.642 ms) : 3428, 3857
.   : milestone, 3642,
iast (2.195 ms) : 2130, 2260
.   : milestone, 2195,
iast_GLOBAL (2.245 ms) : 2179, 2310
.   : milestone, 2245,
profiling (2.069 ms) : 2015, 2123
.   : milestone, 2069,
tracing (2.039 ms) : 1988, 2090
.   : milestone, 2039,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.467 ms [1.456 ms, 1.479 ms] -
appsec 3.647 ms [3.432 ms, 3.861 ms] 2.179 ms (148.5%)
iast 2.199 ms [2.134 ms, 2.264 ms] 731.644 µs (49.9%)
iast_GLOBAL 2.25 ms [2.185 ms, 2.315 ms] 782.459 µs (53.3%)
profiling 2.071 ms [2.017 ms, 2.125 ms] 603.558 µs (41.1%)
tracing 2.034 ms [1.983 ms, 2.085 ms] 566.657 µs (38.6%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.467 ms [1.456 ms, 1.479 ms] -
appsec 3.642 ms [3.428 ms, 3.857 ms] 2.175 ms (148.3%)
iast 2.195 ms [2.13 ms, 2.26 ms] 728.185 µs (49.6%)
iast_GLOBAL 2.245 ms [2.179 ms, 2.31 ms] 777.579 µs (53.0%)
profiling 2.069 ms [2.015 ms, 2.123 ms] 601.857 µs (41.0%)
tracing 2.039 ms [1.988 ms, 2.09 ms] 571.653 µs (39.0%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~39426c4fe6, baseline=1.59.0-SNAPSHOT~3d62379c90
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.923 s) : 14923000, 14923000
.   : milestone, 14923000,
appsec (14.98 s) : 14980000, 14980000
.   : milestone, 14980000,
iast (18.275 s) : 18275000, 18275000
.   : milestone, 18275000,
iast_GLOBAL (17.659 s) : 17659000, 17659000
.   : milestone, 17659000,
profiling (15.003 s) : 15003000, 15003000
.   : milestone, 15003000,
tracing (14.643 s) : 14643000, 14643000
.   : milestone, 14643000,
section candidate
no_agent (15.529 s) : 15529000, 15529000
.   : milestone, 15529000,
appsec (14.758 s) : 14758000, 14758000
.   : milestone, 14758000,
iast (18.116 s) : 18116000, 18116000
.   : milestone, 18116000,
iast_GLOBAL (18.091 s) : 18091000, 18091000
.   : milestone, 18091000,
profiling (14.988 s) : 14988000, 14988000
.   : milestone, 14988000,
tracing (14.623 s) : 14623000, 14623000
.   : milestone, 14623000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.923 s [14.923 s, 14.923 s] -
appsec 14.98 s [14.98 s, 14.98 s] 57.0 ms (0.4%)
iast 18.275 s [18.275 s, 18.275 s] 3.352 s (22.5%)
iast_GLOBAL 17.659 s [17.659 s, 17.659 s] 2.736 s (18.3%)
profiling 15.003 s [15.003 s, 15.003 s] 80.0 ms (0.5%)
tracing 14.643 s [14.643 s, 14.643 s] -280.0 ms (-1.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.529 s [15.529 s, 15.529 s] -
appsec 14.758 s [14.758 s, 14.758 s] -771.0 ms (-5.0%)
iast 18.116 s [18.116 s, 18.116 s] 2.587 s (16.7%)
iast_GLOBAL 18.091 s [18.091 s, 18.091 s] 2.562 s (16.5%)
profiling 14.988 s [14.988 s, 14.988 s] -541.0 ms (-3.5%)
tracing 14.623 s [14.623 s, 14.623 s] -906.0 ms (-5.8%)

@pr-commenter
Copy link

pr-commenter bot commented Nov 10, 2025

Kafka / producer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master kr-igor/dsm-transaction-extractors
git_commit_date 1769086485 1769114045
git_commit_sha 3d62379 39426c4
See matching parameters
Baseline Candidate
ci_job_date 1769115190 1769115190
ci_job_id 1371291542 1371291542
ci_pipeline_id 92363178 92363178
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 unsure
[-79573.131op/s; -12403.054op/s] or [-4.325%; -0.674%]
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 Nov 12, 2025

Kafka / consumer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master kr-igor/dsm-transaction-extractors
git_commit_date 1769086485 1769114045
git_commit_sha 3d62379 39426c4
See matching parameters
Baseline Candidate
ci_job_date 1769115229 1769115229
ci_job_id 1371291544 1371291544
ci_pipeline_id 92363178 92363178
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

}

// add a new value to cache
synchronized (CACHE) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Using a ConcurrentHashMap and use computeIfAbsent will be enough without requiring a full synchronized block

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! I've updated the code.

private final ConcurrentHashMap<String, SchemaSampler> schemaSamplers;
private static final ThreadLocal<String> serviceNameOverride = new ThreadLocal<>();

// contains a list of active extractors by type. It is not thread safe, but it's populated only
Copy link
Contributor

Choose a reason for hiding this comment

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

That is still going to leave us open to reordering issues.
I'm wondering if it would be better to just make the variable volatile and set it from a Map produced in the background thread.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the PR.

return id;
}

public Long getTimestamp() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we boxing the primitives?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks!

return timestamp;
}

public Integer getCheckpointId() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why box the int?

}

public static byte[] getCheckpointIdCacheBytes() {
return CACHE_BYTES.clone();
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe that there is no need to clone this array since when it's changed, a new reference is assigned to it so the references that are returned are not directly modified


protected abstract int status(RESPONSE response);

protected String getRequestHeader(REQUEST request, String key) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I do tend to agree. In general, I tend to strongly prefer methods be either abstract or final, so that implementors have to make a conscious choice. That said - since it just impacts DSM, I'll let DSM make the final decision.

]
},
{
"name" : "datadog.trace.agent.core.datastreams.DataStreamsTransactionExtractors$DataStreamsTransactionExtractorAdapter",
Copy link
Contributor

Choose a reason for hiding this comment

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

As an aside, it would be nice if we generated this using annotation processing, but that's more a task for platform or SDK.


@Override
protected String getRequestHeader(final HttpExchange exchange, String key) {
return exchange.getRequestHeaders().getFirst(key);
Copy link
Contributor

Choose a reason for hiding this comment

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

While I agree, that most of the time a header is set only once. I've also seen tickets where making that assumption about HTTP inputs has caused issues, so I do share the reservations about adding this as a general mechanism.


// contains a list of active extractors by type. Thread-safe via volatile with immutable
// snapshots.
private volatile Map<DataStreamsTransactionExtractor.Type, List<DataStreamsTransactionExtractor>>
Copy link
Contributor

@dougqh dougqh Jan 22, 2026

Choose a reason for hiding this comment

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

I was actually suggesting to not set the map until the values are known.

The thread safety from volatile comes from introducing store_release and load_acquire semantics, but that only works when the map is fully populated locally and then stored into the volatile. Otherwise, you still exposed to write / write reordering.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the code. Now the map is only set when there are values.

Copy link
Contributor Author

@kr-igor kr-igor Jan 22, 2026

Choose a reason for hiding this comment

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

I do share the reservations about adding this as a general mechanism.

I will prepare a separate / followup PR to address this.

@kr-igor
Copy link
Contributor Author

kr-igor commented Jan 22, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Jan 22, 2026

View all feedbacks in Devflow UI.

2026-01-22 22:36:17 UTC ℹ️ Start processing command /merge
Use /merge -c to cancel this operation!


2026-01-22 22:36:29 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.

Use /merge -c to cancel this operation!


2026-01-22 23:09:24 UTC ℹ️ MergeQueue: queue is disabled

Added to the queue but the mergequeue is not enabled for now.

Use /merge -c to cancel this operation!


⏳ Processing

@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

PR Blocked - Invalid Label

The pull request introduced unexpected labels:

  • mergequeue-status: queued

This PR is blocked until:

  1. The invalid labels are deleted, and
  2. A maintainer deletes this comment to unblock the PR

Note: Simply removing labels from the pull request is not enough - a maintainer must remove the label and delete this comment to remove the block.

@kr-igor kr-igor requested a review from johannbotha January 22, 2026 22:39
Copy link
Contributor

@johannbotha johannbotha left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the thread safety issue with extractorsByType - the volatile + immutable snapshot approach looks good.

Overall LGTM! Just left a couple of minor comments on the pending items but nothing blocking.

// update cache bytes
byte[] checkpointBytes = checkpoint.getBytes();
byte[] bytesToAdd = new byte[checkpointBytes.length + 2];
bytesToAdd[0] = (byte) id;
Copy link
Contributor

Choose a reason for hiding this comment

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

This truncates to 0-255, that will potentially cause a collision if someone has more than 256 unique checkpoint names. Should we prevent the confusion in the future by making that potential overflow more obvious?

}

public void clear() {
size = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you also mean to reset the buffer size here as well?

It gets reset after 10 seconds, but it seems like the intention might be to free up the memory here.

@kr-igor
Copy link
Contributor Author

kr-igor commented Jan 22, 2026

/merge

@gh-worker-devflow-routing-ef8351
Copy link

gh-worker-devflow-routing-ef8351 bot commented Jan 22, 2026

View all feedbacks in Devflow UI.

2026-01-22 23:37:32 UTC ℹ️ Start processing command /merge


2026-01-22 23:37:35 UTC ❌ MergeQueue

PR already in the queue with status queued

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

Labels

comp: data streams Data Streams Monitoring mergequeue-status: queued type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants