Skip to content

Conversation

@dyladan
Copy link
Member

@dyladan dyladan commented Apr 7, 2021

Fixes #2067

@codecov
Copy link

codecov bot commented Apr 7, 2021

Codecov Report

Merging #2082 (81cf999) into main (a457776) will increase coverage by 0.03%.
The diff coverage is 100.00%.

❗ Current head 81cf999 differs from pull request most recent head 64291b1. Consider uploading reports for the commit 64291b1 to get more accurate results

@@            Coverage Diff             @@
##             main    #2082      +/-   ##
==========================================
+ Coverage   93.03%   93.07%   +0.03%     
==========================================
  Files         154      154              
  Lines        5976     5991      +15     
  Branches     1246     1256      +10     
==========================================
+ Hits         5560     5576      +16     
+ Misses        416      415       -1     
Impacted Files Coverage Δ
...emetry-core/src/baggage/propagation/HttpBaggage.ts 98.24% <100.00%> (ø)
...y-core/src/context/propagation/HttpTraceContext.ts 100.00% <100.00%> (ø)
...entelemetry-propagator-b3/src/B3MultiPropagator.ts 100.00% <100.00%> (ø)
...es/opentelemetry-propagator-b3/src/B3Propagator.ts 100.00% <100.00%> (ø)
...ntelemetry-propagator-b3/src/B3SinglePropagator.ts 100.00% <100.00%> (ø)
...propagator-jaeger/src/JaegerHttpTracePropagator.ts 100.00% <100.00%> (ø)
...emetry-core/src/platform/node/RandomIdGenerator.ts 93.75% <0.00%> (+6.25%) ⬆️

carrier,
defaultTextMapSetter
);
assert.deepStrictEqual(carrier[TRACE_PARENT_HEADER], undefined);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert.deepStrictEqual(carrier[TRACE_PARENT_HEADER], undefined);
assert.strictEqual(carrier[TRACE_PARENT_HEADER], undefined);

same on next line

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious if there is some advantage to using strict over deep strict?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this usage where one element is undefined there is most likely no difference. But in other usecases there is:

assert.deepStrictEqual({}, {})  // throws
assert.strictEqual({}, {}) // doesn't throw

At least for me the use of deepXXX asserts indicates that deep objects should be compared which is not the case here.

But feel free to ignore my comments regarding this is you feel the opposite.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have an opinion at all, was just curious what the reasoning was behind yours.

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.

Supressed spans get injected

4 participants