Skip to content

Commit c12e7f5

Browse files
committed
fix more tests
1 parent f21afb3 commit c12e7f5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/opentelemetry-node/test/spanprocessor.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ describe('SentrySpanProcessor', () => {
344344

345345
const sentrySpan = getSpanForOtelSpan(child);
346346

347-
expect(spanToJSON(sentrySpan!).data).toEqual(undefined);
347+
// origin is set by default to 'manual'
348+
expect(spanToJSON(sentrySpan!).data).toEqual({ 'sentry.origin': 'manual' });
348349

349350
child.end();
350351

@@ -354,6 +355,7 @@ describe('SentrySpanProcessor', () => {
354355
'test-attribute-2': [1, 2, 3],
355356
'test-attribute-3': 0,
356357
'test-attribute-4': false,
358+
'sentry.origin': 'manual',
357359
});
358360
});
359361

@@ -592,6 +594,7 @@ describe('SentrySpanProcessor', () => {
592594
'otel.kind': 'INTERNAL',
593595
url: 'http://example.com/my/route/123',
594596
'sentry.op': 'http',
597+
'sentry.origin': 'manual',
595598
});
596599

597600
parentOtelSpan.end();
@@ -622,6 +625,7 @@ describe('SentrySpanProcessor', () => {
622625
'otel.kind': 'INTERNAL',
623626
url: 'http://example.com/my/route/123',
624627
'sentry.op': 'http',
628+
'sentry.origin': 'manual',
625629
});
626630
expect(op).toBe('http');
627631

@@ -655,6 +659,7 @@ describe('SentrySpanProcessor', () => {
655659
'http.query': '?what=123',
656660
'http.fragment': '#myHash',
657661
'sentry.op': 'http',
662+
'sentry.origin': 'manual',
658663
});
659664
expect(op).toBe('http');
660665

packages/tracing/test/span.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable deprecation/deprecation */
22
import { BrowserClient } from '@sentry/browser';
33
import { Hub, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, Scope, makeMain, spanToJSON } from '@sentry/core';
4-
import type { BaseTransportOptions, ClientOptions, SpanOrigin, TransactionSource } from '@sentry/types';
4+
import type { BaseTransportOptions, ClientOptions, TransactionSource } from '@sentry/types';
55

66
import { Span, TRACEPARENT_REGEXP, Transaction } from '../src';
77
import { getDefaultBrowserClientOptions } from './testutils';

0 commit comments

Comments
 (0)