Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Properly capture lambda payloads for all handler types. #8264

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

purple4reina
Copy link
Contributor

@purple4reina purple4reina commented Jan 21, 2025

What Does This Do

Fixes regression described in #8247

Motivation

Additional Notes

Under the hood, the lambda runtime will convert non-streaming handlers to streaming handlers. (see https://github.com/cagataygurturk/lambda-java-runtime/blob/99706a1db64f95f8f86d3db96ca8a39297d1b669/lambdainternal/EventHandlerLoader.java#L721).

When both the non-streaming and streaming handlers were instrumented, only the streaming instrumentation would execute.

Thanks to #5422 we are able to properly capture the inbound event payloads for streaming handlers.

This PR uses that same logic to extract response payloads from response OutputStream objects.

Now that we are only relying on the streaming handler instrumentation, the non-streaming instrumentation can be removed.

Testing

A lambda layer for this PR was published to serverless sandbox as arn:aws:lambda:us-east-1:425362996713:layer:dd-trace-java-REY:1

The Trace Propagation Functional Tests were run using this layer (note that there are other unrelated failures in the test run). See https://github.com/DataDog/serverless-self-monitoring/actions/runs/12895384522

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@purple4reina purple4reina requested review from a team as code owners January 21, 2025 21:13
@purple4reina purple4reina requested a review from smola January 21, 2025 21:13
Copy link
Contributor

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.

@purple4reina purple4reina added type: bug inst: aws lambda AWS Lambda instrumentation labels Jan 21, 2025
@pr-commenter
Copy link

pr-commenter bot commented Jan 21, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master rey.abolofia/lambda-payloads
git_commit_date 1737649960 1737650153
git_commit_sha 64e6e86 adb1dce
release_version 1.46.0-SNAPSHOT~64e6e864bc 1.46.0-SNAPSHOT~adb1dce868
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1737652669 1737652669
ci_job_id 778095974 778095974
ci_pipeline_id 53819129 53819129
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-qjprzoc-project-304-concurrent-0-8r2pmxgd 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-qjprzoc-project-304-concurrent-0-8r2pmxgd 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 1 performance improvements and 8 performance regressions! Performance is the same for 51 metrics, 3 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:iast:GlobalTracer worse
[+14.082ms; +21.872ms] or [+6.105%; +9.483%]
248.624ms 230.647ms
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:GlobalTracer worse
[+17.987ms; +20.026ms] or [+7.858%; +8.749%]
247.910ms 228.904ms
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:GlobalTracer worse
[+14.998ms; +20.564ms] or [+6.514%; +8.932%]
248.012ms 230.231ms
scenario:startup:insecure-bank:tracing:GlobalTracer worse
[+16.097ms; +18.200ms] or [+6.743%; +7.624%]
255.884ms 238.735ms
scenario:startup:insecure-bank:tracing:Remote Config worse
[+20.858µs; +50.371µs] or [+2.908%; +7.024%]
752.770µs 717.155µs
scenario:startup:petclinic:appsec:GlobalTracer worse
[+12.613ms; +19.401ms] or [+5.304%; +8.158%]
253.823ms 237.816ms
scenario:startup:petclinic:appsec:AppSec better
[-7.369ms; -4.750ms] or [-4.152%; -2.676%]
171.432ms 177.492ms
scenario:startup:petclinic:iast:GlobalTracer worse
[+15.903ms; +17.884ms] or [+6.891%; +7.749%]
247.693ms 230.799ms
scenario:startup:petclinic:tracing:GlobalTracer worse
[+15.089ms; +21.742ms] or [+6.321%; +9.108%]
257.122ms 238.707ms
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.46.0-SNAPSHOT~adb1dce868, baseline=1.46.0-SNAPSHOT~64e6e864bc

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.04 s) : 0, 1040178
Total [baseline] (8.635 s) : 0, 8635432
Agent [candidate] (1.057 s) : 0, 1056719
Total [candidate] (8.652 s) : 0, 8651938
section iast
Agent [baseline] (1.173 s) : 0, 1173288
Total [baseline] (9.252 s) : 0, 9251585
Agent [candidate] (1.193 s) : 0, 1192615
Total [candidate] (9.254 s) : 0, 9253750
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.165 s) : 0, 1165495
Total [baseline] (9.166 s) : 0, 9165523
Agent [candidate] (1.187 s) : 0, 1186862
Total [candidate] (9.245 s) : 0, 9245340
section iast_TELEMETRY_OFF
Agent [baseline] (1.171 s) : 0, 1170525
Total [baseline] (9.297 s) : 0, 9297184
Agent [candidate] (1.185 s) : 0, 1184738
Total [candidate] (9.225 s) : 0, 9225277
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.04 s -
Agent iast 1.173 s 133.109 ms (12.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.165 s 125.317 ms (12.0%)
Agent iast_TELEMETRY_OFF 1.171 s 130.346 ms (12.5%)
Total tracing 8.635 s -
Total iast 9.252 s 616.153 ms (7.1%)
Total iast_HARDCODED_SECRET_DISABLED 9.166 s 530.091 ms (6.1%)
Total iast_TELEMETRY_OFF 9.297 s 661.752 ms (7.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.057 s -
Agent iast 1.193 s 135.896 ms (12.9%)
Agent iast_HARDCODED_SECRET_DISABLED 1.187 s 130.143 ms (12.3%)
Agent iast_TELEMETRY_OFF 1.185 s 128.019 ms (12.1%)
Total tracing 8.652 s -
Total iast 9.254 s 601.813 ms (7.0%)
Total iast_HARDCODED_SECRET_DISABLED 9.245 s 593.402 ms (6.9%)
Total iast_TELEMETRY_OFF 9.225 s 573.339 ms (6.6%)
gantt
    title insecure-bank - break down per module: candidate=1.46.0-SNAPSHOT~adb1dce868, baseline=1.46.0-SNAPSHOT~64e6e864bc

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (715.758 ms) : 0, 715758
BytebuddyAgent [candidate] (715.239 ms) : 0, 715239
GlobalTracer [baseline] (238.735 ms) : 0, 238735
GlobalTracer [candidate] (255.884 ms) : 0, 255884
AppSec [baseline] (55.595 ms) : 0, 55595
AppSec [candidate] (55.638 ms) : 0, 55638
Remote Config [baseline] (717.155 µs) : 0, 717
Remote Config [candidate] (752.77 µs) : 0, 753
Telemetry [baseline] (14.333 ms) : 0, 14333
Telemetry [candidate] (14.274 ms) : 0, 14274
section iast
BytebuddyAgent [baseline] (837.27 ms) : 0, 837270
BytebuddyAgent [candidate] (839.009 ms) : 0, 839009
GlobalTracer [baseline] (230.647 ms) : 0, 230647
GlobalTracer [candidate] (248.624 ms) : 0, 248624
AppSec [baseline] (59.124 ms) : 0, 59124
AppSec [candidate] (58.558 ms) : 0, 58558
IAST [baseline] (21.659 ms) : 0, 21659
IAST [candidate] (21.668 ms) : 0, 21668
Remote Config [baseline] (678.842 µs) : 0, 679
Remote Config [candidate] (671.657 µs) : 0, 672
Telemetry [baseline] (8.905 ms) : 0, 8905
Telemetry [candidate] (8.912 ms) : 0, 8912
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (832.224 ms) : 0, 832224
BytebuddyAgent [candidate] (834.496 ms) : 0, 834496
GlobalTracer [baseline] (228.904 ms) : 0, 228904
GlobalTracer [candidate] (247.91 ms) : 0, 247910
AppSec [baseline] (58.517 ms) : 0, 58517
AppSec [candidate] (58.239 ms) : 0, 58239
IAST [baseline] (21.346 ms) : 0, 21346
IAST [candidate] (21.557 ms) : 0, 21557
Remote Config [baseline] (659.218 µs) : 0, 659
Remote Config [candidate] (668.869 µs) : 0, 669
Telemetry [baseline] (8.788 ms) : 0, 8788
Telemetry [candidate] (8.884 ms) : 0, 8884
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (835.926 ms) : 0, 835926
BytebuddyAgent [candidate] (833.114 ms) : 0, 833114
GlobalTracer [baseline] (230.231 ms) : 0, 230231
GlobalTracer [candidate] (248.012 ms) : 0, 248012
AppSec [baseline] (58.83 ms) : 0, 58830
AppSec [candidate] (57.997 ms) : 0, 57997
IAST [baseline] (20.961 ms) : 0, 20961
IAST [candidate] (21.129 ms) : 0, 21129
Remote Config [baseline] (649.439 µs) : 0, 649
Remote Config [candidate] (668.344 µs) : 0, 668
Telemetry [baseline] (8.767 ms) : 0, 8767
Telemetry [candidate] (8.701 ms) : 0, 8701
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.46.0-SNAPSHOT~adb1dce868, baseline=1.46.0-SNAPSHOT~64e6e864bc

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.036 s) : 0, 1035788
Total [baseline] (10.522 s) : 0, 10521814
Agent [candidate] (1.062 s) : 0, 1062318
Total [candidate] (10.526 s) : 0, 10525571
section appsec
Agent [baseline] (1.184 s) : 0, 1183885
Total [baseline] (10.769 s) : 0, 10769118
Agent [candidate] (1.192 s) : 0, 1191986
Total [candidate] (10.781 s) : 0, 10780741
section iast
Agent [baseline] (1.17 s) : 0, 1170170
Total [baseline] (10.911 s) : 0, 10911170
Agent [candidate] (1.185 s) : 0, 1185190
Total [candidate] (11.01 s) : 0, 11009928
section profiling
Agent [baseline] (1.252 s) : 0, 1252329
Total [baseline] (10.835 s) : 0, 10835339
Agent [candidate] (1.253 s) : 0, 1253111
Total [candidate] (10.789 s) : 0, 10789247
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.036 s -
Agent appsec 1.184 s 148.097 ms (14.3%)
Agent iast 1.17 s 134.382 ms (13.0%)
Agent profiling 1.252 s 216.541 ms (20.9%)
Total tracing 10.522 s -
Total appsec 10.769 s 247.304 ms (2.4%)
Total iast 10.911 s 389.357 ms (3.7%)
Total profiling 10.835 s 313.525 ms (3.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.062 s -
Agent appsec 1.192 s 129.668 ms (12.2%)
Agent iast 1.185 s 122.872 ms (11.6%)
Agent profiling 1.253 s 190.793 ms (18.0%)
Total tracing 10.526 s -
Total appsec 10.781 s 255.17 ms (2.4%)
Total iast 11.01 s 484.357 ms (4.6%)
Total profiling 10.789 s 263.676 ms (2.5%)
gantt
    title petclinic - break down per module: candidate=1.46.0-SNAPSHOT~adb1dce868, baseline=1.46.0-SNAPSHOT~64e6e864bc

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (713.587 ms) : 0, 713587
BytebuddyAgent [candidate] (719.147 ms) : 0, 719147
GlobalTracer [baseline] (238.707 ms) : 0, 238707
GlobalTracer [candidate] (257.122 ms) : 0, 257122
AppSec [baseline] (55.562 ms) : 0, 55562
AppSec [candidate] (55.799 ms) : 0, 55799
Remote Config [baseline] (710.949 µs) : 0, 711
Remote Config [candidate] (748.693 µs) : 0, 749
Telemetry [baseline] (12.287 ms) : 0, 12287
Telemetry [candidate] (14.414 ms) : 0, 14414
section appsec
BytebuddyAgent [baseline] (734.593 ms) : 0, 734593
BytebuddyAgent [candidate] (733.103 ms) : 0, 733103
GlobalTracer [baseline] (237.816 ms) : 0, 237816
GlobalTracer [candidate] (253.823 ms) : 0, 253823
AppSec [baseline] (177.492 ms) : 0, 177492
AppSec [candidate] (171.432 ms) : 0, 171432
IAST [baseline] (20.229 ms) : 0, 20229
IAST [candidate] (19.351 ms) : 0, 19351
Remote Config [baseline] (658.619 µs) : 0, 659
Remote Config [candidate] (668.257 µs) : 0, 668
Telemetry [baseline] (8.204 ms) : 0, 8204
Telemetry [candidate] (8.257 ms) : 0, 8257
section iast
BytebuddyAgent [baseline] (835.35 ms) : 0, 835350
BytebuddyAgent [candidate] (832.648 ms) : 0, 832648
GlobalTracer [baseline] (230.799 ms) : 0, 230799
GlobalTracer [candidate] (247.693 ms) : 0, 247693
AppSec [baseline] (58.107 ms) : 0, 58107
AppSec [candidate] (58.487 ms) : 0, 58487
IAST [baseline] (21.511 ms) : 0, 21511
IAST [candidate] (21.72 ms) : 0, 21720
Remote Config [baseline] (657.1 µs) : 0, 657
Remote Config [candidate] (670.908 µs) : 0, 671
Telemetry [baseline] (8.698 ms) : 0, 8698
Telemetry [candidate] (8.879 ms) : 0, 8879
section profiling
BytebuddyAgent [baseline] (703.441 ms) : 0, 703441
BytebuddyAgent [candidate] (703.386 ms) : 0, 703386
GlobalTracer [baseline] (348.19 ms) : 0, 348190
GlobalTracer [candidate] (349.357 ms) : 0, 349357
AppSec [baseline] (54.414 ms) : 0, 54414
AppSec [candidate] (54.019 ms) : 0, 54019
Remote Config [baseline] (707.603 µs) : 0, 708
Remote Config [candidate] (717.762 µs) : 0, 718
Telemetry [baseline] (8.75 ms) : 0, 8750
Telemetry [candidate] (8.834 ms) : 0, 8834
ProfilingAgent [baseline] (94.86 ms) : 0, 94860
ProfilingAgent [candidate] (94.833 ms) : 0, 94833
Profiling [baseline] (94.884 ms) : 0, 94884
Profiling [candidate] (94.858 ms) : 0, 94858
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2025-01-23T16:47:44 2025-01-23T16:54:47
git_branch master rey.abolofia/lambda-payloads
git_commit_date 1737649960 1737650153
git_commit_sha 64e6e86 adb1dce
release_version 1.46.0-SNAPSHOT~64e6e864bc 1.46.0-SNAPSHOT~adb1dce868
start_time 2025-01-23T16:47:30 2025-01-23T16:54:33
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1737651644 1737651644
ci_job_id 778095975 778095975
ci_pipeline_id 53819129 53819129
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-qjprzoc-project-304-concurrent-1-jugswnjb 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-qjprzoc-project-304-concurrent-1-jugswnjb 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~adb1dce868, baseline=1.46.0-SNAPSHOT~64e6e864bc
    dateFormat X
    axisFormat %s
section baseline
no_agent (381.379 µs) : 362, 401
.   : milestone, 381,
iast (503.278 µs) : 482, 525
.   : milestone, 503,
iast_FULL (746.443 µs) : 724, 769
.   : milestone, 746,
iast_GLOBAL (553.47 µs) : 530, 577
.   : milestone, 553,
iast_HARDCODED_SECRET_DISABLED (504.069 µs) : 481, 527
.   : milestone, 504,
iast_INACTIVE (456.811 µs) : 435, 478
.   : milestone, 457,
iast_TELEMETRY_OFF (491.322 µs) : 468, 515
.   : milestone, 491,
tracing (451.126 µs) : 430, 472
.   : milestone, 451,
section candidate
no_agent (374.368 µs) : 355, 394
.   : milestone, 374,
iast (510.25 µs) : 488, 532
.   : milestone, 510,
iast_FULL (742.455 µs) : 720, 765
.   : milestone, 742,
iast_GLOBAL (554.352 µs) : 532, 577
.   : milestone, 554,
iast_HARDCODED_SECRET_DISABLED (502.958 µs) : 481, 524
.   : milestone, 503,
iast_INACTIVE (457.466 µs) : 436, 479
.   : milestone, 457,
iast_TELEMETRY_OFF (495.591 µs) : 473, 518
.   : milestone, 496,
tracing (449.238 µs) : 428, 470
.   : milestone, 449,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 381.379 µs [361.79 µs, 400.967 µs] -
iast 503.278 µs [481.67 µs, 524.886 µs] 121.9 µs (32.0%)
iast_FULL 746.443 µs [724.297 µs, 768.59 µs] 365.065 µs (95.7%)
iast_GLOBAL 553.47 µs [530.183 µs, 576.757 µs] 172.091 µs (45.1%)
iast_HARDCODED_SECRET_DISABLED 504.069 µs [480.983 µs, 527.155 µs] 122.69 µs (32.2%)
iast_INACTIVE 456.811 µs [435.224 µs, 478.399 µs] 75.433 µs (19.8%)
iast_TELEMETRY_OFF 491.322 µs [468.068 µs, 514.575 µs] 109.943 µs (28.8%)
tracing 451.126 µs [429.841 µs, 472.411 µs] 69.747 µs (18.3%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 374.368 µs [354.734 µs, 394.002 µs] -
iast 510.25 µs [488.208 µs, 532.292 µs] 135.882 µs (36.3%)
iast_FULL 742.455 µs [720.302 µs, 764.608 µs] 368.087 µs (98.3%)
iast_GLOBAL 554.352 µs [532.056 µs, 576.647 µs] 179.984 µs (48.1%)
iast_HARDCODED_SECRET_DISABLED 502.958 µs [481.45 µs, 524.467 µs] 128.591 µs (34.3%)
iast_INACTIVE 457.466 µs [436.241 µs, 478.692 µs] 83.098 µs (22.2%)
iast_TELEMETRY_OFF 495.591 µs [473.428 µs, 517.754 µs] 121.223 µs (32.4%)
tracing 449.238 µs [428.224 µs, 470.252 µs] 74.871 µs (20.0%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.46.0-SNAPSHOT~adb1dce868, baseline=1.46.0-SNAPSHOT~64e6e864bc
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.349 ms) : 1329, 1368
.   : milestone, 1349,
appsec (1.738 ms) : 1714, 1762
.   : milestone, 1738,
appsec_no_iast (1.76 ms) : 1736, 1785
.   : milestone, 1760,
iast (1.498 ms) : 1474, 1522
.   : milestone, 1498,
profiling (1.512 ms) : 1489, 1535
.   : milestone, 1512,
tracing (1.484 ms) : 1459, 1509
.   : milestone, 1484,
section candidate
no_agent (1.362 ms) : 1341, 1383
.   : milestone, 1362,
appsec (1.744 ms) : 1720, 1769
.   : milestone, 1744,
appsec_no_iast (1.73 ms) : 1707, 1754
.   : milestone, 1730,
iast (1.503 ms) : 1478, 1528
.   : milestone, 1503,
profiling (1.519 ms) : 1497, 1542
.   : milestone, 1519,
tracing (1.489 ms) : 1464, 1514
.   : milestone, 1489,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.349 ms [1.329 ms, 1.368 ms] -
appsec 1.738 ms [1.714 ms, 1.762 ms] 389.299 µs (28.9%)
appsec_no_iast 1.76 ms [1.736 ms, 1.785 ms] 411.751 µs (30.5%)
iast 1.498 ms [1.474 ms, 1.522 ms] 149.213 µs (11.1%)
profiling 1.512 ms [1.489 ms, 1.535 ms] 163.57 µs (12.1%)
tracing 1.484 ms [1.459 ms, 1.509 ms] 135.161 µs (10.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.362 ms [1.341 ms, 1.383 ms] -
appsec 1.744 ms [1.72 ms, 1.769 ms] 382.463 µs (28.1%)
appsec_no_iast 1.73 ms [1.707 ms, 1.754 ms] 368.25 µs (27.0%)
iast 1.503 ms [1.478 ms, 1.528 ms] 140.587 µs (10.3%)
profiling 1.519 ms [1.497 ms, 1.542 ms] 157.44 µs (11.6%)
tracing 1.489 ms [1.464 ms, 1.514 ms] 126.77 µs (9.3%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master rey.abolofia/lambda-payloads
git_commit_date 1737649960 1737650153
git_commit_sha 64e6e86 adb1dce
release_version 1.46.0-SNAPSHOT~64e6e864bc 1.46.0-SNAPSHOT~adb1dce868
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1737652088 1737652088
ci_job_id 778095976 778095976
ci_pipeline_id 53819129 53819129
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-t-fsyp7u-project-304-concurrent-0-p4eg1wke 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-t-fsyp7u-project-304-concurrent-0-p4eg1wke 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~adb1dce868, baseline=1.46.0-SNAPSHOT~64e6e864bc
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.953 s) : 14953000, 14953000
.   : milestone, 14953000,
appsec (15.202 s) : 15202000, 15202000
.   : milestone, 15202000,
iast (18.798 s) : 18798000, 18798000
.   : milestone, 18798000,
iast_GLOBAL (17.71 s) : 17710000, 17710000
.   : milestone, 17710000,
profiling (15.073 s) : 15073000, 15073000
.   : milestone, 15073000,
tracing (15.094 s) : 15094000, 15094000
.   : milestone, 15094000,
section candidate
no_agent (15.455 s) : 15455000, 15455000
.   : milestone, 15455000,
appsec (14.924 s) : 14924000, 14924000
.   : milestone, 14924000,
iast (19.094 s) : 19094000, 19094000
.   : milestone, 19094000,
iast_GLOBAL (18.005 s) : 18005000, 18005000
.   : milestone, 18005000,
profiling (14.894 s) : 14894000, 14894000
.   : milestone, 14894000,
tracing (14.928 s) : 14928000, 14928000
.   : milestone, 14928000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.953 s [14.953 s, 14.953 s] -
appsec 15.202 s [15.202 s, 15.202 s] 249.0 ms (1.7%)
iast 18.798 s [18.798 s, 18.798 s] 3.845 s (25.7%)
iast_GLOBAL 17.71 s [17.71 s, 17.71 s] 2.757 s (18.4%)
profiling 15.073 s [15.073 s, 15.073 s] 120.0 ms (0.8%)
tracing 15.094 s [15.094 s, 15.094 s] 141.0 ms (0.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.455 s [15.455 s, 15.455 s] -
appsec 14.924 s [14.924 s, 14.924 s] -531.0 ms (-3.4%)
iast 19.094 s [19.094 s, 19.094 s] 3.639 s (23.5%)
iast_GLOBAL 18.005 s [18.005 s, 18.005 s] 2.55 s (16.5%)
profiling 14.894 s [14.894 s, 14.894 s] -561.0 ms (-3.6%)
tracing 14.928 s [14.928 s, 14.928 s] -527.0 ms (-3.4%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.46.0-SNAPSHOT~adb1dce868, baseline=1.46.0-SNAPSHOT~64e6e864bc
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.47 ms) : 1459, 1482
.   : milestone, 1470,
appsec (2.345 ms) : 2302, 2388
.   : milestone, 2345,
iast (2.11 ms) : 2055, 2165
.   : milestone, 2110,
iast_GLOBAL (2.146 ms) : 2092, 2201
.   : milestone, 2146,
profiling (2.465 ms) : 2277, 2653
.   : milestone, 2465,
tracing (1.943 ms) : 1901, 1986
.   : milestone, 1943,
section candidate
no_agent (1.479 ms) : 1467, 1490
.   : milestone, 1479,
appsec (2.353 ms) : 2309, 2396
.   : milestone, 2353,
iast (2.108 ms) : 2053, 2163
.   : milestone, 2108,
iast_GLOBAL (2.152 ms) : 2097, 2208
.   : milestone, 2152,
profiling (1.988 ms) : 1943, 2033
.   : milestone, 1988,
tracing (1.942 ms) : 1900, 1984
.   : milestone, 1942,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.47 ms [1.459 ms, 1.482 ms] -
appsec 2.345 ms [2.302 ms, 2.388 ms] 875.23 µs (59.5%)
iast 2.11 ms [2.055 ms, 2.165 ms] 639.751 µs (43.5%)
iast_GLOBAL 2.146 ms [2.092 ms, 2.201 ms] 676.345 µs (46.0%)
profiling 2.465 ms [2.277 ms, 2.653 ms] 994.652 µs (67.7%)
tracing 1.943 ms [1.901 ms, 1.986 ms] 473.294 µs (32.2%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.479 ms [1.467 ms, 1.49 ms] -
appsec 2.353 ms [2.309 ms, 2.396 ms] 874.007 µs (59.1%)
iast 2.108 ms [2.053 ms, 2.163 ms] 629.684 µs (42.6%)
iast_GLOBAL 2.152 ms [2.097 ms, 2.208 ms] 673.755 µs (45.6%)
profiling 1.988 ms [1.943 ms, 2.033 ms] 509.279 µs (34.4%)
tracing 1.942 ms [1.9 ms, 1.984 ms] 463.342 µs (31.3%)

}
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest is not published publicly, there is no way to test non-streaming handlers.

import java.io.IOException;
import okio.BufferedSink;

public final class ReadFromOutputStreamJsonAdapter extends JsonAdapter<ByteArrayOutputStream> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is another failure in the tests related to this:

groovy.lang.GroovyRuntimeException: Could not find matching constructor for: java.io.ByteArrayOutputStream([B)
	at datadog.trace.lambda.LambdaHandlerTest.test moshi toJson OutputStream(LambdaHandlerTest.groovy:315)

@purple4reina purple4reina force-pushed the rey.abolofia/lambda-payloads branch from 23ba390 to adb1dce Compare January 23, 2025 16:36
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: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants