-
Notifications
You must be signed in to change notification settings - Fork 36
Check for the new direct invocation trace format and use that #194
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
Check for the new direct invocation trace format and use that #194
Conversation
src/trace/context.ts
Outdated
let traceData = null; | ||
|
||
if ( | ||
custom._datadog && |
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.
maybe you could use .hasOwnProperty as well for _datadog ?
|
||
if (!traceData || typeof traceData !== "object") { | ||
if (!custom || typeof custom !== "object") { |
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.
maybe a test to validate this condition could be useful ?
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.
👍
LGTM ! I left minor comments |
What does this PR do?
Updates datadog-lambda-python so it can extract trace contexts stored in context.client_context.custom using the new propagation format, described in this doc: https://docs.google.com/document/d/1pruSeesAr2bAVMtz_rUlsiBZKFoFWdB4nSq5Vuym2l8/edit#heading=h.ptr8uhqw5ht
Motivation
Storing a map containing trace context in context.client_context.custom._datadog causes compatibility issues with Go and Java lambda functions. C.f. aws/aws-lambda-java-libs#212. We're updating the trace propagation format to fix this issue.
Testing Guidelines
Additional Notes
Types of Changes
Check all that apply