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

Add aws sns instrumentation for AWS lambda #6908

Merged
merged 20 commits into from
Jun 4, 2024
Merged

Conversation

joeyzhao2018
Copy link
Contributor

@joeyzhao2018 joeyzhao2018 commented Apr 12, 2024

What Does This Do

Add AWS SNS Instrumentation for AWS Lambda. (Currently the trace is not connected even though the basic sdk instrumentation adds the X-Amzn-Trace-Id header in the AWS Request)

Implementation

  • Followed existing patterns for extra AWS SQS instrumentation needed for Datastream Monitoring. i.e. use ExecutionInterceptor and add the tracecontext into MessageAttributes per message.
  • Inject a _datadog messageAttribute to pass on the trace context. The messageAttribute use binary value. Therefore the implementation first converts the tracecontext into a json string then convert it to byteBuffer.

Motivation

  • High priority customer ticket APMS-11602
  • Feature Parity. The same "messageAttribute-propagated-tracecontext" instrumentations have been done in dd-trace-py, dd-trace-js and dd-trace-dotnet.
  • dd-trace-java itself also honors the tracecontext propagated via messageAttributes.

Testing

Screenshot 2024-05-20 at 11 06 22 AM sdk v2 single message Screenshot 2024-05-20 at 2 54 21 PM sdk v1 batch messages Screenshot 2024-05-20 at 3 14 21 PM sdk v2 batch messages Screenshot 2024-05-20 at 3 14 00 PM

Some Considerations

  • Why SQS works without this special injection?
    • AWS automatically provide AWSTraceHeader in SQS message's attributes (NOTE: NOT MessageAttributes. Also note that this is not a result from ReceiveMessage calls.) Screenshot 2024-05-02 at 12 14 53 AM
    • Btw we only added java => SQS => AWS Lambda support quite recently python pr nodejs PR
  • Does SNS has some configs or parameters similar to ReceiveMessage requests' getAttributeNames we can use in SNS case?
    • 😮 Actually, the x-ray trace id is propagated in SNS case. And I have a PR on the consumer side (nodejs) [SVLS-4780] upstream Java sns and sqs refactor datadog-lambda-js#538, which uses the x-ray trace id from the env to get the trace id. However, the parent id is not correct. It's likely a 'would-be-created' x-ray span id. So the parenting would be wrong. Therefore, this PR is still needed. This PR will also work without changing any consumers. (As already seen in the screenshots above)

Jira ticket: https://datadoghq.atlassian.net/browse/SVLS-4780

@joeyzhao2018 joeyzhao2018 added the tag: serverless Serverless support label Apr 12, 2024
@pr-commenter
Copy link

pr-commenter bot commented Apr 12, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master joey/aws-sns
git_commit_date 1717158264 1717161037
git_commit_sha dadbd53 14a9d87
release_version 1.35.0-SNAPSHOT~dadbd53b67 1.35.0-SNAPSHOT~14a9d87393
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1717163853 1717163853
ci_job_id 528746201 528746201
ci_pipeline_id 35570226 35570226
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
module Agent Agent
parent None None
variant iast iast

