Skip to content

Commit db68a19

Browse files
committed
fix more tests
1 parent c30f294 commit db68a19

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
@@ -321,7 +321,8 @@ describe('SentrySpanProcessor', () => {
321321

322322
const sentrySpan = getSpanForOtelSpan(child);
323323

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

326327
child.end();
327328

@@ -331,6 +332,7 @@ describe('SentrySpanProcessor', () => {
331332
'test-attribute-2': [1, 2, 3],
332333
'test-attribute-3': 0,
333334
'test-attribute-4': false,
335+
'sentry.origin': 'manual',
334336
});
335337
});
336338

@@ -569,6 +571,7 @@ describe('SentrySpanProcessor', () => {
569571
'otel.kind': 'INTERNAL',
570572
url: 'http://example.com/my/route/123',
571573
'sentry.op': 'http',
574+
'sentry.origin': 'manual',
572575
});
573576

574577
parentOtelSpan.end();
@@ -599,6 +602,7 @@ describe('SentrySpanProcessor', () => {
599602
'otel.kind': 'INTERNAL',
600603
url: 'http://example.com/my/route/123',
601604
'sentry.op': 'http',
605+
'sentry.origin': 'manual',
602606
});
603607
expect(op).toBe('http');
604608

@@ -632,6 +636,7 @@ describe('SentrySpanProcessor', () => {
632636
'http.query': '?what=123',
633637
'http.fragment': '#myHash',
634638
'sentry.op': 'http',
639+
'sentry.origin': 'manual',
635640
});
636641
expect(op).toBe('http');
637642

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)