diff --git a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts index 9351baf09a0e..cd63b699cc06 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts @@ -18,7 +18,7 @@ sentryTest('should capture FP vital.', async ({ browserName, getLocalTestUrl, pa const fpSpan = eventData.spans?.filter(({ description }) => description === 'first-paint')[0]; expect(fpSpan).toBeDefined(); - expect(fpSpan?.op).toBe('paint'); + expect(fpSpan?.op).toBe('browser.paint'); expect(fpSpan?.parent_span_id).toBe(eventData.contexts?.trace?.span_id); }); @@ -36,6 +36,6 @@ sentryTest('should capture FCP vital.', async ({ getLocalTestUrl, page }) => { const fcpSpan = eventData.spans?.filter(({ description }) => description === 'first-contentful-paint')[0]; expect(fcpSpan).toBeDefined(); - expect(fcpSpan?.op).toBe('paint'); + expect(fcpSpan?.op).toBe('browser.paint'); expect(fcpSpan?.parent_span_id).toBe(eventData.contexts?.trace?.span_id); }); diff --git a/packages/browser-utils/src/metrics/browserMetrics.ts b/packages/browser-utils/src/metrics/browserMetrics.ts index f1e28a7d50b5..5427d568e07e 100644 --- a/packages/browser-utils/src/metrics/browserMetrics.ts +++ b/packages/browser-utils/src/metrics/browserMetrics.ts @@ -26,7 +26,8 @@ import { getActivationStart } from './web-vitals/lib/getActivationStart'; import { getNavigationEntry } from './web-vitals/lib/getNavigationEntry'; import { getVisibilityWatcher } from './web-vitals/lib/getVisibilityWatcher'; import { DEBUG_BUILD } from '../debug-build'; -import { URL_FULL } from '@sentry/conventions/attributes'; +import { SENTRY_OP, URL_FULL } from '@sentry/conventions/attributes'; +import { BROWSER_BROWSER_PAINT_SPAN_OP } from '@sentry/conventions/op'; interface NavigatorNetworkInformation { readonly connection?: NetworkInformation; } @@ -483,8 +484,8 @@ function _addPaintSpan( startAndEndSpan(span, startTimestamp, startTimestamp + duration, { name: entry.name, - op: entry.entryType, attributes: { + [SENTRY_OP]: BROWSER_BROWSER_PAINT_SPAN_OP, [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.resource.browser.metrics', }, });