Skip to content

Commit d6f2810

Browse files
nicohrubeccodex
andcommitted
ref(core): Use SENTRY_ORIGIN convention constant
Co-Authored-By: GPT-6 <codex@openai.com>
1 parent ef90627 commit d6f2810

245 files changed

Lines changed: 1071 additions & 1283 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎dev-packages/browser-integration-tests/suites/public-api/startSpan/basic/test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { SENTRY_SEGMENT_NAME_SOURCE } from '@sentry/conventions/attributes';
1+
import { SENTRY_SEGMENT_NAME_SOURCE, SENTRY_ORIGIN } from '@sentry/conventions/attributes';
22
import { expect } from '@playwright/test';
3-
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '@sentry/browser';
3+
import { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '@sentry/browser';
44
import { sentryTest } from '../../../../utils/fixtures';
55
import {
66
envelopeRequestParser,
@@ -21,7 +21,7 @@ sentryTest(
2121

2222
const attributes = transaction.contexts?.trace?.data;
2323
expect(attributes).toEqual({
24-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'manual',
24+
[SENTRY_ORIGIN]: 'manual',
2525
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
2626
[SENTRY_SEGMENT_NAME_SOURCE]: 'custom',
2727
});

‎dev-packages/browser-integration-tests/suites/public-api/startSpan/streamed/test.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
SDK_VERSION,
44
SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT,
55
SEMANTIC_ATTRIBUTE_SENTRY_OP,
6-
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
76
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
87
SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS,
98
} from '@sentry/core';
@@ -19,6 +18,7 @@ import {
1918
SENTRY_TRACE_LIFECYCLE,
2019
USER_AGENT_ORIGINAL,
2120
SENTRY_STATUS_MESSAGE,
21+
SENTRY_ORIGIN,
2222
} from '@sentry/conventions/attributes';
2323

2424
sentryTest(
@@ -81,7 +81,7 @@ sentryTest(
8181
type: 'string',
8282
value: 'test-child',
8383
},
84-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
84+
[SENTRY_ORIGIN]: {
8585
type: 'string',
8686
value: 'manual',
8787
},
@@ -126,7 +126,7 @@ sentryTest(
126126
{
127127
attributes: {
128128
'sentry.is_localhost': { value: false, type: 'boolean' },
129-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
129+
[SENTRY_ORIGIN]: {
130130
type: 'string',
131131
value: 'manual',
132132
},
@@ -171,7 +171,7 @@ sentryTest(
171171
{
172172
attributes: {
173173
'sentry.is_localhost': { value: false, type: 'boolean' },
174-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
174+
[SENTRY_ORIGIN]: {
175175
type: 'string',
176176
value: 'manual',
177177
},
@@ -244,7 +244,7 @@ sentryTest(
244244
type: 'string',
245245
value: 'test',
246246
},
247-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
247+
[SENTRY_ORIGIN]: {
248248
type: 'string',
249249
value: 'manual',
250250
},

‎dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-enabled-streamed/test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { SENTRY_ORIGIN } from '@sentry/conventions/attributes';
12
import type { Route } from '@playwright/test';
23
import { expect } from '@playwright/test';
3-
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/browser';
44
import { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core';
55
import { sentryTest } from '../../../../utils/fixtures';
66
import { shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -46,7 +46,7 @@ sentryTest(
4646
},
4747
'browser.script.invoker_type': { type: 'string', value: 'classic-script' },
4848
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
49-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
49+
[SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
5050
}),
5151
}),
5252
);
@@ -95,7 +95,7 @@ sentryTest('captures long animation frame span for event listener.', async ({ br
9595
'browser.script.invoker_type': { type: 'string', value: 'event-listener' },
9696
'code.file.path': { type: 'string', value: 'https://sentry-test-site.example/path/to/script.js' },
9797
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
98-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
98+
[SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
9999
}),
100100
}),
101101
);

‎dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-enabled/test.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { SENTRY_ORIGIN } from '@sentry/conventions/attributes';
12
import type { Route } from '@playwright/test';
23
import { expect } from '@playwright/test';
3-
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/browser';
4+
import { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/browser';
45
import type { Event } from '@sentry/core';
56
import { sentryTest } from '../../../../utils/fixtures';
67
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -45,7 +46,7 @@ sentryTest(
4546
'browser.script.invoker': 'https://sentry-test-site.example/path/to/script.js',
4647
'browser.script.invoker_type': 'classic-script',
4748
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.long_animation_frame',
48-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
49+
[SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
4950
},
5051
}),
5152
);
@@ -99,7 +100,7 @@ sentryTest(
99100
'browser.script.invoker_type': 'event-listener',
100101
'code.file.path': 'https://sentry-test-site.example/path/to/script.js',
101102
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.long_animation_frame',
102-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
103+
[SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
103104
},
104105
}),
105106
);

‎dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-and-animation-frame-enabled-streamed/test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { SENTRY_ORIGIN } from '@sentry/conventions/attributes';
12
import type { Route } from '@playwright/test';
23
import { expect } from '@playwright/test';
3-
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/browser';
44
import { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core';
55
import { sentryTest } from '../../../../utils/fixtures';
66
import { shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -48,7 +48,7 @@ sentryTest(
4848
},
4949
'browser.script.invoker_type': { type: 'string', value: 'classic-script' },
5050
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
51-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
51+
[SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
5252
}),
5353
}),
5454
);
@@ -97,7 +97,7 @@ sentryTest('captures long animation frame span for event listener.', async ({ br
9797
'browser.script.invoker_type': { type: 'string', value: 'event-listener' },
9898
'code.file.path': { type: 'string', value: 'https://sentry-test-site.example/path/to/script.js' },
9999
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
100-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
100+
[SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
101101
}),
102102
}),
103103
);

