Skip to content

Commit 91d1a38

Browse files
committed
fix: change b3 injection format for b3 fetch and xml-http-request tests
1 parent aec05ec commit 91d1a38

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/opentelemetry-plugin-fetch/test/fetch.test.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,11 @@ describe('fetch', () => {
218218
});
219219

220220
before(() => {
221-
api.propagation.setGlobalPropagator(new core.B3Propagator());
221+
api.propagation.setGlobalPropagator(
222+
new core.B3Propagator({
223+
injectEncoding: core.B3InjectEncoding.MULTI_HEADER,
224+
})
225+
);
222226
});
223227

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

packages/opentelemetry-plugin-xml-http-request/test/xhr.test.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
X_B3_TRACE_ID,
2424
isWrapped,
2525
NoopLogger,
26+
B3InjectEncoding,
2627
} from '@opentelemetry/core';
2728
import { ZoneContextManager } from '@opentelemetry/context-zone';
2829
import * as tracing from '@opentelemetry/tracing';
@@ -143,7 +144,9 @@ describe('xhr', () => {
143144
});
144145

145146
before(() => {
146-
api.propagation.setGlobalPropagator(new B3Propagator());
147+
api.propagation.setGlobalPropagator(
148+
new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER })
149+
);
147150
});
148151

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

0 commit comments

Comments
 (0)