Summary

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

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.35.0-SNAPSHOT~14a9d87393, baseline=1.35.0-SNAPSHOT~dadbd53b67

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.062 s) : 0, 1062161
Total [baseline] (8.632 s) : 0, 8631528
Agent [candidate] (1.073 s) : 0, 1073161
Total [candidate] (8.57 s) : 0, 8570490
section iast
Agent [baseline] (1.165 s) : 0, 1164810
Total [baseline] (8.977 s) : 0, 8977457
Agent [candidate] (1.164 s) : 0, 1163668
Total [candidate] (8.984 s) : 0, 8983529
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.174 s) : 0, 1173627
Total [baseline] (8.97 s) : 0, 8969805
Agent [candidate] (1.165 s) : 0, 1165369
Total [candidate] (8.974 s) : 0, 8973795
section iast_TELEMETRY_OFF
Agent [baseline] (1.161 s) : 0, 1161152
Total [baseline] (9.013 s) : 0, 9013260
Agent [candidate] (1.172 s) : 0, 1171817
Total [candidate] (8.993 s) : 0, 8993253
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.062 s -
Agent iast 1.165 s 102.65 ms (9.7%)
Agent iast_HARDCODED_SECRET_DISABLED 1.174 s 111.466 ms (10.5%)
Agent iast_TELEMETRY_OFF 1.161 s 98.991 ms (9.3%)
Total tracing 8.632 s -
Total iast 8.977 s 345.929 ms (4.0%)
Total iast_HARDCODED_SECRET_DISABLED 8.97 s 338.277 ms (3.9%)
Total iast_TELEMETRY_OFF 9.013 s 381.732 ms (4.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.073 s -
Agent iast 1.164 s 90.507 ms (8.4%)
Agent iast_HARDCODED_SECRET_DISABLED 1.165 s 92.208 ms (8.6%)
Agent iast_TELEMETRY_OFF 1.172 s 98.655 ms (9.2%)
Total tracing 8.57 s -
Total iast 8.984 s 413.039 ms (4.8%)
Total iast_HARDCODED_SECRET_DISABLED 8.974 s 403.305 ms (4.7%)
Total iast_TELEMETRY_OFF 8.993 s 422.763 ms (4.9%)
gantt
    title insecure-bank - break down per module: candidate=1.35.0-SNAPSHOT~14a9d87393, baseline=1.35.0-SNAPSHOT~dadbd53b67

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (655.557 ms) : 0, 655557
BytebuddyAgent [candidate] (662.201 ms) : 0, 662201
GlobalTracer [baseline] (313.789 ms) : 0, 313789
GlobalTracer [candidate] (316.996 ms) : 0, 316996
AppSec [baseline] (50.009 ms) : 0, 50009
AppSec [candidate] (50.564 ms) : 0, 50564
Remote Config [baseline] (661.416 µs) : 0, 661
Remote Config [candidate] (682.597 µs) : 0, 683
Telemetry [baseline] (7.585 ms) : 0, 7585
Telemetry [candidate] (7.759 ms) : 0, 7759
section iast
BytebuddyAgent [baseline] (777.743 ms) : 0, 777743
BytebuddyAgent [candidate] (778.276 ms) : 0, 778276
GlobalTracer [baseline] (291.726 ms) : 0, 291726
GlobalTracer [candidate] (291.423 ms) : 0, 291423
AppSec [baseline] (50.047 ms) : 0, 50047
AppSec [candidate] (46.983 ms) : 0, 46983
IAST [baseline] (22.303 ms) : 0, 22303
IAST [candidate] (26.235 ms) : 0, 26235
Remote Config [baseline] (584.511 µs) : 0, 585
Remote Config [candidate] (593.415 µs) : 0, 593
Telemetry [baseline] (9.155 ms) : 0, 9155
Telemetry [candidate] (6.912 ms) : 0, 6912
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (784.462 ms) : 0, 784462
BytebuddyAgent [candidate] (777.822 ms) : 0, 777822
GlobalTracer [baseline] (294.274 ms) : 0, 294274
GlobalTracer [candidate] (292.086 ms) : 0, 292086
AppSec [baseline] (48.038 ms) : 0, 48038
AppSec [candidate] (46.724 ms) : 0, 46724
IAST [baseline] (25.139 ms) : 0, 25139
IAST [candidate] (27.174 ms) : 0, 27174
Remote Config [baseline] (599.773 µs) : 0, 600
Remote Config [candidate] (591.925 µs) : 0, 592
Telemetry [baseline] (7.712 ms) : 0, 7712
Telemetry [candidate] (7.628 ms) : 0, 7628
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (776.456 ms) : 0, 776456
BytebuddyAgent [candidate] (782.742 ms) : 0, 782742
GlobalTracer [baseline] (291.832 ms) : 0, 291832
GlobalTracer [candidate] (293.925 ms) : 0, 293925
AppSec [baseline] (48.977 ms) : 0, 48977
AppSec [candidate] (50.188 ms) : 0, 50188
IAST [baseline] (22.302 ms) : 0, 22302
IAST [candidate] (22.751 ms) : 0, 22751
Remote Config [baseline] (625.626 µs) : 0, 626
Remote Config [candidate] (583.864 µs) : 0, 584
Telemetry [baseline] (7.665 ms) : 0, 7665
Telemetry [candidate] (8.264 ms) : 0, 8264
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.35.0-SNAPSHOT~14a9d87393, baseline=1.35.0-SNAPSHOT~dadbd53b67

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.066 s) : 0, 1065726
Total [baseline] (10.447 s) : 0, 10446663
Agent [candidate] (1.065 s) : 0, 1064625
Total [candidate] (10.353 s) : 0, 10353226
section appsec
Agent [baseline] (1.177 s) : 0, 1176856
Total [baseline] (10.469 s) : 0, 10469093
Agent [candidate] (1.184 s) : 0, 1183859
Total [candidate] (10.554 s) : 0, 10553678
section iast
Agent [baseline] (1.172 s) : 0, 1171720
Total [baseline] (10.775 s) : 0, 10774806
Agent [candidate] (1.165 s) : 0, 1165137
Total [candidate] (10.749 s) : 0, 10749487
section profiling
Agent [baseline] (1.257 s) : 0, 1256615
Total [baseline] (10.605 s) : 0, 10605190
Agent [candidate] (1.266 s) : 0, 1266257
Total [candidate] (10.6 s) : 0, 10600281
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.066 s -
Agent appsec 1.177 s 111.13 ms (10.4%)
Agent iast 1.172 s 105.994 ms (9.9%)
Agent profiling 1.257 s 190.889 ms (17.9%)
Total tracing 10.447 s -
Total appsec 10.469 s 22.43 ms (0.2%)
Total iast 10.775 s 328.143 ms (3.1%)
Total profiling 10.605 s 158.527 ms (1.5%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.065 s -
Agent appsec 1.184 s 119.234 ms (11.2%)
Agent iast 1.165 s 100.512 ms (9.4%)
Agent profiling 1.266 s 201.632 ms (18.9%)
Total tracing 10.353 s -
Total appsec 10.554 s 200.452 ms (1.9%)
Total iast 10.749 s 396.262 ms (3.8%)
Total profiling 10.6 s 247.055 ms (2.4%)
gantt
    title petclinic - break down per module: candidate=1.35.0-SNAPSHOT~14a9d87393, baseline=1.35.0-SNAPSHOT~dadbd53b67

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (657.344 ms) : 0, 657344
BytebuddyAgent [candidate] (656.714 ms) : 0, 656714
GlobalTracer [baseline] (315.338 ms) : 0, 315338
GlobalTracer [candidate] (314.761 ms) : 0, 314761
AppSec [baseline] (50.18 ms) : 0, 50180
AppSec [candidate] (50.083 ms) : 0, 50083
Remote Config [baseline] (665.423 µs) : 0, 665
Remote Config [candidate] (684.512 µs) : 0, 685
Telemetry [baseline] (7.559 ms) : 0, 7559
Telemetry [candidate] (7.664 ms) : 0, 7664
section appsec
BytebuddyAgent [baseline] (675.007 ms) : 0, 675007
BytebuddyAgent [candidate] (679.421 ms) : 0, 679421
GlobalTracer [baseline] (295.961 ms) : 0, 295961
GlobalTracer [candidate] (297.393 ms) : 0, 297393
AppSec [baseline] (152.971 ms) : 0, 152971
AppSec [candidate] (153.444 ms) : 0, 153444
IAST [baseline] (18.805 ms) : 0, 18805
IAST [candidate] (19.038 ms) : 0, 19038
Remote Config [baseline] (617.774 µs) : 0, 618
Remote Config [candidate] (626.2 µs) : 0, 626
Telemetry [baseline] (8.463 ms) : 0, 8463
Telemetry [candidate] (8.791 ms) : 0, 8791
section iast
BytebuddyAgent [baseline] (784.483 ms) : 0, 784483
BytebuddyAgent [candidate] (778.685 ms) : 0, 778685
GlobalTracer [baseline] (294.414 ms) : 0, 294414
GlobalTracer [candidate] (292.029 ms) : 0, 292029
AppSec [baseline] (49.66 ms) : 0, 49660
AppSec [candidate] (48.36 ms) : 0, 48360
IAST [baseline] (22.323 ms) : 0, 22323
IAST [candidate] (24.628 ms) : 0, 24628
Remote Config [baseline] (589.465 µs) : 0, 589
Remote Config [candidate] (585.38 µs) : 0, 585
Telemetry [baseline] (6.955 ms) : 0, 6955
Telemetry [candidate] (7.621 ms) : 0, 7621
section profiling
BytebuddyAgent [baseline] (660.131 ms) : 0, 660131
BytebuddyAgent [candidate] (666.082 ms) : 0, 666082
GlobalTracer [baseline] (385.005 ms) : 0, 385005
GlobalTracer [candidate] (387.122 ms) : 0, 387122
AppSec [baseline] (50.7 ms) : 0, 50700
AppSec [candidate] (50.648 ms) : 0, 50648
Remote Config [baseline] (795.655 µs) : 0, 796
Remote Config [candidate] (848.965 µs) : 0, 849
Telemetry [baseline] (7.449 ms) : 0, 7449
Telemetry [candidate] (7.522 ms) : 0, 7522
ProfilingAgent [baseline] (96.188 ms) : 0, 96188
ProfilingAgent [candidate] (97.056 ms) : 0, 97056
Profiling [baseline] (96.212 ms) : 0, 96212
Profiling [candidate] (97.08 ms) : 0, 97080
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-05-31T13:28:19 2024-05-31T13:35:07
git_branch master joey/aws-sns
git_commit_date 1717158264 1717161037
git_commit_sha dadbd53 14a9d87
release_version 1.35.0-SNAPSHOT~dadbd53b67 1.35.0-SNAPSHOT~14a9d87393
start_time 2024-05-31T13:28:06 2024-05-31T13:34:54
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1717162852 1717162852
ci_job_id 528746202 528746202
ci_pipeline_id 35570226 35570226
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
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.35.0-SNAPSHOT~14a9d87393, baseline=1.35.0-SNAPSHOT~dadbd53b67
    dateFormat X
    axisFormat %s
section baseline
no_agent (368.784 µs) : 348, 389
.   : milestone, 369,
iast (480.049 µs) : 459, 501
.   : milestone, 480,
iast_FULL (551.57 µs) : 530, 573
.   : milestone, 552,
iast_GLOBAL (503.083 µs) : 482, 524
.   : milestone, 503,
iast_HARDCODED_SECRET_DISABLED (478.002 µs) : 457, 500
.   : milestone, 478,
iast_INACTIVE (454.794 µs) : 433, 477
.   : milestone, 455,
iast_TELEMETRY_OFF (482.811 µs) : 461, 504
.   : milestone, 483,
tracing (441.758 µs) : 421, 463
.   : milestone, 442,
section candidate
no_agent (370.811 µs) : 351, 391
.   : milestone, 371,
iast (483.049 µs) : 461, 505
.   : milestone, 483,
iast_FULL (553.72 µs) : 531, 576
.   : milestone, 554,
iast_GLOBAL (502.704 µs) : 482, 524
.   : milestone, 503,
iast_HARDCODED_SECRET_DISABLED (477.824 µs) : 457, 498
.   : milestone, 478,
iast_INACTIVE (451.039 µs) : 430, 472
.   : milestone, 451,
iast_TELEMETRY_OFF (467.399 µs) : 446, 488
.   : milestone, 467,
tracing (442.913 µs) : 422, 463
.   : milestone, 443,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 368.784 µs [348.125 µs, 389.444 µs] -
iast 480.049 µs [458.83 µs, 501.268 µs] 111.265 µs (30.2%)
iast_FULL 551.57 µs [530.325 µs, 572.815 µs] 182.786 µs (49.6%)
iast_GLOBAL 503.083 µs [482.32 µs, 523.846 µs] 134.299 µs (36.4%)
iast_HARDCODED_SECRET_DISABLED 478.002 µs [456.502 µs, 499.502 µs] 109.217 µs (29.6%)
iast_INACTIVE 454.794 µs [432.752 µs, 476.836 µs] 86.01 µs (23.3%)
iast_TELEMETRY_OFF 482.811 µs [461.439 µs, 504.183 µs] 114.027 µs (30.9%)
tracing 441.758 µs [420.871 µs, 462.646 µs] 72.974 µs (19.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 370.811 µs [350.946 µs, 390.675 µs] -
iast 483.049 µs [461.479 µs, 504.619 µs] 112.238 µs (30.3%)
iast_FULL 553.72 µs [530.942 µs, 576.498 µs] 182.909 µs (49.3%)
iast_GLOBAL 502.704 µs [481.755 µs, 523.654 µs] 131.894 µs (35.6%)
iast_HARDCODED_SECRET_DISABLED 477.824 µs [457.16 µs, 498.489 µs] 107.014 µs (28.9%)
iast_INACTIVE 451.039 µs [430.162 µs, 471.916 µs] 80.228 µs (21.6%)
iast_TELEMETRY_OFF 467.399 µs [446.452 µs, 488.346 µs] 96.588 µs (26.0%)
tracing 442.913 µs [422.399 µs, 463.427 µs] 72.103 µs (19.4%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.35.0-SNAPSHOT~14a9d87393, baseline=1.35.0-SNAPSHOT~dadbd53b67
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.347 ms) : 1328, 1366
.   : milestone, 1347,
appsec (1.707 ms) : 1682, 1732
.   : milestone, 1707,
appsec_no_iast (1.685 ms) : 1660, 1710
.   : milestone, 1685,
iast (1.477 ms) : 1454, 1500
.   : milestone, 1477,
profiling (1.486 ms) : 1462, 1511
.   : milestone, 1486,
tracing (1.47 ms) : 1445, 1496
.   : milestone, 1470,
section candidate
no_agent (1.347 ms) : 1327, 1367
.   : milestone, 1347,
appsec (1.728 ms) : 1704, 1752
.   : milestone, 1728,
appsec_no_iast (1.722 ms) : 1698, 1746
.   : milestone, 1722,
iast (1.479 ms) : 1456, 1503
.   : milestone, 1479,
profiling (1.483 ms) : 1459, 1507
.   : milestone, 1483,
tracing (1.471 ms) : 1445, 1496
.   : milestone, 1471,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.347 ms [1.328 ms, 1.366 ms] -
appsec 1.707 ms [1.682 ms, 1.732 ms] 359.694 µs (26.7%)
appsec_no_iast 1.685 ms [1.66 ms, 1.71 ms] 337.715 µs (25.1%)
iast 1.477 ms [1.454 ms, 1.5 ms] 129.391 µs (9.6%)
profiling 1.486 ms [1.462 ms, 1.511 ms] 139.306 µs (10.3%)
tracing 1.47 ms [1.445 ms, 1.496 ms] 123.218 µs (9.1%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.347 ms [1.327 ms, 1.367 ms] -
appsec 1.728 ms [1.704 ms, 1.752 ms] 380.795 µs (28.3%)
appsec_no_iast 1.722 ms [1.698 ms, 1.746 ms] 375.215 µs (27.9%)
iast 1.479 ms [1.456 ms, 1.503 ms] 132.294 µs (9.8%)
profiling 1.483 ms [1.459 ms, 1.507 ms] 136.112 µs (10.1%)
tracing 1.471 ms [1.445 ms, 1.496 ms] 123.577 µs (9.2%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master joey/aws-sns
git_commit_date 1717158264 1717161037
git_commit_sha dadbd53 14a9d87
release_version 1.35.0-SNAPSHOT~dadbd53b67 1.35.0-SNAPSHOT~14a9d87393
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1717163463 1717163463
ci_job_id 528746203 528746203
ci_pipeline_id 35570226 35570226
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
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.35.0-SNAPSHOT~14a9d87393, baseline=1.35.0-SNAPSHOT~dadbd53b67
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.819 s) : 14819000, 14819000
.   : milestone, 14819000,
appsec (15.264 s) : 15264000, 15264000
.   : milestone, 15264000,
iast (19.029 s) : 19029000, 19029000
.   : milestone, 19029000,
iast_GLOBAL (17.873 s) : 17873000, 17873000
.   : milestone, 17873000,
profiling (14.927 s) : 14927000, 14927000
.   : milestone, 14927000,
tracing (15.316 s) : 15316000, 15316000
.   : milestone, 15316000,
section candidate
no_agent (14.94 s) : 14940000, 14940000
.   : milestone, 14940000,
appsec (15.153 s) : 15153000, 15153000
.   : milestone, 15153000,
iast (18.595 s) : 18595000, 18595000
.   : milestone, 18595000,
iast_GLOBAL (17.928 s) : 17928000, 17928000
.   : milestone, 17928000,
profiling (15.089 s) : 15089000, 15089000
.   : milestone, 15089000,
tracing (15.015 s) : 15015000, 15015000
.   : milestone, 15015000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.819 s [14.819 s, 14.819 s] -
appsec 15.264 s [15.264 s, 15.264 s] 445.0 ms (3.0%)
iast 19.029 s [19.029 s, 19.029 s] 4.21 s (28.4%)
iast_GLOBAL 17.873 s [17.873 s, 17.873 s] 3.054 s (20.6%)
profiling 14.927 s [14.927 s, 14.927 s] 108.0 ms (0.7%)
tracing 15.316 s [15.316 s, 15.316 s] 497.0 ms (3.4%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.94 s [14.94 s, 14.94 s] -
appsec 15.153 s [15.153 s, 15.153 s] 213.0 ms (1.4%)
iast 18.595 s [18.595 s, 18.595 s] 3.655 s (24.5%)
iast_GLOBAL 17.928 s [17.928 s, 17.928 s] 2.988 s (20.0%)
profiling 15.089 s [15.089 s, 15.089 s] 149.0 ms (1.0%)
tracing 15.015 s [15.015 s, 15.015 s] 75.0 ms (0.5%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.35.0-SNAPSHOT~14a9d87393, baseline=1.35.0-SNAPSHOT~dadbd53b67
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.472 ms) : 1461, 1484
.   : milestone, 1472,
appsec (2.203 ms) : 2170, 2237
.   : milestone, 2203,
iast (1.956 ms) : 1915, 1996
.   : milestone, 1956,
iast_GLOBAL (2.0 ms) : 1959, 2042
.   : milestone, 2000,
profiling (1.857 ms) : 1824, 1890
.   : milestone, 1857,
tracing (1.837 ms) : 1805, 1870
.   : milestone, 1837,
section candidate
no_agent (1.47 ms) : 1459, 1482
.   : milestone, 1470,
appsec (2.212 ms) : 2178, 2247
.   : milestone, 2212,
iast (1.973 ms) : 1932, 2015
.   : milestone, 1973,
iast_GLOBAL (2.007 ms) : 1966, 2048
.   : milestone, 2007,
profiling (1.856 ms) : 1824, 1889
.   : milestone, 1856,
tracing (1.833 ms) : 1801, 1865
.   : milestone, 1833,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.472 ms [1.461 ms, 1.484 ms] -
appsec 2.203 ms [2.17 ms, 2.237 ms] 731.368 µs (49.7%)
iast 1.956 ms [1.915 ms, 1.996 ms] 483.514 µs (32.8%)
iast_GLOBAL 2.0 ms [1.959 ms, 2.042 ms] 528.265 µs (35.9%)
profiling 1.857 ms [1.824 ms, 1.89 ms] 385.246 µs (26.2%)
tracing 1.837 ms [1.805 ms, 1.87 ms] 365.372 µs (24.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.47 ms [1.459 ms, 1.482 ms] -
appsec 2.212 ms [2.178 ms, 2.247 ms] 741.781 µs (50.4%)
iast 1.973 ms [1.932 ms, 2.015 ms] 502.871 µs (34.2%)
iast_GLOBAL 2.007 ms [1.966 ms, 2.048 ms] 536.337 µs (36.5%)
profiling 1.856 ms [1.824 ms, 1.889 ms] 385.948 µs (26.2%)
tracing 1.833 ms [1.801 ms, 1.865 ms] 362.21 µs (24.6%)

@vandonr vandonr self-requested a review April 15, 2024 14:35
@vandonr
Copy link
Contributor

vandonr commented Apr 16, 2024

I think you are doing the wrong injection type. Pathway contexts are for DSM. This is not useless, but if you want to do trace context propagation, you need to look at how it's done here

@joeyzhao2018 joeyzhao2018 changed the title Add aws sns instrumentation [SVLS-4780] Add aws sns instrumentation Apr 23, 2024
Copy link
Contributor

@vandonr vandonr left a comment

Choose a reason for hiding this comment

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

LGTM overall, tests for v2 need to be added

@joeyzhao2018 joeyzhao2018 changed the title [SVLS-4780] Add aws sns instrumentation Add aws sns instrumentation for AWS lambda May 2, 2024
@joeyzhao2018 joeyzhao2018 marked this pull request as ready for review May 2, 2024 04:32
@joeyzhao2018 joeyzhao2018 requested a review from a team as a code owner May 2, 2024 04:32
@joeyzhao2018 joeyzhao2018 requested review from mcculls and ygree May 2, 2024 04:32
@joeyzhao2018 joeyzhao2018 requested a review from a team as a code owner May 20, 2024 18:36
@joeyzhao2018 joeyzhao2018 enabled auto-merge (squash) May 21, 2024 10:31
@joeyzhao2018 joeyzhao2018 merged commit 87dc120 into master Jun 4, 2024
81 checks passed
@joeyzhao2018 joeyzhao2018 deleted the joey/aws-sns branch June 4, 2024 11:43
@github-actions github-actions bot added this to the 1.35.0 milestone Jun 4, 2024
@amarziali amarziali added the inst: aws sdk AWS SDK instrumentation label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inst: aws sdk AWS SDK instrumentation tag: serverless Serverless support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants