Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SENTRY_SEGMENT_NAME_SOURCE } from '@sentry/conventions/attributes';
import { SENTRY_SEGMENT_NAME_SOURCE, SENTRY_ORIGIN } from '@sentry/conventions/attributes';
import { expect } from '@playwright/test';
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '@sentry/browser';
import { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '@sentry/browser';
import { sentryTest } from '../../../../utils/fixtures';
import {
envelopeRequestParser,
Expand All @@ -21,7 +21,7 @@ sentryTest(

const attributes = transaction.contexts?.trace?.data;
expect(attributes).toEqual({
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'manual',
[SENTRY_ORIGIN]: 'manual',
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
[SENTRY_SEGMENT_NAME_SOURCE]: 'custom',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { expect } from '@playwright/test';
import {
SDK_VERSION,
SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT,
SEMANTIC_ATTRIBUTE_SENTRY_OP,
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS,
} from '@sentry/core';
Expand All @@ -19,6 +17,8 @@ import {
SENTRY_TRACE_LIFECYCLE,
USER_AGENT_ORIGINAL,
SENTRY_STATUS_MESSAGE,
SENTRY_OP,
SENTRY_ORIGIN,
} from '@sentry/conventions/attributes';

sentryTest(
Expand Down Expand Up @@ -77,11 +77,11 @@ sentryTest(
{
attributes: {
'sentry.is_localhost': { value: false, type: 'boolean' },
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: {
[SENTRY_OP]: {
type: 'string',
value: 'test-child',
},
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
[SENTRY_ORIGIN]: {
type: 'string',
value: 'manual',
},
Expand Down Expand Up @@ -126,7 +126,7 @@ sentryTest(
{
attributes: {
'sentry.is_localhost': { value: false, type: 'boolean' },
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
[SENTRY_ORIGIN]: {
type: 'string',
value: 'manual',
},
Expand Down Expand Up @@ -171,7 +171,7 @@ sentryTest(
{
attributes: {
'sentry.is_localhost': { value: false, type: 'boolean' },
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
[SENTRY_ORIGIN]: {
type: 'string',
value: 'manual',
},
Expand Down Expand Up @@ -240,11 +240,11 @@ sentryTest(
type: 'string',
value: expect.any(String),
},
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: {
[SENTRY_OP]: {
type: 'string',
value: 'test',
},
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
[SENTRY_ORIGIN]: {
type: 'string',
value: 'manual',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { SENTRY_ORIGIN, SENTRY_OP } from '@sentry/conventions/attributes';
import type { Route } from '@playwright/test';
import { expect } from '@playwright/test';
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/browser';
import { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core';
import { sentryTest } from '../../../../utils/fixtures';
import { shouldSkipTracingTest } from '../../../../utils/helpers';
import { getSpanOp, waitForStreamedSpans } from '../../../../utils/spanUtils';
Expand Down Expand Up @@ -45,8 +44,8 @@ sentryTest(
value: 'https://sentry-test-site.example/path/to/script.js',
},
'browser.script.invoker_type': { type: 'string', value: 'classic-script' },
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
[SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
[SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
}),
}),
);
Expand Down Expand Up @@ -94,8 +93,8 @@ sentryTest('captures long animation frame span for event listener.', async ({ br
'browser.script.invoker': { type: 'string', value: 'BUTTON#clickme.onclick' },
'browser.script.invoker_type': { type: 'string', value: 'event-listener' },
'code.file.path': { type: 'string', value: 'https://sentry-test-site.example/path/to/script.js' },
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
[SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
[SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
}),
}),
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SENTRY_OP, SENTRY_ORIGIN } from '@sentry/conventions/attributes';
import type { Route } from '@playwright/test';
import { expect } from '@playwright/test';
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/browser';
import type { Event } from '@sentry/core';
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
Expand Down Expand Up @@ -44,8 +44,8 @@ sentryTest(
'browser.script.source_char_position': 0,
'browser.script.invoker': 'https://sentry-test-site.example/path/to/script.js',
'browser.script.invoker_type': 'classic-script',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.long_animation_frame',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
[SENTRY_OP]: 'ui.long_animation_frame',
[SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
},
}),
);
Expand Down Expand Up @@ -98,8 +98,8 @@ sentryTest(
'browser.script.invoker': 'BUTTON#clickme.onclick',
'browser.script.invoker_type': 'event-listener',
'code.file.path': 'https://sentry-test-site.example/path/to/script.js',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.long_animation_frame',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
[SENTRY_OP]: 'ui.long_animation_frame',
[SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
},
}),
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { SENTRY_ORIGIN, SENTRY_OP } from '@sentry/conventions/attributes';
import type { Route } from '@playwright/test';
import { expect } from '@playwright/test';
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/browser';
import { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core';
import { sentryTest } from '../../../../utils/fixtures';
import { shouldSkipTracingTest } from '../../../../utils/helpers';
import { getSpanOp, waitForStreamedSpans } from '../../../../utils/spanUtils';
Expand Down Expand Up @@ -47,8 +46,8 @@ sentryTest(
value: 'https://sentry-test-site.example/path/to/script.js',
},
'browser.script.invoker_type': { type: 'string', value: 'classic-script' },
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
[SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
[SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
}),
}),
);
Expand Down Expand Up @@ -96,8 +95,8 @@ sentryTest('captures long animation frame span for event listener.', async ({ br
'browser.script.invoker': { type: 'string', value: 'BUTTON#clickme.onclick' },
'browser.script.invoker_type': { type: 'string', value: 'event-listener' },
'code.file.path': { type: 'string', value: 'https://sentry-test-site.example/path/to/script.js' },
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
[SENTRY_OP]: { type: 'string', value: 'ui.long_animation_frame' },
[SENTRY_ORIGIN]: { type: 'string', value: 'auto.ui.browser.metrics' },
}),
}),
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SENTRY_OP, SENTRY_ORIGIN } from '@sentry/conventions/attributes';
import type { Route } from '@playwright/test';
import { expect } from '@playwright/test';
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/browser';
import type { Event } from '@sentry/core';
import { sentryTest } from '../../../../utils/fixtures';
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
Expand Down Expand Up @@ -46,8 +46,8 @@ sentryTest(
'browser.script.source_char_position': 0,
'browser.script.invoker': 'https://sentry-test-site.example/path/to/script.js',
'browser.script.invoker_type': 'classic-script',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.long_animation_frame',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
[SENTRY_OP]: 'ui.long_animation_frame',
[SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
},
}),
);
Expand Down Expand Up @@ -100,8 +100,8 @@ sentryTest(
'browser.script.invoker': 'BUTTON#clickme.onclick',
'browser.script.invoker_type': 'event-listener',
'code.file.path': 'https://sentry-test-site.example/path/to/script.js',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.long_animation_frame',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
[SENTRY_OP]: 'ui.long_animation_frame',
[SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
},
}),
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { SENTRY_SEGMENT_NAME_SOURCE } from '@sentry/conventions/attributes';
import { SENTRY_SEGMENT_NAME_SOURCE, SENTRY_OP, SENTRY_ORIGIN } from '@sentry/conventions/attributes';
import { expect } from '@playwright/test';
import {
SEMANTIC_ATTRIBUTE_SENTRY_OP,
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
} from '@sentry/core';
import { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '@sentry/core';
import { sentryTest } from '../../../../utils/fixtures';
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../../utils/helpers';

Expand Down Expand Up @@ -44,17 +40,17 @@ sentryTest(
expect(navigationRequest.transaction).toEqual('/sub-page');

expect(pageloadRequest.contexts?.trace?.data).toMatchObject({
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',
[SENTRY_ORIGIN]: 'auto.pageload.browser',
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
[SENTRY_OP]: 'pageload',
['sentry.idle_span_finish_reason']: 'cancelled',
});
expect(navigationRequest.contexts?.trace?.data).toMatchObject({
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.navigation.browser',
[SENTRY_ORIGIN]: 'auto.navigation.browser',
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'navigation',
[SENTRY_OP]: 'navigation',
['sentry.idle_span_finish_reason']: 'idleTimeout',
});
expect(pageloadRequest.request).toEqual({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { expect } from '@playwright/test';
import {
SEMANTIC_ATTRIBUTE_SENTRY_OP,
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
} from '@sentry/core';
import { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '@sentry/core';
import { sentryTest } from '../../../../../utils/fixtures';
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../../../utils/helpers';
import { SENTRY_SEGMENT_NAME_SOURCE, URL_FULL, URL_PATH } from '@sentry/conventions/attributes';
import {
SENTRY_SEGMENT_NAME_SOURCE,
URL_FULL,
URL_PATH,
SENTRY_OP,
SENTRY_ORIGIN,
} from '@sentry/conventions/attributes';

sentryTest(
'creates a pageload and navigation root spans each with multiple navigation.redirect childspans',
Expand All @@ -31,10 +33,10 @@ sentryTest(
expect(pageloadRequest.contexts?.trace?.op).toBe('pageload');

expect(pageloadRequest.contexts?.trace?.data).toMatchObject({
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',
[SENTRY_ORIGIN]: 'auto.pageload.browser',
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
[SENTRY_OP]: 'pageload',
['sentry.idle_span_finish_reason']: 'cancelled',
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { expect } from '@playwright/test';
import {
SEMANTIC_ATTRIBUTE_SENTRY_OP,
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
} from '@sentry/core';
import { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE } from '@sentry/core';
import { sentryTest } from '../../../../../utils/fixtures';
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../../../utils/helpers';
import { SENTRY_SEGMENT_NAME_SOURCE, URL_FULL, URL_PATH } from '@sentry/conventions/attributes';
import {
SENTRY_SEGMENT_NAME_SOURCE,
URL_FULL,
URL_PATH,
SENTRY_OP,
SENTRY_ORIGIN,
} from '@sentry/conventions/attributes';

sentryTest('creates a pageload root span with navigation.redirect childspan', async ({ getLocalTestUrl, page }) => {
if (shouldSkipTracingTest()) {
Expand All @@ -24,10 +26,10 @@ sentryTest('creates a pageload root span with navigation.redirect childspan', as
expect(pageloadRequest.contexts?.trace?.op).toBe('pageload');

expect(pageloadRequest.contexts?.trace?.data).toMatchObject({
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.pageload.browser',
[SENTRY_ORIGIN]: 'auto.pageload.browser',
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]: 1,
[SENTRY_SEGMENT_NAME_SOURCE]: 'url',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'pageload',
[SENTRY_OP]: 'pageload',
['sentry.idle_span_finish_reason']: 'idleTimeout',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { expect } from '@playwright/test';
import {
SDK_VERSION,
SEMANTIC_ATTRIBUTE_SENTRY_ENVIRONMENT,
SEMANTIC_ATTRIBUTE_SENTRY_OP,
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
SEMANTIC_ATTRIBUTE_SENTRY_SDK_INTEGRATIONS,
} from '@sentry/core';
Expand All @@ -13,6 +11,8 @@ import {
URL_FULL,
URL_PATH,
USER_AGENT_ORIGINAL,
SENTRY_OP,
SENTRY_ORIGIN,
} from '@sentry/conventions/attributes';
import { sentryTest } from '../../../../utils/fixtures';
import { shouldSkipTracingTest } from '../../../../utils/helpers';
Expand Down Expand Up @@ -124,11 +124,11 @@ sentryTest('starts a streamed navigation span on page navigation', async ({ brow
type: 'string',
value: 'idleTimeout',
},
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: {
[SENTRY_OP]: {
type: 'string',
value: 'navigation',
},
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
[SENTRY_ORIGIN]: {
type: 'string',
value: 'auto.navigation.browser',
},
Expand Down Expand Up @@ -224,7 +224,7 @@ sentryTest('handles pushState with full URL', async ({ getLocalTestUrl, page })
type: 'string',
value: '/sub-page',
},
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
[SENTRY_ORIGIN]: {
type: 'string',
value: 'auto.navigation.browser',
},
Expand All @@ -236,7 +236,7 @@ sentryTest('handles pushState with full URL', async ({ getLocalTestUrl, page })
type: 'string',
value: 'url',
},
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: {
[SENTRY_OP]: {
type: 'string',
value: 'navigation',
},
Expand All @@ -253,7 +253,7 @@ sentryTest('handles pushState with full URL', async ({ getLocalTestUrl, page })
type: 'string',
value: '/sub-page-2',
},
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: {
[SENTRY_ORIGIN]: {
type: 'string',
value: 'auto.navigation.browser',
},
Expand All @@ -265,7 +265,7 @@ sentryTest('handles pushState with full URL', async ({ getLocalTestUrl, page })
type: 'string',
value: 'url',
},
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: {
[SENTRY_OP]: {
type: 'string',
value: 'navigation',
},
Expand Down
Loading
Loading