8000 Pass Lambda Request ID to Extension by nhulston · Pull Request #8814 · DataDog/dd-trace-java · GitHub
[go: up one dir, main page]

Skip to content

Pass Lambda Request ID to Extension #8814

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

Merged
merged 2 commits into from
May 13, 2025

Conversation

nhulston
Copy link
Contributor
@nhulston nhulston commented May 13, 2025

What Does This Do

Every Lambda invocation has a unique request_id:

START RequestId: 5c6da654-d88b-4de6-b382-4ebc8a854daa
// Application logs here
END RequestId: 5c6da654-d88b-4de6-b382-4ebc8a854daa

In the Lambda Extension, we can use this request_id to enrich the Lambda span generated by the extension with the metadata from the tags: https://github.com/DataDog/datadog-lambda-extension/blob/3b10c17426572d79e98cf5a8a1d02a778c239ee7/bottlecap/src/lifecycle/invocation/processor.rs#L931-L939

Without the request ID, the Lambda Extension doesn't know which span belongs to which Lambda invocation, so we can't enrich the span properly.

Motivation

To make sure tracer tags actually work in Lambda. This is required to support several features in Lambda, such as:

  • Exception Replay
  • Pass the _dd.rule_psr metrics so the sample rate in the Ingestion Summary Page is accurate
  • Probably more that I don't know

Additional Notes

Test manually and verified that the Lambda extension does get the request_id now

Contributor Checklist

Jira ticket: SVLS-6818

