feat: initial support for ASM inside the tracer#621
Merged
florentinl merged 7 commits intomainfrom Jun 26, 2025
Merged
Conversation
630bdfc to
10563b4
Compare
01bbb20 to
236b7ca
Compare
| self.span, | ||
| status_code, | ||
| self.event_source, | ||
| response=self.response, |
Contributor
There was a problem hiding this comment.
the self.response might not be a Dictionary, right?
Contributor
Author
There was a problem hiding this comment.
Yes you are right, it happens in two cases:
- malformed responses
- For API Gateway HTTP API events with payload version 2 or lambda function url events, the function may return just the body of the response
I pushed a fix, thank you.
19ed75a to
6a02cc6
Compare
6a02cc6 to
095ba6d
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds Application Security Management (ASM) – Threat Detection support to the Python Lambda layer.
What does this PR do?
Ship
libddwaf.soin the layerParse incoming HTTP events and forward enriched data to ASM when enabled
DD_APPSEC_ENABLEDDD_SERVERLESS_APPSEC_ENABLED(extension‑level enablement) currently in use by ASM clients in lambdaMotivation
Enable AppSec through the tracer in the context of AWS Lambda
Testing Guidelines
DD_APPSEC_ENABLED=falseto ensure that there is no impact with ASM disabled.beforeismainandafteris this branch both usingdd-trace-pyfrom main :Additional Notes
With appsec enabled during the benchmarks, I started to see the following logs:
The problem comes from a misplaced int cast when setting the
start_nsof the lambda-url inferred span.Types of Changes
Check all that apply