Skip to content

Commit 815347e

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

115 files changed

Lines changed: 585 additions & 706 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/streamed/test.ts‎

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

2424
sentryTest(
@@ -77,7 +77,7 @@ sentryTest(
7777
{
7878
attributes: {
7979
'sentry.is_localhost': { value: false, type: 'boolean' },
80-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: {
80+
[SENTRY_OP]: {
8181
type: 'string',
8282
value: 'test-child',
8383
},
@@ -240,7 +240,7 @@ sentryTest(
240240
type: 'string',
241241
value: expect.any(String),
242242
},
243-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: {
243+
[SENTRY_OP]: {
244244
type: 'string',
245245
value: 'test',
246246
},

‎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,7 +1,7 @@
1+
import { SENTRY_OP } from '@sentry/conventions/attributes';
12
import type { Route } from '@playwright/test';
23
import { expect } from '@playwright/test';
34
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/browser';
4-
import { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core';
55
import { sentryTest } from '../../../../utils/fixtures';
66
import { shouldSkipTracingTest } from '../../../../utils/helpers';
77
import { getSpanOp, waitForStreamedSpans } from '../../../../utils/spanUtils';
@@ -45,7 +45,7 @@ sentryTest(
4545
value: 'https://sentry-test-site.example/path/to/script.js',
4646
},
4747
'browser.script.invoker_type': { type: 'string', value: 'classic-script' },
48-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
48+
[SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
4949
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
5050
}),
5151
}),
@@ -94,7 +94,7 @@ sentryTest('captures long animation frame span for event listener.', async ({ br
9494
'browser.script.invoker': { type: 'string', value: 'BUTTON#clickme.onclick' },
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' },
97-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
97+
[SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
9898
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
9999
}),
100100
}),

‎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_OP } 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_ORIGIN } from '@sentry/browser';
45
import type { Event } from '@sentry/core';
56
import { sentryTest } from '../../../../utils/fixtures';
67
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -44,7 +45,7 @@ sentryTest(
4445
'browser.script.source_char_position': 0,
4546
'browser.script.invoker': 'https://sentry-test-site.example/path/to/script.js',
4647
'browser.script.invoker_type': 'classic-script',
47-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.long_animation_frame',
48+
[SENTRY_OP]: 'ui.long_animation_frame',
4849
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
4950
},
5051
}),
@@ -98,7 +99,7 @@ sentryTest(
9899
'browser.script.invoker': 'BUTTON#clickme.onclick',
99100
'browser.script.invoker_type': 'event-listener',
100101
'code.file.path': 'https://sentry-test-site.example/path/to/script.js',
101-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.long_animation_frame',
102+
[SENTRY_OP]: 'ui.long_animation_frame',
102103
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
103104
},
104105
}),

‎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,7 +1,7 @@
1+
import { SENTRY_OP } from '@sentry/conventions/attributes';
12
import type { Route } from '@playwright/test';
23
import { expect } from '@playwright/test';
34
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/browser';
4-
import { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core';
55
import { sentryTest } from '../../../../utils/fixtures';
66
import { shouldSkipTracingTest } from '../../../../utils/helpers';
77
import { getSpanOp, waitForStreamedSpans } from '../../../../utils/spanUtils';
@@ -47,7 +47,7 @@ sentryTest(
4747
value: 'https://sentry-test-site.example/path/to/script.js',
4848
},
4949
'browser.script.invoker_type': { type: 'string', value: 'classic-script' },
50-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
50+
[SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
5151
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
5252
}),
5353
}),
@@ -96,7 +96,7 @@ sentryTest('captures long animation frame span for event listener.', async ({ br
9696
'browser.script.invoker': { type: 'string', value: 'BUTTON#clickme.onclick' },
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' },
99-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
99+
[SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
100100
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
101101
}),
102102
}),

‎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_OP } 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_ORIGIN } from '@sentry/browser';
45
import type { Event } from '@sentry/core';
56
import { sentryTest } from '../../../../utils/fixtures';
67
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -46,7 +47,7 @@ sentryTest(
4647
'browser.script.source_char_position': 0,
4748
'browser.script.invoker': 'https://sentry-test-site.example/path/to/script.js',
4849
'browser.script.invoker_type': 'classic-script',
49-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.long_animation_frame',
50+
[SENTRY_OP]: 'ui.long_animation_frame',
5051
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
5152
},
5253
}),
@@ -100,7 +101,7 @@ sentryTest(
100101
'browser.script.invoker': 'BUTTON#clickme.onclick',
101102
'browser.script.invoker_type': 'event-listener',
102103
'code.file.path': 'https://sentry-test-site.example/path/to/script.js',
103-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.long_animation_frame',
104+
[SENTRY_OP]: 'ui.long_animation_frame',
104105
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
105106
},
106107
}),

‎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_OP } 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_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '@sentry/core';
84
import { sentryTest } from '../../../../utils/fixtures';
95
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../../utils/helpers';
106