‎dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-tasks-and-animation-frame-enabled/test.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { SENTRY_ORIGIN } from '@sentry/conventions/attributes';
12
import type { Route } from '@playwright/test';
23
import { expect } from '@playwright/test';
3-
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/browser';
4+
import { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/browser';
45
import type { Event } from '@sentry/core';
56
import { sentryTest } from '../../../../utils/fixtures';
67
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -47,7 +48,7 @@ sentryTest(
4748
'browser.script.invoker': 'https://sentry-test-site.example/path/to/script.js',
4849
'browser.script.invoker_type': 'classic-script',
4950
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.long_animation_frame',
50-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
51+
[SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
5152
},
5253
}),
5354
);
@@ -101,7 +102,7 @@ sentryTest(
101102
'browser.script.invoker_type': 'event-listener',
102103
'code.file.path': 'https://sentry-test-site.example/path/to/script.js',
103104
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.long_animation_frame',
104-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
105+
[SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
105106
},
106107
}),
107108
);

‎dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/navigation-aborting-pageload/test.ts‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import { SENTRY_SEGMENT_NAME_SOURCE } from '@sentry/conventions/attributes';
1+
import { SENTRY_SEGMENT_NAME_SOURCE, SENTRY_ORIGIN } from '@sentry/conventions/attributes';
22
import { expect } from '@playwright/test';
3-
import {
4-
SEMANTIC_ATTRIBUTE_SENTRY_OP,
5-
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
6-
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
7-
} from '@sentry/core';
3+
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '@sentry/core';
84
import { sentryTest } from '../../../../utils/fixtures';
95
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../../utils/helpers';
106

