Closed nhinsch closed 3 years ago
Merging #60 (dad4f2d) into main (8aafaf9) will decrease coverage by
1.84%
. The diff coverage is47.45%
.
@@ Coverage Diff @@
## main #60 +/- ##
==========================================
- Coverage 82.56% 80.72% -1.85%
==========================================
Files 12 12
Lines 608 607 -1
==========================================
- Hits 502 490 -12
- Misses 83 94 +11
Partials 23 23
Impacted Files | Coverage Δ | |
---|---|---|
ddlambda.go | 80.00% <0.00%> (ø) |
|
internal/trace/listener.go | 59.18% <35.00%> (-2.22%) |
:arrow_down: |
internal/trace/context.go | 75.00% <56.75%> (-12.16%) |
:arrow_down: |
internal/metrics/processor.go | 96.87% <0.00%> (+3.12%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 8aafaf9...dad4f2d. Read the comment docs.
@DarcyRaynerDD re: the test coverage, I checked and I didn't see any substantial new untested logic.
What does this PR do?
Fix some tracing bugs:
sourceType
of theTraceContext
wasfromEvent
. In practice, this meant that an extra span would appear if there was incoming Datadog trace context.sourceType
from theTraceContext
altogether as it is no longer needed._dd.origin
, not__dd.origin
(typo). This metadata is used by the trace sampler.Also:
GetTraceHeaders
function toConvertCurrentXrayTraceContext
. This function is for Lambdas instrumented with the X-Ray SDK that want to add Datadog trace headers to outgoing requests, and does not take into account incoming Datadog trace context or Datadog spans at all. Refactor this function so that it is totally independent from the rest of the hybrid tracing logic. Remove an optional boolean argumentuseCurrentSegmentAsParent
that was always true.Other minor things:
ConvertTraceContextToSpanContext
function tocontext.go
.sa-east-1
instead ofus-east-1
Motivation
There was a customer issue with an extra span appearing in their trace. This was an opportunity to more broadly revisit this feature to look for possible issues and tighten up the code.
Testing Guidelines
Manual testing and unit tests.
Types of changes
Checklist