@@ -47,14 +43,14 @@ sentryTest(
4743
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',
4844
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
4945
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
50-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
46+
[SENTRY_OP]: 'pageload',
5147
['sentry.idle_span_finish_reason']: 'cancelled',
5248
});
5349
expect(navigationRequest.contexts?.trace?.data).toMatchObject({
5450
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.browser',
5551
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
5652
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
57-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
53+
[SENTRY_OP]: 'navigation',
5854
['sentry.idle_span_finish_reason']: 'idleTimeout',
5955
});
6056
expect(pageloadRequest.request).toEqual({

‎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_ORIGIN, 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_OP } from '@sentry/conventions/attributes';
106

117
sentryTest(
128
'creates a pageload and navigation root spans each with multiple navigation.redirect childspans',
@@ -34,7 +30,7 @@ sentryTest(
3430
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',
3531
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
3632
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
37-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
33+
[SENTRY_OP]: 'pageload',
3834
['sentry.idle_span_finish_reason']: 'cancelled',
3935
});
4036

‎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_ORIGIN, 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_OP } from '@sentry/conventions/attributes';
106

117
sentryTest('creates a pageload root span with navigation.redirect childspan', async ({ getLocalTestUrl, page }) => {
128
if (shouldSkipTracingTest()) {
@@ -27,7 +23,7 @@ sentryTest('creates a pageload root span with navigation.redirect childspan', as
2723
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',
2824
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
2925
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
30-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
26+
[SENTRY_OP]: 'pageload',
3127
['sentry.idle_span_finish_reason']: 'idleTimeout',
3228
});
3329

‎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
@@ -2,7 +2,6 @@ import { expect } from '@playwright/test';
22
import {
33
SDK_VERSION,
44
SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT,
5-
SEMANTIC_ATTRIBUTE_SENTRY_OP,
65
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
76
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
87
SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS,
@@ -13,6 +12,7 @@ import {
1312
URL_FULL,
1413
URL_PATH,
1514
USER_AGENT_ORIGINAL,
15+
SENTRY_OP,
1616
} from '@sentry/conventions/attributes';
1717
import { sentryTest } from '../../../../utils/fixtures';
1818
import { shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -124,7 +124,7 @@ sentryTest('starts a streamed navigation span on page navigation', async ({ brow
124124
type: 'string',
125125
value: 'idleTimeout',
126126
},
127-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: {
127+
[SENTRY_OP]: {
128128
type: 'string',
129129
value: 'navigation',
130130
},
@@ -236,7 +236,7 @@ sentryTest('handles pushState with full URL', async ({ getLocalTestUrl, page })
236236
type: 'string',
237237
value: 'url',
238238
},
239-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: {
239+
[SENTRY_OP]: {
240240
type: 'string',
241241
value: 'navigation',
242242
},
@@ -265,7 +265,7 @@ sentryTest('handles pushState with full URL', async ({ getLocalTestUrl, page })
265265
type: 'string',
266266
value: 'url',
267267
},
268-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: {
268+
[SENTRY_OP]: {
269269
type: 'string',
270270
value: 'navigation',
271271
},

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import { SENTRY_SEGMENT_NAME_SOURCE } from '@sentry/conventions/attributes';
1+
import { SENTRY_SEGMENT_NAME_SOURCE, SENTRY_OP } from '@sentry/conventions/attributes';
22
import { expect } from '@playwright/test';
33
import type { Event } from '@sentry/core';
4-
import {
5-
SEMANTIC_ATTRIBUTE_SENTRY_OP,
6-
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
7-
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
8-
} from '@sentry/core';
4+
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '@sentry/core';
95
import { sentryTest } from '../../../../utils/fixtures';
106
import {
117
envelopeRequestParser,
@@ -44,14 +40,14 @@ sentryTest('should create a navigation transaction on page navigation', async ({
4440
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',
4541
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
4642
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
47-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
43+
[SENTRY_OP]: 'pageload',
4844
['sentry.idle_span_finish_reason']: 'idleTimeout',
4945
});
5046
expect(navigationRequest.contexts?.trace?.data).toMatchObject({
5147
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.browser',
5248
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
5349
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
54-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
50+
[SENTRY_OP]: 'navigation',
5551
['sentry.idle_span_finish_reason']: 'idleTimeout',
5652
});
5753
expect(pageloadRequest.request).toEqual({
@@ -122,7 +118,7 @@ sentryTest('should handle pushState with full URL', async ({ getLocalTestUrl, pa
122118
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.browser',
123119
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
124120
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
125-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
121+
[SENTRY_OP]: 'navigation',
126122
['sentry.idle_span_finish_reason']: 'idleTimeout',
127123
});
128124
expect(navigationRequest.request).toEqual({
@@ -142,7 +138,7 @@ sentryTest('should handle pushState with full URL', async ({ getLocalTestUrl, pa
142138
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.browser',
143139
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
144140
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
145-
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
141+
[SENTRY_OP]: 'navigation',
146142
['sentry.idle_span_finish_reason']: 'idleTimeout',
147143
});
148144
expect(navigationRequest2.request).toEqual({

0 commit comments

Comments
 (0)