-
Notifications
You must be signed in to change notification settings - Fork 45
Extract span tags from triggering event #101
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
Conversation
datadog_lambda/wrapper.py
Outdated
# Extract trigger tags and add them to a subsegment if found | ||
trigger_tags = extract_trigger_tags(event, context) | ||
if trigger_tags: | ||
create_dd_root_span_metadata_subsegment(trigger_tags) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, just a reminder, i recall you would have to duplicate the root span tags to the aws.lambda.function
span as well, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
What does this PR do?
Parses the event invoking the function for tags to be added to the span. Currently only adds the following services to be detected: API Gateway, ALB, SQS, SNS, DynamoDB, Kinesis, Cloudfront, CW Logs, CW Events. API Gateway and ALB trigger events will also add the HTTP url, method, path, referer and status code response if available.
For the case of X-Ray <> Datadog hybrid tracing, we create an additional dummy Datadog subsegment for the trigger tags.
Motivation
SLS-790 - To give information on what triggered the function execution in one's traces.
Testing Guidelines
New unit test and edited an existing one. Updated snapshots.
Additional Notes
Types of Changes
Check all that apply