Closed duncanista closed 9 months ago
Attention: 66 lines
in your changes are missing coverage. Please review.
Comparison is base (
109a606
) 81.19% compared to head (0e25e8c
) 81.96%.:exclamation: Current head 0e25e8c differs from pull request most recent head 1871ba7. Consider uploading reports for the commit 1871ba7 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
It's normal for integration tests to not pass, since now, console patching only happens when dd-trace
is available, which is a contradiction – and a breaking change. Will need to fix it either by doing a try-catch, but this might require to handle scenarios where we can get trace-context when there's no tracer: Xray, StepFunctionContext, and Custom extractor.
-- edit: fixed
What does this PR do?
TLDR; Refactor code and delegate trace extraction to the tracer.
This PR does a couple things:
Motivation
Our library was extracting tracing context only for Datadog headers, the need to extract from W3C trace context is expected and already being done by the
dd-trace
package. Therefore, we should delegate our previous manual extraction to the already predefined functions.Testing Guidelines
Services using W3C context in headers in AWS Lambda.
Additional Notes
console
when no tracer is available will fallback to always propagate Datadog Headers only.traceID
andparentID
in the custom extractor expected value is in place, in the next breaking change, this will be removed in favor oftraceId
andparentId
.Types of Changes
Check all that apply