Skip to content

[sampler] treat invalid SpanContext as no SpanContext#2165

Merged
vmarchaud merged 1 commit intoopen-telemetry:mainfrom
thisthat:parent-based-fix
Apr 28, 2021
Merged

[sampler] treat invalid SpanContext as no SpanContext#2165
vmarchaud merged 1 commit intoopen-telemetry:mainfrom
thisthat:parent-based-fix

Conversation

@thisthat
Copy link
Member

Which problem is this PR solving?

Short description of the changes

  • Add a check for invalid parent SpanContext
  • Add unit tests

@codecov
Copy link

codecov bot commented Apr 28, 2021

Codecov Report

Merging #2165 (d021756) into main (b9c8426) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2165      +/-   ##
==========================================
- Coverage   92.77%   92.75%   -0.03%     
==========================================
  Files         140      140              
  Lines        4997     4997              
  Branches     1028     1028              
==========================================
- Hits         4636     4635       -1     
- Misses        361      362       +1     
Impacted Files Coverage Δ
...metry-core/src/trace/sampler/ParentBasedSampler.ts 83.87% <100.00%> (ø)
...emetry-core/src/platform/node/RandomIdGenerator.ts 87.50% <0.00%> (-6.25%) ⬇️

@dyladan dyladan changed the title Fixes #2164 [sampler] treat invalid SpanContext as no SpanContext Apr 28, 2021
@dyladan dyladan added bug Something isn't working spec-v1 labels Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ParentBasedSampler should not drop invalid SpanContext

5 participants