Repository navigation
Conversation
…ompose up to work on my laptop
…docker-compose up to work on my laptop" This reverts commit 41d289c.
…n_trace_propagation_format
Codecov Report
@@ Coverage Diff @@
## master #1506 +/- ##
==========================================
- Coverage 94.18% 94.17% -0.01%
==========================================
Files 157 157
Lines 6409 6406 -3
==========================================
- Hits 6036 6033 -3
Misses 373 373
Continue to review full report at Codecov.
|
…hout first instantiating)
|
Hey @bengl , I flipped |
|
Per our conversation on Slack, I've pulled out the |
|
Hm, it looks like Codecov doesn't like that I decreased the overall line count. Is this a blocker? |
Not a blocker. |
* refactor requestInject (should be a noop). struggling to get docker-compose up to work on my laptop * Revert "refactor requestInject (should be a noop). struggling to get docker-compose up to work on my laptop" This reverts commit 41d289c. * refactor requestInject (should be a noop) * sneakily add in a couple console.logs for circleci * sneakily add in a few more console.logs for circleci * console.log any caught error * getting closer... * request.params.clientContex -> ClientContext * remove console.logs * only set trace context in one place * inject trace context directly into clientContext.custom._datadog (without first instantiating) * initiailize clientContext.custom._datadog before injecting context * console.log the request to see if it already has a config * console.log the request to see if it already has a config * Document the new parameter * Attempt to add invokeWithLegacyContext config parameter * oops added a second . * Move the console.log so I can see the error that was gonna get caught * Pass config into requestInject * Remove setConfig() * Add tests for invokeWithLegacyContext = false * Remove extra console.log * Add tests for default config * Flip the default value of invokeWithLegacyContext * Remove invokeWithLegacyContext option
* refactor requestInject (should be a noop). struggling to get docker-compose up to work on my laptop * Revert "refactor requestInject (should be a noop). struggling to get docker-compose up to work on my laptop" This reverts commit 41d289c. * refactor requestInject (should be a noop) * sneakily add in a couple console.logs for circleci * sneakily add in a few more console.logs for circleci * console.log any caught error * getting closer... * request.params.clientContex -> ClientContext * remove console.logs * only set trace context in one place * inject trace context directly into clientContext.custom._datadog (without first instantiating) * initiailize clientContext.custom._datadog before injecting context * console.log the request to see if it already has a config * console.log the request to see if it already has a config * Document the new parameter * Attempt to add invokeWithLegacyContext config parameter * oops added a second . * Move the console.log so I can see the error that was gonna get caught * Pass config into requestInject * Remove setConfig() * Add tests for invokeWithLegacyContext = false * Remove extra console.log * Add tests for default config * Flip the default value of invokeWithLegacyContext * Remove invokeWithLegacyContext option
What does this PR do?
Updates the trace propagation format for aws-sdk direct lambda invocations. The old way was:
New way is:
I've added a configuration option called
invokeWithLegacyContext(defaultfalse) that causes aws-sdk.invoke operations to use the legacy trace propagagtion format. I'm not sure where to document the versions of datadog-lambda-py and datadog-lambda-js that are compatible with the new format.Reasoning
The Go and Java runtimes only support
ClientContext.customfields of typemap[string]string. C.f. :In order to pass trace contexts to directly invoked Go and Java lambda functions, we can write the trace context key:values to ClientContext.custom rather than creating a ClientContext.custom._datadog object like we've been doing.
Backwards compatibility
This is, strictly speaking, a breaking change in how we add trace context to direct invocations. The Python and JS repos have already been updated to accept the new format:
They both check for the old and new formats.
Plugin Checklist
Additional Notes