@@ -44,14 +40,14 @@ sentryTest(
4440
expect(navigationRequest.transaction).toEqual('/sub-page');
4541

4642
expect(pageloadRequest.contexts?.trace?.data).toMatchObject({
47-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',
43+
[SENTRY_ORIGIN]: 'auto.pageload.browser',
4844
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
4945
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
5046
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
5147
['sentry.idle_span_finish_reason']: 'cancelled',
5248
});
5349
expect(navigationRequest.contexts?.trace?.data).toMatchObject({
54-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.browser',
50+
[SENTRY_ORIGIN]: 'auto.navigation.browser',
5551
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
5652
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
5753
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',

‎dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/navigation-redirect/multiple-redirects/test.ts‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
import { expect } from '@playwright/test';
2-
import {
3-
SEMANTIC_ATTRIBUTE_SENTRY_OP,
4-
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
5-
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
6-
} from '@sentry/core';
2+
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '@sentry/core';
73
import { sentryTest } from '../../../../../utils/fixtures';
84
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../../../utils/helpers';
9-
import { SENTRY_SEGMENT_NAME_SOURCE, URL_FULL, URL_PATH } from '@sentry/conventions/attributes';
5+
import { SENTRY_SEGMENT_NAME_SOURCE, URL_FULL, URL_PATH, SENTRY_ORIGIN } from '@sentry/conventions/attributes';
106

117
sentryTest(
128
'creates a pageload and navigation root spans each with multiple navigation.redirect childspans',
@@ -31,7 +27,7 @@ sentryTest(
3127
expect(pageloadRequest.contexts?.trace?.op).toBe('pageload');
3228

3329
expect(pageloadRequest.contexts?.trace?.data).toMatchObject({
34-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',
30+
[SENTRY_ORIGIN]: 'auto.pageload.browser',
3531
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
3632
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
3733
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',

‎dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/navigation-redirect/pageload-redirect/test.ts‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
import { expect } from '@playwright/test';
2-
import {
3-
SEMANTIC_ATTRIBUTE_SENTRY_OP,
4-
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
5-
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
6-
} from '@sentry/core';
2+
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '@sentry/core';
73
import { sentryTest } from '../../../../../utils/fixtures';
84
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../../../utils/helpers';
9-
import { SENTRY_SEGMENT_NAME_SOURCE, URL_FULL, URL_PATH } from '@sentry/conventions/attributes';
5+
import { SENTRY_SEGMENT_NAME_SOURCE, URL_FULL, URL_PATH, SENTRY_ORIGIN } from '@sentry/conventions/attributes';
106

117
sentryTest('creates a pageload root span with navigation.redirect childspan', async ({ getLocalTestUrl, page }) => {
128
if (shouldSkipTracingTest()) {
@@ -24,7 +20,7 @@ sentryTest('creates a pageload root span with navigation.redirect childspan', as
2420
expect(pageloadRequest.contexts?.trace?.op).toBe('pageload');
2521

2622
expect(pageloadRequest.contexts?.trace?.data).toMatchObject({
27-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',
23+
[SENTRY_ORIGIN]: 'auto.pageload.browser',
2824
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
2925
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
3026
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',

‎dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/navigation-streamed/test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
SDK_VERSION,
44
SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT,
55
SEMANTIC_ATTRIBUTE_SENTRY_OP,
6-
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
76
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
87
SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS,
98
} from '@sentry/core';
@@ -13,6 +12,7 @@ import {
1312
URL_FULL,
1413
URL_PATH,
1514
USER_AGENT_ORIGINAL,
15+
SENTRY_ORIGIN,
1616
} from '@sentry/conventions/attributes';
1717
import { sentryTest } from '../../../../utils/fixtures';
1818
import { shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -128,7 +128,7 @@ sentryTest('starts a streamed navigation span on page navigation', async ({ brow
128128
type: 'string',
129129
value: 'navigation',
130130
},
131-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
131+
[SENTRY_ORIGIN]: {
132132
type: 'string',
133133
value: 'auto.navigation.browser',
134134
},
@@ -224,7 +224,7 @@ sentryTest('handles pushState with full URL', async ({ getLocalTestUrl, page })
224224
type: 'string',
225225
value: '/sub-page',
226226
},
227-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
227+
[SENTRY_ORIGIN]: {
228228
type: 'string',
229229
value: 'auto.navigation.browser',
230230
},
@@ -253,7 +253,7 @@ sentryTest('handles pushState with full URL', async ({ getLocalTestUrl, page })
253253
type: 'string',
254254
value: '/sub-page-2',
255255
},
256-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
256+
[SENTRY_ORIGIN]: {
257257
type: 'string',
258258
value: 'auto.navigation.browser',
259259
},

0 commit comments

Comments
 (0)