@nhulston nhulston added type: enhancement inst: aws lambda AWS Lambda instrumentation labels May 13, 2025
@pr-commenter
Copy link
pr-commenter bot commented May 13, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master nicholas.hulston/pass-lambda-request-id-to-extension
git_commit_date 1747134305 1747150454
git_commit_sha f21ec9e bdeda1d
release_version 1.50.0-SNAPSHOT~f21ec9ed7b 1.50.0-SNAPSHOT~bdeda1ddf7
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1747153045 1747153045
ci_job_id 936142382 936142382
ci_pipeline_id 64960576 64960576
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-vmsxy27x-project-304-concurrent-0-35cv2r5i 6.8.0-1028-aws #30~22.04.1-Ubuntu SMP Sun Apr 20 06:03:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-vmsxy27x-project-304-concurrent-0-35cv2r5i 6.8.0-1028-aws #30~22.04.1-Ubuntu SMP Sun Apr 20 06:03:30 UTC 2025 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 58 metrics, 13 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~bdeda1ddf7, baseline=1.50.0-SNAPSHOT~f21ec9ed7b

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.021 s) : 0, 1021172
Total [baseline] (10.501 s) : 0, 10500776
Agent [candidate] (1.022 s) : 0, 1021903
Total [candidate] (10.598 s) : 0, 10597726
section appsec
Agent [baseline] (1.161 s) : 0, 1160826
Total [baseline] (10.693 s) : 0, 10692786
Agent [candidate] (1.167 s) : 0, 1167324
Total [candidate] (10.741 s) : 0, 10740766
section iast
Agent [baseline] (1.149 s) : 0, 1149448
Total [baseline] (11.022 s) : 0, 11021688
Agent [candidate] (1.147 s) : 0, 1147028
Total [candidate] (10.954 s) : 0, 10953540
section profiling
Agent [baseline] (1.284 s) : 0, 1283625
Total [baseline] (10.94 s) : 0, 10940298
Agent [candidate] (1.283 s) : 0, 1283241
Total [candidate] (10.791 s) : 0, 10790517
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.021 s -
Agent appsec 1.161 s 139.654 ms (13.7%)
Agent iast 1.149 s 128.277 ms (12.6%)
Agent profiling 1.284 s 262.453 ms (25.7%)
Total tracing 10.501 s -
Total appsec 10.693 s 192.011 ms (1.8%)
Total iast 11.022 s 520.912 ms (5.0%)
Total profiling 10.94 s 439.522 ms (4.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.022 s -
Agent appsec 1.167 s 145.421 ms (14.2%)
Agent iast 1.147 s 125.125 ms (12.2%)
Agent profiling 1.283 s 261.337 ms (25.6%)
Total tracing 10.598 s -
Total appsec 10.741 s 143.04 ms (1.3%)
Total iast 10.954 s 355.815 ms (3.4%)
Total profiling 10.791 s 192.792 ms (1.8%)
gantt
    title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~bdeda1ddf7, baseline=1.50.0-SNAPSHOT~f21ec9ed7b

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (683.243 ms) : 0, 683243
BytebuddyAgent [candidate] (683.764 ms) : 0, 683764
GlobalTracer [baseline] (241.194 ms) : 0, 241194
GlobalTracer [candidate] (241.28 ms) : 0, 241280
AppSec [baseline] (54.476 ms) : 0, 54476
AppSec [candidate] (54.878 ms) : 0, 54878
Debugger [baseline] (8.938 ms) : 0, 8938
Debugger [candidate] (6.962 ms) : 0, 6962
Remote Config [baseline] (707.4 µs) : 0, 707
Remote Config [candidate] (700.846 µs) : 0, 701
Telemetry [baseline] (8.973 ms) : 0, 8973
Telemetry [candidate] (10.569 ms) : 0, 10569
section appsec
BytebuddyAgent [baseline] (699.822 ms) : 0, 699822
BytebuddyAgent [candidate] (704.102 ms) : 0, 704102
GlobalTracer [baseline] (236.83 ms) : 0, 236830
GlobalTracer [candidate] (238.055 ms) : 0, 238055
AppSec [baseline] (175.434 ms) : 0, 175434
AppSec [candidate] (176.291 ms) : 0, 176291
Debugger [baseline] (5.947 ms) : 0, 5947
Debugger [candidate] (5.971 ms) : 0, 5971
Remote Config [baseline] (617.756 µs) : 0, 618
Remote Config [candidate] (623.959 µs) : 0, 624
Telemetry [baseline] (7.788 ms) : 0, 7788
Telemetry [candidate] (7.81 ms) : 0, 7810
IAST [baseline] (21.828 ms) : 0, 21828
IAST [candidate] (21.728 ms) : 0, 21728
section iast
BytebuddyAgent [baseline] (802.207 ms) : 0, 802207
BytebuddyAgent [candidate] (801.036 ms) : 0, 801036
GlobalTracer [baseline] (230.895 ms) : 0, 230895
GlobalTracer [candidate] (230.539 ms) : 0, 230539
AppSec [baseline] (49.426 ms) : 0, 49426
AppSec [candidate] (47.446 ms) : 0, 47446
Debugger [baseline] (5.919 ms) : 0, 5919
Debugger [candidate] (5.841 ms) : 0, 5841
Remote Config [baseline] (588.783 µs) : 0, 589
Remote Config [candidate] (582.282 µs) : 0, 582
Telemetry [baseline] (7.868 ms) : 0, 7868
Telemetry [candidate] (7.86 ms) : 0, 7860
IAST [baseline] (28.256 ms) : 0, 28256
IAST [candidate] (30.241 ms) : 0, 30241
section profiling
BytebuddyAgent [baseline] (674.305 ms) : 0, 674305
BytebuddyAgent [candidate] (675.246 ms) : 0, 675246
GlobalTracer [baseline] (376.937 ms) : 0, 376937
GlobalTracer [candidate] (376.002 ms) : 0, 376002
AppSec [baseline] (62.518 ms) : 0, 62518
AppSec [candidate] (62.349 ms) : 0, 62349
Debugger [baseline] (6.223 ms) : 0, 6223
Debugger [candidate] (6.263 ms) : 0, 6263
Remote Config [baseline] (660.915 µs) : 0, 661
Remote Config [candidate] (657.156 µs) : 0, 657
Telemetry [baseline] (8.277 ms) : 0, 8277
Telemetry [candidate] (8.267 ms) : 0, 8267
ProfilingAgent [baseline] (103.961 ms) : 0, 103961
ProfilingAgent [candidate] (103.646 ms) : 0, 103646
Profiling [baseline] (103.984 ms) : 0, 103984
Profiling [candidate] (103.669 ms) : 0, 103669
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~bdeda1ddf7, baseline=1.50.0-SNAPSHOT~f21ec9ed7b

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.026 s) : 0, 1026083
Total [baseline] (8.702 s) : 0, 8701716
Agent [candidate] (1.027 s) : 0, 1027320
Total [candidate] (8.713 s) : 0, 8712821
section iast
Agent [baseline] (1.145 s) : 0, 1144857
Total [baseline] (9.23 s) : 0, 9230003
Agent [candidate] (1.157 s) : 0, 1157029
Total [candidate] (9.283 s) : 0, 9283487
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.151 s) : 0, 1150551
Total [baseline] (9.239 s) : 0, 9239309
Agent [candidate] (1.148 s) : 0, 1148219
Total [candidate] (9.196 s) : 0, 9195593
section iast_TELEMETRY_OFF
Agent [baseline] (1.154 s) : 0, 1154481
Total [baseline] (9.257 s) : 0, 9257229
Agent [candidate] (1.153 s) : 0, 1153276
Total [candidate] (9.269 s) : 0, 9269271
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.026 s -
Agent iast 1.145 s 118.774 ms (11.6%)
Agent iast_HARDCODED_SECRET_DISABLED 1.151 s 124.468 ms (12.1%)
Agent iast_TELEMETRY_OFF 1.154 s 128.398 ms (12.5%)
Total tracing 8.702 s -
Total iast 9.23 s 528.287 ms (6.1%)
Total iast_HARDCODED_SECRET_DISABLED 9.239 s 537.593 ms (6.2%)
Total iast_TELEMETRY_OFF 9.257 s 555.513 ms (6.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.027 s -
Agent iast 1.157 s 129.708 ms (12.6%)
Agent iast_HARDCODED_SECRET_DISABLED 1.148 s 120.899 ms (11.8%)
Agent ias 8000 t_TELEMETRY_OFF 1.153 s 125.956 ms (12.3%)
Total tracing 8.713 s -
Total iast 9.283 s 570.666 ms (6.5%)
Total iast_HARDCODED_SECRET_DISABLED 9.196 s 482.772 ms (5.5%)
Total iast_TELEMETRY_OFF 9.269 s 556.451 ms (6.4%)
gantt
    title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~bdeda1ddf7, baseline=1.50.0-SNAPSHOT~f21ec9ed7b

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (687.16 ms) : 0, 687160
BytebuddyAgent [candidate] (686.83 ms) : 0, 686830
GlobalTracer [baseline] (241.554 ms) : 0, 241554
GlobalTracer [candidate] (241.682 ms) : 0, 241682
AppSec [baseline] (54.684 ms) : 0, 54684
AppSec [candidate] (55.607 ms) : 0, 55607
Debugger [baseline] (7.637 ms) : 0, 7637
Debugger [candidate] (9.093 ms) : 0, 9093
Remote Config [baseline] (712.964 µs) : 0, 713
Remote Config [candidate] (695.501 µs) : 0, 696
Telemetry [baseline] (10.636 ms) : 0, 10636
Telemetry [candidate] (9.727 ms) : 0, 9727
section iast
BytebuddyAgent [baseline] (798.925 ms) : 0, 798925
BytebuddyAgent [candidate] (808.081 ms) : 0, 808081
GlobalTracer [baseline] (229.859 ms) : 0, 229859
GlobalTracer [candidate] (231.86 ms) : 0, 231860
IAST [baseline] (26.593 ms) : 0, 26593
IAST [candidate] (29.096 ms) : 0, 29096
AppSec [baseline] (50.973 ms) : 0, 50973
AppSec [candidate] (49.873 ms) : 0, 49873
Debugger [baseline] (5.858 ms) : 0, 5858
Debugger [candidate] (5.953 ms) : 0, 5953
Remote Config [baseline] (586.698 µs) : 0, 587
Remote Config [candidate] (609.766 µs) : 0, 610
Telemetry [baseline] (7.833 ms) : 0, 7833
Telemetry [candidate] (7.963 ms) : 0, 7963
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (803.278 ms) : 0, 803278
BytebuddyAgent [candidate] (801.128 ms) : 0, 801128
GlobalTracer [baseline] (230.843 ms) : 0, 230843
GlobalTracer [candidate] (230.213 ms) : 0, 230213
IAST [baseline] (28.405 ms) : 0, 28405
IAST [candidate] (28.406 ms) : 0, 28406
AppSec [baseline] (49.343 ms) : 0, 49343
AppSec [candidate] (50.568 ms) : 0, 50568
Debugger [baseline] (5.863 ms) : 0, 5863
Debugger [candidate] (5.905 ms) : 0, 5905
Remote Config [baseline] (567.297 µs) : 0, 567
Remote Config [candidate] (589.701 µs) : 0, 590
Telemetry [baseline] (7.914 ms) : 0, 7914
Telemetry [candidate] (7.916 ms) : 0, 7916
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (805.537 ms) : 0, 805537
BytebuddyAgent [candidate] (804.881 ms) : 0, 804881
GlobalTracer [baseline] (231.901 ms) : 0, 231901
GlobalTracer [candidate] (232.146 ms) : 0, 232146
IAST [baseline] (22.658 ms) : 0, 22658
IAST [candidate] (23.968 ms) : 0, 23968
AppSec [baseline] (56.244 ms) : 0, 56244
AppSec [candidate] (54.253 ms) : 0, 54253
Debugger [baseline] (5.98 ms) : 0, 5980
Debugger [candidate] (5.998 ms) : 0, 5998
Remote Config [baseline] (616.036 µs) : 0, 616
Remote Config [candidate] (604.372 µs) : 0, 604
Telemetry [baseline] (7.858 ms) : 0, 7858
Telemetry [candidate] (7.827 ms) : 0, 7827
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-05-13T15:47:39 2025-05-13T15:55:26
git_branch master nicholas.hulston/pass-lambda-request-id-to-extension
git_commit_date 1747134305 1747150454
git_commit_sha f21ec9e bdeda1d
release_version 1.50.0-SNAPSHOT~f21ec9ed7b 1.50.0-SNAPSHOT~bdeda1ddf7
start_time 2025-05-13T15:47:24 2025-05-13T15:55:12
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1747152124 1747152124
ci_job_id 936142383 936142383
ci_pipeline_id 64960576 64960576
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-rjy-nsnn-project-304-concurrent-0-ze7vysz2 6.8.0-1028-aws #30~22.04.1-Ubuntu SMP Sun Apr 20 06:03:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-rjy-nsnn-project-304-concurrent-0-ze7vysz2 6.8.0-1028-aws #30~22.04.1-Ubuntu SMP Sun Apr 20 06:03:30 UTC 2025 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, 18 unstable metrics.

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~bdeda1ddf7, baseline=1.50.0-SNAPSHOT~f21ec9ed7b
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.355 ms) : 1336, 1375
.   : milestone, 1355,
appsec (1.744 ms) : 1721, 1768
.   : milestone, 1744,
appsec_no_iast (1.732 ms) : 1708, 1755
.   : milestone, 1732,
code_origins (1.696 ms) : 1668, 1723
.   : milestone, 1696,
iast (1.516 ms) : 1492, 1539
.   : milestone, 1516,
profiling (1.534 ms) : 1511, 1557
.   : milestone, 1534,
tracing (1.499 ms) : 1474, 1524
.   : milestone, 1499,
section candidate
no_agent (1.359 ms) : 1340, 1378
.   : milestone, 1359,
appsec (1.733 ms) : 1709, 1757
.   : milestone, 1733,
appsec_no_iast (1.714 ms) : 1691, 1737
.   : milestone, 1714,
code_origins (1.675 ms) : 1648, 1702
.   : milestone, 1675,
iast (1.525 ms) : 1500, 1550
.   : milestone, 1525,
profiling (1.509 ms) : 1485, 1533
.   : milestone, 1509,
tracing (1.506 ms) : 1481, 1530
.   : milestone, 1506,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.355 ms [1.336 ms, 1.375 ms] -
appsec 1.744 ms [1.721 ms, 1.768 ms] 389.221 µs (28.7%)
appsec_no_iast 1.732 ms [1.708 ms, 1.755 ms] 376.482 µs (27.8%)
code_origins 1.696 ms [1.668 ms, 1.723 ms] 340.435 µs (25.1%)
iast 1.516 ms [1.492 ms, 1.539 ms] 160.534 µs (11.8%)
profiling 1.534 ms [1.511 ms, 1.557 ms] 179.057 µs (13.2%)
tracing 1.499 ms [1.474 ms, 1.524 ms] 143.485 µs (10.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.359 ms [1.34 ms, 1.378 ms] -
appsec 1.733 ms [1.709 ms, 1.757 ms] 373.48 µs (27.5%)
appsec_no_iast 1.714 ms [1.691 ms, 1.737 ms] 354.887 µs (26.1%)
code_origins 1.675 ms [1.648 ms, 1.702 ms] 316.201 µs (23.3%)
iast 1.525 ms [1.5 ms, 1.55 ms] 165.997 µs (12.2%)
profiling 1.509 ms [1.485 ms, 1.533 ms] 149.572 µs (11.0%)
tracing 1.506 ms [1.481 ms, 1.53 ms] 146.437 µs (10.8%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~bdeda1ddf7, baseline=1.50.0-SNAPSHOT~f21ec9ed7b
    dateFormat X
    axisFormat %s
section baseline
no_agent (382.292 µs) : 362, 402
.   : milestone, 382,
iast (524.979 µs) : 502, 548
.   : milestone, 525,
iast_FULL (736.926 µs) : 715, 759
.   : milestone, 737,
iast_GLOBAL (560.992 µs) : 539, 583
.   : milestone, 561,
iast_HARDCODED_SECRET_DISABLED (524.25 µs) : 502, 547
.   : milestone, 524,
iast_INACTIVE (460.224 µs) : 438, 482
.   : milestone, 460,
iast_TELEMETRY_OFF (511.327 µs) : 488, 535
.   : milestone, 511,
tracing (462.64 µs) : 441, 485
.   : milestone, 463,
section candidate
no_agent (380.34 µs) : 360, 400
.   : milestone, 380,
iast (511.433 µs) : 490, 533
.   : milestone, 511,
iast_FULL (737.888 µs) : 716, 760
.   : milestone, 738,
iast_GLOBAL (564.603 µs) : 541, 588
.   : milestone, 565,
iast_HARDCODED_SECRET_DISABLED (528.943 µs) : 506, 552
.   : milestone, 529,
iast_INACTIVE (464.743 µs) : 443, 486
.   : milestone, 465,
iast_TELEMETRY_OFF (503.267 µs) : 480, 526
.   : milestone, 503,
tracing (464.808 µs) : 442, 487
.   : milestone, 465,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 382.292 µs [362.463 µs, 402.12 µs] -
iast 524.979 µs [501.696 µs, 548.261 µs] 142.687 µs (37.3%)
iast_FULL 736.926 µs [714.974 µs, 758.877 µs] 354.634 µs (92.8%)
iast_GLOBAL 560.992 µs [539.152 µs, 582.832 µs] 178.7 µs (46.7%)
iast_HARDCODED_SECRET_DISABLED 524.25 µs [501.552 µs, 546.949 µs] 141.959 µs (37.1%)
iast_INACTIVE 460.224 µs [437.972 µs, 482.475 µs] 77.932 µs (20.4%)
iast_TELEMETRY_OFF 511.327 µs [487.881 µs, 534.772 µs] 129.035 µs (33.8%)
tracing 462.64 µs [440.532 µs, 484.747 µs] 80.348 µs (21.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 380.34 µs [360.279 µs, 400.4 µs] -
iast 511.433 µs [489.983 µs, 532.882 µs] 131.093 µs (34.5%)
iast_FULL 737.888 µs [716.118 µs, 759.658 µs] 357.548 µs (94.0%)
iast_GLOBAL 564.603 µs [541.247 µs, 587.959 µs] 184.263 µs (48.4%)
iast_HARDCODED_SECRET_DISABLED 528.943 µs [506.231 µs, 551.655 µs] 148.603 µs (39.1%)
iast_INACTIVE 464.743 µs [443.415 µs, 486.071 µs] 84.403 µs (22.2%)
iast_TELEMETRY_OFF 503.267 µs [480.113 µs, 526.421 µs] 122.927 µs (32.3%)
tracing 464.808 µs [442.254 µs, 487.362 µs] 84.468 µs (22.2%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master nicholas.hulston/pass-lambda-request-id-to-extension
git_commit_date 1747134305 1747150454
git_commit_sha f21ec9e bdeda1d
release_version 1.50.0-SNAPSHOT~f21ec9ed7b 1.50.0-SNAPSHOT~bdeda1ddf7
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1747152514 1747152514
ci_job_id 936142384 936142384
ci_pipeline_id 64960576 64960576
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-vmsxy27x-project-304-concurrent-1-va8uwczw 6.8.0-1028-aws #30~22.04.1-Ubuntu SMP Sun Apr 20 06:03:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-vmsxy27x-project-304-concurrent-1-va8uwczw 6.8.0-1028-aws #30~22.04.1-Ubuntu SMP Sun Apr 20 06:03:30 UTC 2025 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.50.0-SNAPSHOT~bdeda1ddf7, baseline=1.50.0-SNAPSHOT~f21ec9ed7b
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.441 s) : 15441000, 15441000
.   : milestone, 15441000,
appsec (15.083 s) : 15083000, 15083000
.   : milestone, 15083000,
iast (18.921 s) : 18921000, 18921000
.   : milestone, 18921000,
iast_GLOBAL (18.24 s) : 18240000, 18240000
.   : milestone, 18240000,
profiling (15.501 s) : 15501000, 15501000
.   : milestone, 15501000,
tracing (14.926 s) : 14926000, 14926000
.   : milestone, 14926000,
section candidate
no_agent (14.847 s) : 14847000, 14847000
.   : milestone, 14847000,
appsec (14.849 s) : 14849000, 14849000
.   : milestone, 14849000,
iast (18.739 s) : 18739000, 18739000
.   : milestone, 18739000,
iast_GLOBAL (17.836 s) : 17836000, 17836000
.   : milestone, 17836000,
profiling (15.489 s) : 15489000, 15489000
.   : milestone, 15489000,
tracing (15.012 s) : 15012000, 15012000
.   : milestone, 15012000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.441 s [15.441 s, 15.441 s] -
appsec 15.083 s [15.083 s, 15.083 s] -358.0 ms (-2.3%)
iast 18.921 s [18.921 s, 18.921 s] 3.48 s (22.5%)
iast_GLOBAL 18.24 s [18.24 s, 18.24 s] 2.799 s (18.1%)
profiling 15.501 s [15.501 s, 15.501 s] 60.0 ms (0.4%)
tracing 14.926 s [14.926 s, 14.926 s] -515.0 ms (-3.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.847 s [14.847 s, 14.847 s] -
appsec 14.849 s [14.849 s, 14.849 s] 2.0 ms (0.0%)
iast 18.739 s [18.739 s, 18.739 s] 3.892 s (26.2%)
iast_GLOBAL 17.836 s [17.836 s, 17.836 s] 2.989 s (20.1%)
profiling 15.489 s [15.489 s, 15.489 s] 642.0 ms (4.3%)
tracing 15.012 s [15.012 s, 15.012 s] 165.0 ms (1.1%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~bdeda1ddf7, baseline=1.50.0-SNAPSHOT~f21ec9ed7b
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.487 ms) : 1476, 1499
.   : milestone, 1487,
appsec (2.419 ms) : 2370, 2469
.   : milestone, 2419,
iast (2.206 ms) : 2144, 2268
.   : milestone, 2206,
iast_GLOBAL (2.25 ms) : 2187, 2313
.   : milestone, 2250,
profiling (2.063 ms) : 2011, 2114
.   : milestone, 2063,
tracing (2.033 ms) : 1985, 2082
.   : milestone, 2033,
section candidate
no_agent (1.486 ms) : 1474, 1498
.   : milestone, 1486,
appsec (2.419 ms) : 2370, 2468
.   : milestone, 2419,
iast (2.197 ms) : 2135, 2260
.   : milestone, 2197,
iast_GLOBAL (2.239 ms) : 2176, 2301
.   : milestone, 2239,
profiling (2.057 ms) : 2007, 2107
.   : milestone, 2057,
tracing (2.012 ms) : 1964, 2060
.   : milestone, 2012,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.487 ms [1.476 ms, 1.499 ms] -
appsec 2.419 ms [2.37 ms, 2.469 ms] 931.807 µs (62.7%)
iast 2.206 ms [2.144 ms, 2.268 ms] 718.851 µs (48.3%)
iast_GLOBAL 2.25 ms [2.187 ms, 2.313 ms] 762.779 µs (51.3%)
profiling 2.063 ms [2.011 ms, 2.114 ms] 575.566 µs (38.7%)
tracing 2.033 ms [1.985 ms, 2.082 ms] 545.973 µs (36.7%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.486 ms [1.474 ms, 1.498 ms] -
appsec 2.419 ms [2.37 ms, 2.468 ms] 933.112 µs (62.8%)
iast 2.197 ms [2.135 ms, 2.26 ms] 711.381 µs (47.9%)
iast_GLOBAL 2.239 ms [2.176 ms, 2.301 ms] 752.854 µs (50.7%)
profiling 2.057 ms [2.007 ms, 2.107 ms] 570.944 µs (38.4%)
tracing 2.012 ms [1.964 ms, 2.06 ms] 525.908 µs (35.4%)

@nhulston nhulston marked this pull request as ready for review May 13, 2025 17:15
@nhulston nhulston requested a review from a team as a code owner May 13, 2025 17:15
Comment on lines -82 to +85
@Advice.Argument(0) final Object event,
@Advice.Argument(0) final Object in,
@Advice.Argument(1) final Object out,
@Advice.Argument(2) final Context awsContext,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a Lambda handler method header with 2 arguments and 3 arguments. The 2-arg header calls the 3-arg header under-the-hood, so as long as we instrument the 3-arg header, we support all cases.

We were already instrumenting the 3-arg header thanks to #8264;
this change just specifies all 3 arguments but doesn't change what we're actually instrumenting.

So TLDR this is non-breaking

@@ -79,20 +80,24 @@ public static class ExtensionCommunicationAdvice {
@OnMethodEnter
static AgentScope enter(
@This final Object that,
@Advice.Argument(0) final Object event,
@Advice.Argument(0) final Object in,

Choose a reason for hiding this comment

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

Should we keep calling it event?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The 2-arg handler takes args (InputType input, Context context) and the 3-arg handler tags args (InputStream input, OutputStream output, Context context) so in/out is better than event here

Choose a reason for hiding this comment

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

Ah, got it, thanks!

Choose a reason for hiding this comment

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

Maybe add a comment about the different types of handlers? Is it worth adding here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops I already merged, but the PR from https://github.com/DataDog/dd-trace-java/pull/8264/files added some comments explaining this

@nhulston nhulston merged commit 6459b5e into master May 13, 2025
593 of 595 checks passed
@nhulston nhulston deleted the nicholas.hulston/pass-lambda-request-id-to-extension branch May 13, 2025 17:45
@github-actions github-actions bot added this to the 1.50.0 milestone May 13, 2025
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Jun 20, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
| [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.49.0` -> `1.50.0` |

---

### Release Notes

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

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

### Deprecation Notice

> \[!NOTE]
> `DD_RUNTIME_ID_ENABLED` has been deprecated and will be removed in
future releases. Please use `DD_RUNTIME_METRICS_RUNTIME_ID_ENABLED`
instead.

### Components

#### Application Security Management (WAF)

- 🐛 Add String length truncation limit to ObjectIntrospector and
update truncation metrics
([#&#8203;8825](DataDog/dd-trace-java#8825) -
[@&#8203;jandro996](https://github.com/jandro996))
- 🐛 Adapt standalone ASM to support API Security
([#&#8203;8804](DataDog/dd-trace-java#8804) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Add appsec.waf.input\_truncated metric
([#&#8203;8791](DataDog/dd-trace-java#8791) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Extended appsec request body collection
([#&#8203;8748](DataDog/dd-trace-java#8748) -
[@&#8203;jandro996](https://github.com/jandro996))
- ✨ Extended appsec request/response headers collection
([#&#8203;8724](DataDog/dd-trace-java#8724) -
[@&#8203;jandro996](https://github.com/jandro996))

#### Build & Tooling

- ✨ Add artifacts to public s3 bucket
([#&#8203;8947](DataDog/dd-trace-java#8947) -
[@&#8203;randomanderson](https://github.com/randomanderson))

#### Continuous Integration Visibility

- ✨ Improve PR information building
([#&#8203;8908](DataDog/dd-trace-java#8908) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Truncate span stack traces when Test Optimization is
enabled
([#&#8203;8903](DataDog/dd-trace-java#8903) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🐛 Ensure auto-detected service name is the same for every process
in the same build
([#&#8203;8902](DataDog/dd-trace-java#8902) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- 🐛 Use tag as fallback in api requests if no branch is available
([#&#8203;8876](DataDog/dd-trace-java#8876) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Add support for JUnit 5.13-RC1
([#&#8203;8865](DataDog/dd-trace-java#8865),
[#&#8203;8871](DataDog/dd-trace-java#8871) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Implement attempt to fix v3 and v4 and bump capability
version
([#&#8203;8824](DataDog/dd-trace-java#8824) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- 🧹 Align retry logic for all test framework instrumentations
([#&#8203;8803](DataDog/dd-trace-java#8803) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- 🐛 Always build ci workspace without trailing separator
([#&#8203;8788](DataDog/dd-trace-java#8788) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))
- ✨ Add commit discrepancies telemetry when building repository
git information
([#&#8203;8763](DataDog/dd-trace-java#8763) -
[@&#8203;daniel-mohedano](https://github.com/daniel-mohedano))

#### Data Streams Monitoring

- 💡 Surface process tags in dsm payloads and use them for base hash
calculation
([#&#8203;8836](DataDog/dd-trace-java#8836) -
[@&#8203;amarziali](https://github.com/amarziali))

#### Dynamic Instrumentation

- ✨ Optimized allocations for collection filter functions
([#&#8203;8896](DataDog/dd-trace-java#8896) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Fix SymDB upload size check
([#&#8203;8887](DataDog/dd-trace-java#8887) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Add support for Set in filter function
([#&#8203;8873](DataDog/dd-trace-java#8873) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Add support for isDefined in log template
([#&#8203;8859](DataDog/dd-trace-java#8859) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Fix Max captured frames for Exception Replay
([#&#8203;8856](DataDog/dd-trace-java#8856) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Remove static inherited fields collection
([#&#8203;8832](DataDog/dd-trace-java#8832) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 💡 Add process tags to dynamic instrumentation intake payload
([#&#8203;8779](DataDog/dd-trace-java#8779) -
[@&#8203;amarziali](https://github.com/amarziali))

#### GraalVM native-image

- ✨ Add support for GraalVM Native GC metrics
([#&#8203;8913](DataDog/dd-trace-java#8913) -
[@&#8203;ygree](https://github.com/ygree))
- ✨ Add JMXFetch support for GraalVM Native
([#&#8203;8569](DataDog/dd-trace-java#8569) -
[@&#8203;ygree](https://github.com/ygree))

#### JMX fetch

- ✨ Add support for GraalVM Native GC metrics
([#&#8203;8913](DataDog/dd-trace-java#8913) -
[@&#8203;ygree](https://github.com/ygree))

#### Library Injection

- ✨ Deny oracle db jvm based tools
([#&#8203;8909](DataDog/dd-trace-java#8909) -
[@&#8203;bric3](https://github.com/bric3))

#### OpenTracing

- 🐛 Fix OT packaging for exception replay
([#&#8203;8912](DataDog/dd-trace-java#8912) -
[@&#8203;jpbempel](https://github.com/jpbempel))

#### Profiling

- ✨ Bump ddprof to 1.27.0
([#&#8203;8893](DataDog/dd-trace-java#8893) -
[@&#8203;jbachorik](https://github.com/jbachorik))
- Properly handle the adaptive sampling interval overflow by
[@&#8203;jbachorik](https://github.com/jbachorik) in
DataDog/java-profiler#213
- Fix [#&#8203;200](DataDog/dd-trace-java#200)
Crash related to aligned\_alloc and free in context by
[@&#8203;yanglong1010](https://github.com/yanglong1010) in
DataDog/java-profiler#208
- Explicitly initialize empty context page by
[@&#8203;jbachorik](https://github.com/jbachorik) in
DataDog/java-profiler#210
- Re-connect crash recursion protection with VM stackwalker by
[@&#8203;jbachorik](https://github.com/jbachorik) in
DataDog/java-profiler#214
- ✨ Enable ZSTD compression for profiling
([#&#8203;8862](DataDog/dd-trace-java#8862) -
[@&#8203;MattAlp](https://github.com/MattAlp))
- ✨ Extend JPS re-implementation to J9 family
([#&#8203;8813](DataDog/dd-trace-java#8813) -
[@&#8203;MattAlp](https://github.com/MattAlp))
- 💡 Collect process tags for profiling upload requests
([#&#8203;8780](DataDog/dd-trace-java#8780) -
[@&#8203;amarziali](https://github.com/amarziali))

#### Telemetry

- 💡 Surface process tags on telemetry payloads
([#&#8203;8837](DataDog/dd-trace-java#8837) -
[@&#8203;amarziali](https://github.com/amarziali))

#### Trace context propagation

- ✨ Migrating all HttpClient Instrumentations to Inject Full
Context
([#&#8203;8826](DataDog/dd-trace-java#8826) -
[@&#8203;mhlidd](https://github.com/mhlidd))
- ✨ Migrating all HttpServer Instrumentations to Extract full
Context
([#&#8203;8820](DataDog/dd-trace-java#8820) -
[@&#8203;mhlidd](https://github.com/mhlidd))
- ✨ Add context API support OTel propagators
([#&#8203;8770](DataDog/dd-trace-java#8770) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))

#### Tracer core

- ✨⚡ Skip JAXB generated classes classloader
([#&#8203;9003](DataDog/dd-trace-java#9003) -
[@&#8203;bric3](https://github.com/bric3))
- ✨ Add DD\_RUNTIME\_METRICS\_RUNTIME\_ID\_ENABLED alias for
runtime id generation
([#&#8203;8981](DataDog/dd-trace-java#8981) -
[@&#8203;amarziali](https://github.com/amarziali))
- 🐛 Use resolved address for peer.hostname when available without
hitting the cache
([#&#8203;8915](DataDog/dd-trace-java#8915) -
[@&#8203;amarziali](https://github.com/amarziali))
- 💡 Surface server name process tag for tomcat
([#&#8203;8894](DataDog/dd-trace-java#8894) -
[@&#8203;amarziali](https://github.com/amarziali))
- 💡 Surface websphere cell and server name on process tags
([#&#8203;8880](DataDog/dd-trace-java#8880) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Added special lightweight pre-main class that skips
installation on incompatible JVMs.
([#&#8203;8855](DataDog/dd-trace-java#8855)
8000
 -
[@&#8203;AlexeyKuznetsov-DD](https://github.com/AlexeyKuznetsov-DD))
- 💡 Add entrypoint type to process tags
([#&#8203;8839](DataDog/dd-trace-java#8839) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Extend JPS re-implementation to J9 family
([#&#8203;8813](DataDog/dd-trace-java#8813) -
[@&#8203;MattAlp](https://github.com/MattAlp))
- ✨ Notify listeners when the scope top changes after switching
scope stacks
([#&#8203;8797](DataDog/dd-trace-java#8797) -
[@&#8203;mcculls](https://github.com/mcculls))
- ✨ Read hsperfdata for Java PIDs if jvmstat is unavailable
([#&#8203;8792](DataDog/dd-trace-java#8792) -
[@&#8203;MattAlp](https://github.com/MattAlp))
- 🐛 Turn JDK socket support on by default
([#&#8203;8752](DataDog/dd-trace-java#8752) -
[@&#8203;sarahchen6](https://github.com/sarahchen6))
- ✨ Simplify context propagation
([#&#8203;8719](DataDog/dd-trace-java#8719) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))
- ✨ Add JSON parsing support
([#&#8203;8579](DataDog/dd-trace-java#8579) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))

#### Tracer internal logging

- ✨ Fix printing format of span identifiers
([#&#8203;8897](DataDog/dd-trace-java#8897) -
[@&#8203;vandonr](https://github.com/vandonr))

#### Tracer public API

- 💡 Track the source of installation
([#&#8203;8956](DataDog/dd-trace-java#8956) -
[@&#8203;mabdinur](https://github.com/mabdinur))
- ✨ Enforce size limit on application\_monitoring.yaml files
([#&#8203;8789](DataDog/dd-trace-java#8789) -
[@&#8203;mtoffl01](https://github.com/mtoffl01))
- ✨ Enabling baggage cache to support limits and non-ascii
characters
([#&#8203;8713](DataDog/dd-trace-java#8713) -
[@&#8203;mhlidd](https://github.com/mhlidd))

### Instrumentations

#### AWS Lambda instrumentation

- ✨ Pass Lambda Request ID to Extension
([#&#8203;8814](DataDog/dd-trace-java#8814) -
[@&#8203;nhulston](https://github.com/nhulston))

#### Core Java language instrumentation

- ✨ Ensure ClassloadingInstrumentation is always applied even
with `DD_TRACE_ENABLED=false`
([#&#8203;8863](DataDog/dd-trace-java#8863) -
[@&#8203;mcculls](https://github.com/mcculls))

#### Eclipse Vert.x instrumentation

- 🐛 Do not override route with / in vertx instrumentation
([#&#8203;8881](DataDog/dd-trace-java#8881) -
[@&#8203;vandonr](https://github.com/vandonr))

#### IBM Liberty

- 🐛 Fix error mark on http status for IBM liberty
([#&#8203;8822](DataDog/dd-trace-java#8822) -
[@&#8203;amarziali](https://github.com/amarziali))

#### JDBC instrumentation

- 🐛 Do not prepend DBM <> APM trace comment in SQLCommenter if there
is a pg plan hint
([#&#8203;8864](DataDog/dd-trace-java#8864) -
[@&#8203;edengorevoy](https://github.com/edengorevoy))

#### JMS instrumentation

- ✨ Add jms as an extra integration name where there is JMS
involved
([#&#8203;8933](DataDog/dd-trace-java#8933) -
[@&#8203;vandonr](https://github.com/vandonr))

#### Kotlin instrumentation

- ✨ Enable kotlin\_coroutine integration by default
([#&#8203;8848](DataDog/dd-trace-java#8848) -
[@&#8203;mcculls](https://github.com/mcculls))
- 🧹 Rework Kotlin coroutines instrumentation around coroutine
context
([#&#8203;8774](DataDog/dd-trace-java#8774) -
[@&#8203;mcculls](https://github.com/mcculls))

#### OpenTelemetry instrumentation

- 🐛 Support WithSpan inheritContext attribute
([#&#8203;8858](DataDog/dd-trace-java#8858) -
[@&#8203;amarziali](https://github.com/amarziali))
- ✨ Add context API support OTel propagators
([#&#8203;8770](DataDog/dd-trace-java#8770) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))

#### Play Framework instrumentation

- 🐛 Fix the Play Framework's span resource name priority so that the
client JAX-RS 404 cannot override it
([#&#8203;8591](DataDog/dd-trace-java#8591) -
[@&#8203;ygree](https://github.com/ygree))

#### Quarkus Instrumentation

- 🐛 Ignore quarkus jaxrs stubs and cdi wrapper proxies
([#&#8203;8891](DataDog/dd-trace-java#8891) -
[@&#8203;amarziali](https://github.com/amarziali))

#### ServiceTalk

- ✨ Improve ServiceTalk Captured Context API Instrumentation
for v0.42.56+
([#&#8203;8821](DataDog/dd-trace-java#8821) -
[@&#8203;ygree](https://github.com/ygree))

#### Spring instrumentation

- ✨ Supporting Baggage for Instrumentations used in Weblog
Tests
([#&#8203;8773](DataDog/dd-trace-java#8773) -
[@&#8203;mhlidd](https://github.com/mhlidd))

#### WebSocket Instrumentation

- 💡 Trace websocket for spring webflux reactive handlers
([#&#8203;8831](DataDog/dd-trace-java#8831) -
[@&#8203;amarziali](https://github.com/amarziali))
- 💡:test\_tube: WebSocket support for Netty
([#&#8203;8632](DataDog/dd-trace-java#8632) -
[@&#8203;ValentinZakharov](https://github.com/ValentinZakharov))

#### Zio Instrumentation

- 🧹 Cleanup Zio fiber instrumentation to avoid repeated activation
of continuation
([#&#8203;8798](DataDog/dd-trace-java#8798) -
[@&#8203;mcculls](https://github.com/mcculls))

</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**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- 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: 9207366cdb6a1bd098082305d354a0a3c4622d7a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inst: aws lambda AWS Lambda instrumentation type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0