-
Notifications
You must be signed in to change notification settings - Fork 38
Extract trace context from SQS event #128
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
Extract trace context from SQS event #128
Conversation
DarcyRaynerDD
left a comment
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.
Left some comments and nits
| {"e":XXXX,"m":"serverless.integration_test.execution","t":["function:http-request","dd_lambda_layer:datadog-nodev12.XX.X"],"v":1} | ||
| XXXX-XX-XX XX:XX:XX.XXX XXXX-XXXX-XXXX-XXXX-XXXX INFO [dd.trace_id=XXXX dd.span_id=XXXX] Snapshot test http requests successfully made to URLs: https://ip-ranges.datadoghq.com,https://ip-ranges.datadoghq.eu | ||
| {"traces":[[{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.lambda","resource":"integration-plugin-dev-http-requests_node12_with_plugin","error":0,"meta":{"_dd.origin":"lambda","service":"integration-plugin-dev-http-requests_node12_with_plugin","cold_start":"false","function_arn":"XXXX_node12_with_plugin","function_version":"$LATEST","request_id":"XXXX","resource_names":"integration-plugin-dev-http-requests_node12_with_plugin","datadog_lambda":"XXXX","dd_trace":"XXXX","_dd.parent_source":"xray"},"metrics":{"_sample_rate":1,"_sampling_priority_v1":2},"start":XXXX,"duration":XXXX,"service":"aws.lambda","type":"serverless"}]]} | ||
| {"traces":[[{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"http.request","resource":"GET","error":0,"meta":{"_dd.origin":"lambda","service":"integration-plugin-dev-http-requests_node12_with_plugin","span.kind":"client","http.method":"GET","http.url":"https://ip-ranges.datadoghq.com/","http.status_code":"200"},"metrics":{"_sample_rate":1,"_sampling_priority_v1":2},"start":XXXX,"duration":XXXX,"service":"integration-plugin-dev-http-requests_node12_with_plugin-http-client","type":"http"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"http.request","resource":"GET","error":0,"meta":{"_dd.origin":"lambda","service":"integration-plugin-dev-http-requests_node12_with_plugin","span.kind":"client","http.method":"GET","http.url":"https://ip-ranges.datadoghq.eu/","http.status_code":"200"},"metrics":{"_sample_rate":1,"_sampling_priority_v1":2},"start":XXXX,"duration":XXXX,"service":"integration-plugin-dev-http-requests_node12_with_plugin-http-client","type":"http"},{"trace_id":"XXXX","span_id":"XXXX","parent_id":"XXXX","name":"aws.lambda","resource":"integration-plugin-dev-http-requests_node12_with_plugin","error":0,"meta":{"_dd.origin":"lambda","service":"integration-plugin-dev-http-requests_node12_with_plugin","cold_start":"false","function_arn":"XXXX_node12_with_plugin","function_version":"$LATEST","request_id":"XXXX","resource_names":"integration-plugin-dev-http-requests_node12_with_plugin","datadog_lambda":"XXXX","dd_trace":"XXXX","_dd.parent_source":"xray"},"metrics":{"_sample_rate":1,"_sampling_priority_v1":2},"start":XXXX,"duration":XXXX,"service":"aws.lambda","type":"serverless"}]]} |
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.
These traces changed kind of dramatically? I'm guessing this is more from flakiness and not this PR?
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.
I think some of these changes reflect the request to check for the extension.
Co-authored-by: Darcy Rayner <50632605+DarcyRaynerDD@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## master #128 +/- ##
==========================================
- Coverage 88.21% 87.68% -0.53%
==========================================
Files 29 29
Lines 933 958 +25
Branches 162 169 +7
==========================================
+ Hits 823 840 +17
- Misses 76 80 +4
- Partials 34 38 +4
Continue to review full report at Codecov.
|
What does this PR do?
Handles AWS Lambdas triggered from SQS events, and attempts to extract context from it.
Motivation
Improving distributed tracing experience.
Testing Guidelines
Additional Notes
Types of Changes
Check all that apply