-
Notifications
You must be signed in to change notification settings - Fork 325
Fix AWS API Gateway endpoints correlation HTTP span tags - Inferred Lambda Spans #10576
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
Draft
jandro996
wants to merge
3
commits into
alejandro.gonzalez/RFC-1081
Choose a base branch
from
alejandro.gonzalez/RFC-1081-lambda
base: alejandro.gonzalez/RFC-1081
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Fix AWS API Gateway endpoints correlation HTTP span tags - Inferred Lambda Spans #10576
jandro996
wants to merge
3
commits into
alejandro.gonzalez/RFC-1081
from
alejandro.gonzalez/RFC-1081-lambda
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add InferredLambdaSpan implementation to detect and create synthetic spans for AWS Lambda functions invoked by API Gateway (v1 REST and v2 HTTP APIs). Changes: - Add InferredLambdaSpan class with automatic API Gateway event detection - Extract metadata using reflection (httpMethod, path, domainName, stage, etc.) - Create properly shaped spans with mandatory RFC tags and metrics - Compute API Gateway ARN for dd_resource_key - Support aws_user tag with privacy guard (DD_LAMBDA_INFERRED_SPAN_AWS_USER_ENABLED) - Copy AppSec tags (_dd.appsec.enabled, _dd.appsec.json) from root span - Integrate with LambdaHandlerInstrumentation to create span hierarchy - Add unit tests for event detection and field extraction - Update PLAN.jsonc with detailed implementation notes The inferred lambda span becomes the parent of the lambda invocation span, enabling proper API endpoint discovery and distributed tracing correlation. Tests: All existing lambda instrumentation tests pass without regressions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 61 metrics, 10 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.60.0-SNAPSHOT~aaab697636, baseline=1.60.0-SNAPSHOT~f3e5e5b89b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.072 s) : 0, 1071859
Total [baseline] (8.742 s) : 0, 8742064
Agent [candidate] (1.069 s) : 0, 1068954
Total [candidate] (8.743 s) : 0, 8742670
section iast
Agent [baseline] (1.23 s) : 0, 1230248
Total [baseline] (9.384 s) : 0, 9384369
Agent [candidate] (1.239 s) : 0, 1239220
Total [candidate] (9.364 s) : 0, 9363737
gantt
title insecure-bank - break down per module: candidate=1.60.0-SNAPSHOT~aaab697636, baseline=1.60.0-SNAPSHOT~f3e5e5b89b
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.19 ms) : 0, 1190
crashtracking [candidate] (1.191 ms) : 0, 1191
BytebuddyAgent [baseline] (632.971 ms) : 0, 632971
BytebuddyAgent [candidate] (632.044 ms) : 0, 632044
AgentMeter [baseline] (29.142 ms) : 0, 29142
AgentMeter [candidate] (29.12 ms) : 0, 29120
GlobalTracer [baseline] (259.035 ms) : 0, 259035
GlobalTracer [candidate] (259.425 ms) : 0, 259425
AppSec [baseline] (33.051 ms) : 0, 33051
AppSec [candidate] (33.143 ms) : 0, 33143
Debugger [baseline] (61.929 ms) : 0, 61929
Debugger [candidate] (61.194 ms) : 0, 61194
Remote Config [baseline] (629.229 µs) : 0, 629
Remote Config [candidate] (639.124 µs) : 0, 639
Telemetry [baseline] (12.224 ms) : 0, 12224
Telemetry [candidate] (11.533 ms) : 0, 11533
Flare Poller [baseline] (6.184 ms) : 0, 6184
Flare Poller [candidate] (5.293 ms) : 0, 5293
section iast
crashtracking [baseline] (1.186 ms) : 0, 1186
crashtracking [candidate] (1.191 ms) : 0, 1191
BytebuddyAgent [baseline] (795.03 ms) : 0, 795030
BytebuddyAgent [candidate] (801.684 ms) : 0, 801684
AgentMeter [baseline] (11.223 ms) : 0, 11223
AgentMeter [candidate] (11.515 ms) : 0, 11515
GlobalTracer [baseline] (248.037 ms) : 0, 248037
GlobalTracer [candidate] (249.51 ms) : 0, 249510
IAST [baseline] (26.885 ms) : 0, 26885
IAST [candidate] (27.155 ms) : 0, 27155
AppSec [baseline] (32.347 ms) : 0, 32347
AppSec [candidate] (34.816 ms) : 0, 34816
Debugger [baseline] (67.584 ms) : 0, 67584
Debugger [candidate] (65.332 ms) : 0, 65332
Remote Config [baseline] (531.0 µs) : 0, 531
Remote Config [candidate] (532.094 µs) : 0, 532
Telemetry [baseline] (8.573 ms) : 0, 8573
Telemetry [candidate] (8.545 ms) : 0, 8545
Flare Poller [baseline] (3.519 ms) : 0, 3519
Flare Poller [candidate] (3.434 ms) : 0, 3434
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.60.0-SNAPSHOT~aaab697636, baseline=1.60.0-SNAPSHOT~f3e5e5b89b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.064 s) : 0, 1064302
Total [baseline] (10.964 s) : 0, 10963686
Agent [candidate] (1.072 s) : 0, 1071597
Total [candidate] (10.977 s) : 0, 10976798
section appsec
Agent [baseline] (1.239 s) : 0, 1238584
Total [baseline] (10.945 s) : 0, 10944537
Agent [candidate] (1.247 s) : 0, 1246618
Total [candidate] (11.057 s) : 0, 11056836
section iast
Agent [baseline] (1.233 s) : 0, 1232997
Total [baseline] (11.173 s) : 0, 11172562
Agent [candidate] (1.236 s) : 0, 1235858
Total [candidate] (11.251 s) : 0, 11250924
section profiling
Agent [baseline] (1.192 s) : 0, 1191802
Total [baseline] (10.975 s) : 0, 10974638
Agent [candidate] (1.189 s) : 0, 1189100
Total [candidate] (10.882 s) : 0, 10882275
gantt
title petclinic - break down per module: candidate=1.60.0-SNAPSHOT~aaab697636, baseline=1.60.0-SNAPSHOT~f3e5e5b89b
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.188 ms) : 0, 1188
crashtracking [candidate] (1.193 ms) : 0, 1193
BytebuddyAgent [baseline] (628.764 ms) : 0, 628764
BytebuddyAgent [candidate] (633.637 ms) : 0, 633637
AgentMeter [baseline] (28.981 ms) : 0, 28981
AgentMeter [candidate] (29.168 ms) : 0, 29168
GlobalTracer [baseline] (257.839 ms) : 0, 257839
GlobalTracer [candidate] (259.639 ms) : 0, 259639
AppSec [baseline] (32.648 ms) : 0, 32648
AppSec [candidate] (33.191 ms) : 0, 33191
Debugger [baseline] (62.762 ms) : 0, 62762
Debugger [candidate] (61.868 ms) : 0, 61868
Remote Config [baseline] (616.858 µs) : 0, 617
Remote Config [candidate] (635.511 µs) : 0, 636
Telemetry [baseline] (12.33 ms) : 0, 12330
Telemetry [candidate] (11.382 ms) : 0, 11382
Flare Poller [baseline] (3.734 ms) : 0, 3734
Flare Poller [candidate] (5.36 ms) : 0, 5360
section appsec
crashtracking [baseline] (1.189 ms) : 0, 1189
crashtracking [candidate] (1.184 ms) : 0, 1184
BytebuddyAgent [baseline] (657.167 ms) : 0, 657167
BytebuddyAgent [candidate] (661.805 ms) : 0, 661805
AgentMeter [baseline] (11.951 ms) : 0, 11951
AgentMeter [candidate] (12.024 ms) : 0, 12024
GlobalTracer [baseline] (258.376 ms) : 0, 258376
GlobalTracer [candidate] (259.737 ms) : 0, 259737
IAST [baseline] (25.129 ms) : 0, 25129
IAST [candidate] (25.421 ms) : 0, 25421
AppSec [baseline] (168.036 ms) : 0, 168036
AppSec [candidate] (169.505 ms) : 0, 169505
Debugger [baseline] (67.098 ms) : 0, 67098
Debugger [candidate] (67.36 ms) : 0, 67360
Remote Config [baseline] (650.597 µs) : 0, 651
Remote Config [candidate] (648.898 µs) : 0, 649
Telemetry [baseline] (9.704 ms) : 0, 9704
Telemetry [candidate] (9.714 ms) : 0, 9714
Flare Poller [baseline] (3.721 ms) : 0, 3721
Flare Poller [candidate] (3.75 ms) : 0, 3750
section iast
crashtracking [baseline] (1.199 ms) : 0, 1199
crashtracking [candidate] (1.186 ms) : 0, 1186
BytebuddyAgent [baseline] (796.17 ms) : 0, 796170
BytebuddyAgent [candidate] (797.81 ms) : 0, 797810
AgentMeter [baseline] (11.263 ms) : 0, 11263
AgentMeter [candidate] (11.286 ms) : 0, 11286
GlobalTracer [baseline] (248.502 ms) : 0, 248502
GlobalTracer [candidate] (248.957 ms) : 0, 248957
IAST [baseline] (26.943 ms) : 0, 26943
IAST [candidate] (27.037 ms) : 0, 27037
AppSec [baseline] (34.814 ms) : 0, 34814
AppSec [candidate] (34.172 ms) : 0, 34172
Debugger [baseline] (66.057 ms) : 0, 66057
Debugger [candidate] (67.18 ms) : 0, 67180
Remote Config [baseline] (535.906 µs) : 0, 536
Remote Config [candidate] (544.938 µs) : 0, 545
Telemetry [baseline] (8.629 ms) : 0, 8629
Telemetry [candidate] (8.66 ms) : 0, 8660
Flare Poller [baseline] (3.483 ms) : 0, 3483
Flare Poller [candidate] (3.567 ms) : 0, 3567
section profiling
crashtracking [baseline] (1.224 ms) : 0, 1224
crashtracking [candidate] (1.218 ms) : 0, 1218
BytebuddyAgent [baseline] (682.206 ms) : 0, 682206
BytebuddyAgent [candidate] (681.873 ms) : 0, 681873
AgentMeter [baseline] (8.616 ms) : 0, 8616
AgentMeter [candidate] (8.58 ms) : 0, 8580
GlobalTracer [baseline] (216.242 ms) : 0, 216242
GlobalTracer [candidate] (215.718 ms) : 0, 215718
AppSec [baseline] (32.618 ms) : 0, 32618
AppSec [candidate] (32.415 ms) : 0, 32415
Debugger [baseline] (67.375 ms) : 0, 67375
Debugger [candidate] (67.254 ms) : 0, 67254
Remote Config [baseline] (633.047 µs) : 0, 633
Remote Config [candidate] (637.986 µs) : 0, 638
Telemetry [baseline] (8.894 ms) : 0, 8894
Telemetry [candidate] (8.973 ms) : 0, 8973
Flare Poller [baseline] (3.79 ms) : 0, 3790
Flare Poller [candidate] (3.796 ms) : 0, 3796
ProfilingAgent [baseline] (100.136 ms) : 0, 100136
ProfilingAgent [candidate] (98.705 ms) : 0, 98705
Profiling [baseline] (100.712 ms) : 0, 100712
Profiling [candidate] (99.277 ms) : 0, 99277
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 1 performance regressions! Performance is the same for 17 metrics, 18 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~aaab697636, baseline=1.60.0-SNAPSHOT~f3e5e5b89b
dateFormat X
axisFormat %s
section baseline
no_agent (17.232 ms) : 17058, 17407
. : milestone, 17232,
appsec (18.339 ms) : 18157, 18521
. : milestone, 18339,
code_origins (17.699 ms) : 17522, 17876
. : milestone, 17699,
iast (17.717 ms) : 17542, 17892
. : milestone, 17717,
profiling (19.643 ms) : 19445, 19841
. : milestone, 19643,
tracing (17.842 ms) : 17663, 18022
. : milestone, 17842,
section candidate
no_agent (16.949 ms) : 16783, 17115
. : milestone, 16949,
appsec (19.635 ms) : 19429, 19841
. : milestone, 19635,
code_origins (17.456 ms) : 17283, 17628
. : milestone, 17456,
iast (17.503 ms) : 17330, 17676
. : milestone, 17503,
profiling (19.549 ms) : 19350, 19748
. : milestone, 19549,
tracing (17.581 ms) : 17407, 17754
. : milestone, 17581,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~aaab697636, baseline=1.60.0-SNAPSHOT~f3e5e5b89b
dateFormat X
axisFormat %s
section baseline
no_agent (1.171 ms) : 1160, 1182
. : milestone, 1171,
iast (3.185 ms) : 3144, 3225
. : milestone, 3185,
iast_FULL (5.921 ms) : 5861, 5980
. : milestone, 5921,
iast_GLOBAL (3.492 ms) : 3437, 3548
. : milestone, 3492,
profiling (1.956 ms) : 1939, 1973
. : milestone, 1956,
tracing (1.829 ms) : 1813, 1845
. : milestone, 1829,
section candidate
no_agent (1.163 ms) : 1152, 1174
. : milestone, 1163,
iast (3.133 ms) : 3093, 3173
. : milestone, 3133,
iast_FULL (5.785 ms) : 5728, 5843
. : milestone, 5785,
iast_GLOBAL (3.553 ms) : 3497, 3608
. : milestone, 3553,
profiling (2.127 ms) : 2106, 2149
. : milestone, 2127,
tracing (1.751 ms) : 1737, 1766
. : milestone, 1751,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~aaab697636, baseline=1.60.0-SNAPSHOT~f3e5e5b89b
dateFormat X
axisFormat %s
section baseline
no_agent (14.923 s) : 14923000, 14923000
. : milestone, 14923000,
appsec (14.814 s) : 14814000, 14814000
. : milestone, 14814000,
iast (18.088 s) : 18088000, 18088000
. : milestone, 18088000,
iast_GLOBAL (17.607 s) : 17607000, 17607000
. : milestone, 17607000,
profiling (15.482 s) : 15482000, 15482000
. : milestone, 15482000,
tracing (14.677 s) : 14677000, 14677000
. : milestone, 14677000,
section candidate
no_agent (15.731 s) : 15731000, 15731000
. : milestone, 15731000,
appsec (15.006 s) : 15006000, 15006000
. : milestone, 15006000,
iast (18.12 s) : 18120000, 18120000
. : milestone, 18120000,
iast_GLOBAL (17.963 s) : 17963000, 17963000
. : milestone, 17963000,
profiling (14.966 s) : 14966000, 14966000
. : milestone, 14966000,
tracing (14.91 s) : 14910000, 14910000
. : milestone, 14910000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~aaab697636, baseline=1.60.0-SNAPSHOT~f3e5e5b89b
dateFormat X
axisFormat %s
section baseline
no_agent (1.477 ms) : 1465, 1488
. : milestone, 1477,
appsec (3.814 ms) : 3591, 4037
. : milestone, 3814,
iast (2.271 ms) : 2201, 2340
. : milestone, 2271,
iast_GLOBAL (2.316 ms) : 2246, 2386
. : milestone, 2316,
profiling (2.105 ms) : 2048, 2162
. : milestone, 2105,
tracing (2.103 ms) : 2048, 2157
. : milestone, 2103,
section candidate
no_agent (1.483 ms) : 1472, 1495
. : milestone, 1483,
appsec (3.747 ms) : 3531, 3964
. : milestone, 3747,
iast (2.277 ms) : 2208, 2347
. : milestone, 2277,
iast_GLOBAL (2.316 ms) : 2246, 2385
. : milestone, 2316,
profiling (2.099 ms) : 2043, 2154
. : milestone, 2099,
tracing (2.093 ms) : 2039, 2147
. : milestone, 2093,
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
comp: asm waf
Application Security Management (WAF)
tag: do not merge
Do not merge changes
type: enhancement
Enhancements and improvements
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What Does This Do
Motivation
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels the queue request./merge -f --reason "reason"skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.