Skip to content

Commit 04981ee

Browse files
author
Luca Forstner
committed
tests
1 parent d226128 commit 04981ee

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

dev-packages/browser-integration-tests/utils/replayEventTemplates.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const DEFAULT_REPLAY_EVENT = {
1515
replay_type: 'session',
1616
event_id: expect.stringMatching(/\w{32}/),
1717
environment: 'production',
18+
context: expect.any(Object),
1819
sdk: {
1920
integrations: [
2021
'InboundFilters',

packages/opentelemetry/test/integration/transactions.test.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,6 @@ describe('Integration | Transactions', () => {
106106
trace_id: expect.any(String),
107107
transaction: 'test name',
108108
}),
109-
propagationContext: {
110-
sampled: undefined,
111-
spanId: expect.any(String),
112-
traceId: expect.any(String),
113-
},
114109
sampleRate: 1,
115110
source: 'task',
116111
spanMetadata: expect.any(Object),

packages/opentelemetry/test/propagator.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,16 +324,20 @@ describe('SentryPropagator', () => {
324324
sampled: undefined,
325325
spanId: expect.any(String),
326326
traceId: expect.any(String),
327+
dsc: {}, // Frozen DSC
327328
});
328329
});
329330

330331
it('sets defined dynamic sampling context on context', () => {
332+
const sentryTraceHeader = 'd4cda95b652f4a1592b449d5929fda1b-6e0c63257de34c92-1';
331333
const baggage =
332334
'sentry-environment=production,sentry-release=1.0.0,sentry-public_key=abc,sentry-trace_id=d4cda95b652f4a1592b449d5929fda1b,sentry-transaction=dsc-transaction';
335+
carrier[SENTRY_TRACE_HEADER] = sentryTraceHeader;
333336
carrier[SENTRY_BAGGAGE_HEADER] = baggage;
334337
const context = propagator.extract(ROOT_CONTEXT, carrier, defaultTextMapGetter);
335338
expect(getPropagationContextFromContext(context)).toEqual({
336-
sampled: undefined,
339+
sampled: true,
340+
parentSpanId: expect.any(String),
337341
spanId: expect.any(String),
338342
traceId: expect.any(String), // Note: This is not automatically taken from the DSC (in reality, this should be aligned)
339343
dsc: {

0 commit comments

Comments
 (0)