Skip to content

Commit

Permalink
fix: change b3 injection format for b3 fetch and xml-http-request tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mwear committed Sep 30, 2020
1 parent aec05ec commit 91d1a38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/opentelemetry-plugin-fetch/test/fetch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,11 @@ describe('fetch', () => {
});

before(() => {
api.propagation.setGlobalPropagator(new core.B3Propagator());
api.propagation.setGlobalPropagator(
new core.B3Propagator({
injectEncoding: core.B3InjectEncoding.MULTI_HEADER,
})
);
});

describe('when request is successful', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
X_B3_TRACE_ID,
isWrapped,
NoopLogger,
B3InjectEncoding,
} from '@opentelemetry/core';
import { ZoneContextManager } from '@opentelemetry/context-zone';
import * as tracing from '@opentelemetry/tracing';
Expand Down Expand Up @@ -143,7 +144,9 @@ describe('xhr', () => {
});

before(() => {
api.propagation.setGlobalPropagator(new B3Propagator());
api.propagation.setGlobalPropagator(
new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER })
);
});

describe('when request is successful', () => {
Expand Down

0 comments on commit 91d1a38

Please sign in to comment.