Skip to content

Commit 4f50163

Browse files
committed
update after conventions pr update
1 parent 43e247f commit 4f50163

20 files changed

Lines changed: 71 additions & 45 deletions

File tree

‎MIGRATION.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,7 +1049,7 @@ The following span names were adjusted:
10491049
| `cache.*` | The cache key(s), or for dataloader the operation and loader name | `user:123`, `dataloader.load usersLoader` | The cache operation | `cache.get`, `cache.put`, `cache.remove` |
10501050
| `ui.mount`, `ui.render`, `ui.update`, `ui.unmount` | The component name in angle brackets, sometimes with a framework prefix | `<UserList>`, `Vue <Root>`, `Application Render`, `init` | The unwrapped component name, or the op's fallback (`Component mount`/`render`/`update`/`unmount`) if the SDK has none | `UserList`, `Root`, `Component mount` |
10511051
| `ui.task` | A static label for the work | `runloop` | `UI task` | `UI task` |
1052-
| `ui.action.click` | The pageload or navigation span's name, including `Pageload`/`Navigation` fallbacks | `/users/:id`, `Pageload` | The span's `url.template` or `http.route`, or `Click` if the SDK has neither | `/users/:id`, `Click` |
1052+
| `ui.action.click` | The pageload or navigation span's name, including `Pageload`/`Navigation` fallbacks | `/users/:id`, `Pageload` | The span's `router.navigation.route.id`, `url.template` or `http.route`, or `Click` if the SDK has none | `UserProfile`, `/users/:id`, `Click` |
10531053
| `ui.interaction.click`, `ui.interaction.hover`, `ui.interaction.drag`, `ui.interaction.press` | The element's DOM path | `body > button.submit` | The annotated component name, or `Click`/`Hover`/`Drag`/`Key press` | `SubmitButton`, `Click` |
10541054
| `ui.webvital.lcp` | The LCP element's DOM path, or `Largest contentful paint` | `body > img#hero` | The annotated component name, or `Largest contentful paint` | `HeroImage`, `Largest contentful paint` |
10551055
| `ui.webvital.cls` | The first layout-shift source's DOM path, or `Layout shift` | `body > div.banner` | The annotated component name, or `Layout shift` | `Banner`, `Layout shift` |
@@ -1189,9 +1189,9 @@ A dataloader span no longer carries the loader's `name` either (`dataloader.load
11891189
11901190
Component spans from the React profiler, Vue mixins, Svelte `trackComponent`, Angular `TraceDirective`/`TraceClass`, and Ember's initial load drop the angle brackets (and Vue's `Vue ` prefix) from the name. Vue's `Application Render` becomes `Root`, while Ember's `init` becomes `Component mount`. Where no component name is known, the fallback follows the op: `Component mount`, `Component update`, `Component render`, or `Component unmount`. Ember runloop spans become `UI task`. The original name is on `sentry.description` so `ignoreSpans` and `beforeSendSpan` rules that matched `<UserList>` or `Vue <Root>` have to match that attribute, or the unwrapped name.
11911191
1192-
Click idle spans (`ui.action.click`) are no longer named after the pageload/navigation span, so they no longer inherit `Pageload` or `Navigation`. They take `url.template` or `http.route` from that route span, or fall back to `Click`. The route span's `url.template`, `http.route`, `url.path` and `url.full` are copied onto the click span, so the route it happened on is still queryable. Event Timing and INP `ui.interaction.*` spans are named after `ui.component_name` when the element is annotated, otherwise `Click`/`Hover`/`Drag`/`Key press`. The DOM path they used to use as a name is on `ui.element.target`, which is also what the description is derived from. Spotlight's built-in `ignoreSpans` filter matches that attribute. `ui.element.target` and `ui.component_name` are set in both trace lifecycles, so static-mode users get them too.
1192+
Click idle spans (`ui.action.click`) are no longer named after the pageload/navigation span, so they no longer inherit `Pageload` or `Navigation`. They take `router.navigation.route.id`, `url.template` or `http.route` from that route span, in that order, or fall back to `Click`. The route span's `router.navigation.route.id`, `url.template`, `http.route`, `url.path` and `url.full` are copied onto the click span, so the route it happened on is still queryable. Event Timing and INP `ui.interaction.*` spans are named after `ui.component_name` when the element is annotated, otherwise `Click`/`Hover`/`Drag`/`Key press`. The DOM path they used to use as a name is on `browser.web_vital.inp.target`, which is also what the description is derived from. Spotlight's built-in `ignoreSpans` filter matches that attribute. `browser.web_vital.inp.target` and `ui.component_name` are set in both trace lifecycles, so static-mode users get them too.
11931193
1194-
LCP and CLS spans follow the same pattern: a component name when one is annotated, otherwise `Largest contentful paint` / `Layout shift`. Their DOM paths stay on `browser.web_vital.lcp.element` and `ui.element.target`. Long task and long animation frame names are unchanged (`Main UI thread blocked`).
1194+
LCP and CLS spans follow the same pattern: a component name when one is annotated, otherwise `Largest contentful paint` / `Layout shift`. Their DOM paths stay on `browser.web_vital.lcp.element` and `browser.web_vital.cls.source.1`, the first of the layout shift's sources. Long task and long animation frame names are unchanged (`Main UI thread blocked`).
11951195

11961196
#### Database spans
11971197

‎dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/spotlight-interaction-filter-streamed/test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { sentryTest } from '../../../../utils/fixtures';
33
import { shouldSkipCdnBundleTest, shouldSkipTracingTest } from '../../../../utils/helpers';
44
import { getSpanOp, observeStreamedSpan, waitForStreamedSpan, waitForStreamedSpans } from '../../../../utils/spanUtils';
55

6-
// Interaction spans are named after the component, so the element is on `ui.element.target`.
6+
// Interaction spans are named after the component, so the element is on `browser.web_vital.inp.target`.
77
// The click handler adds the `clicked` class before the event timing entry is recorded.
88
const SPOTLIGHT_BUTTON = 'body > div#sentry-spotlight > button.clicked';
99
const REGULAR_BUTTON = 'body > button.clicked';
@@ -23,7 +23,7 @@ sentryTest(
2323
await observeStreamedSpan(page, span => {
2424
if (
2525
getSpanOp(span) === 'ui.interaction.click' &&
26-
span.attributes['ui.element.target']?.value === SPOTLIGHT_BUTTON
26+
span.attributes['browser.web_vital.inp.target']?.value === SPOTLIGHT_BUTTON
2727
) {
2828
sawSpotlightInteractionSpan = true;
2929
return true;
@@ -47,15 +47,15 @@ sentryTest(
4747

4848
// Click on the regular button — its ui.interaction.click child should be kept
4949
const regularInteractionSpansPromise = waitForStreamedSpans(page, spans =>
50-
spans.some(span => span.attributes['ui.element.target']?.value === REGULAR_BUTTON),
50+
spans.some(span => span.attributes['browser.web_vital.inp.target']?.value === REGULAR_BUTTON),
5151
);
5252

5353
await page.locator('[data-test-id=regular-button]').click();
5454
await page.locator('.clicked[data-test-id=regular-button]').isVisible();
5555

5656
const regularSpans = await regularInteractionSpansPromise;
5757
const regularInteractionSpan = regularSpans.find(
58-
span => span.attributes['ui.element.target']?.value === REGULAR_BUTTON,
58+
span => span.attributes['browser.web_vital.inp.target']?.value === REGULAR_BUTTON,
5959
);
6060
expect(getSpanOp(regularInteractionSpan!)).toBe('ui.interaction.click');
6161

‎dev-packages/browser-integration-tests/suites/tracing/interactions/spans/test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ sentryTest('captures streamed interaction span tree. @firefox', async ({ browser
167167
type: 'string',
168168
value: 'production',
169169
},
170-
'ui.element.target': {
170+
'browser.web_vital.inp.target': {
171171
type: 'string',
172172
value: 'body > button.clicked',
173173
},

‎dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-late/test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ sentryTest(
7676
'sentry.origin': { value: 'auto.http.browser.inp', type: 'string' },
7777
'sentry.op': { value: 'ui.interaction.click', type: 'string' },
7878
'ui.component_name': { value: 'NormalButton', type: 'string' },
79-
'ui.element.target': { value: 'body > NormalButton', type: 'string' },
79+
'browser.web_vital.inp.target': { value: 'body > NormalButton', type: 'string' },
8080
'sentry.exclusive_time': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
8181
'browser.web_vital.inp.value': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
8282
'browser.navigation.type': { value: 'navigate', type: 'string' },

‎dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-navigate/test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ sentryTest(
7676
'sentry.origin': { value: 'auto.http.browser.inp', type: 'string' },
7777
'sentry.op': { value: 'ui.interaction.click', type: 'string' },
7878
'ui.component_name': { value: 'NavigationLink', type: 'string' },
79-
'ui.element.target': { value: 'body > nav#navigation > NavigationLink', type: 'string' },
79+
'browser.web_vital.inp.target': { value: 'body > nav#navigation > NavigationLink', type: 'string' },
8080
'sentry.exclusive_time': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
8181
'browser.web_vital.inp.value': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
8282
'browser.navigation.type': { value: 'navigate', type: 'string' },
@@ -163,7 +163,7 @@ sentryTest(
163163
attributes: {
164164
'sentry.origin': { value: 'auto.http.browser.inp', type: 'string' },
165165
'sentry.op': { value: 'ui.interaction.click', type: 'string' },
166-
'ui.element.target': { value: 'body > nav#navigation > NavigationLink', type: 'string' },
166+
'browser.web_vital.inp.target': { value: 'body > nav#navigation > NavigationLink', type: 'string' },
167167
'sentry.exclusive_time': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
168168
'browser.web_vital.inp.value': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
169169
'browser.navigation.type': { value: 'navigate', type: 'string' },

‎dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized-late/test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ sentryTest(
7777
'sentry.origin': { value: 'auto.http.browser.inp', type: 'string' },
7878
'sentry.op': { value: 'ui.interaction.click', type: 'string' },
7979
'ui.component_name': { value: 'NormalButton', type: 'string' },
80-
'ui.element.target': { value: 'body > NormalButton', type: 'string' },
80+
'browser.web_vital.inp.target': { value: 'body > NormalButton', type: 'string' },
8181
'sentry.exclusive_time': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
8282
'browser.web_vital.inp.value': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
8383
'browser.navigation.type': { value: 'navigate', type: 'string' },

‎dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized/test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ sentryTest(
7777
'sentry.origin': { value: 'auto.http.browser.inp', type: 'string' },
7878
'sentry.op': { value: 'ui.interaction.click', type: 'string' },
7979
'ui.component_name': { value: 'NormalButton', type: 'string' },
80-
'ui.element.target': { value: 'body > NormalButton', type: 'string' },
80+
'browser.web_vital.inp.target': { value: 'body > NormalButton', type: 'string' },
8181
'sentry.exclusive_time': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
8282
'browser.web_vital.inp.value': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
8383
'browser.navigation.type': { value: 'navigate', type: 'string' },

‎dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-streamed-spans/test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ sentryTest('captures INP click as a streamed span', async ({ getLocalTestUrl, pa
4242

4343
expect(inpSpan.name).toBe('NormalButton');
4444
expect(inpSpan.attributes['ui.component_name']).toEqual({ type: 'string', value: 'NormalButton' });
45-
expect(inpSpan.attributes['ui.element.target']).toEqual({ type: 'string', value: 'body > NormalButton' });
45+
expect(inpSpan.attributes['browser.web_vital.inp.target']).toEqual({ type: 'string', value: 'body > NormalButton' });
4646

4747
expect(inpSpan.end_timestamp).toBeGreaterThan(inpSpan.start_timestamp);
4848

@@ -79,7 +79,7 @@ sentryTest('captures the slowest interaction as streamed INP span', async ({ get
7979

8080
expect(inpSpan.name).toBe('SlowButton');
8181
expect(inpSpan.attributes['ui.component_name']).toEqual({ type: 'string', value: 'SlowButton' });
82-
expect(inpSpan.attributes['ui.element.target']).toEqual({ type: 'string', value: 'body > SlowButton' });
82+
expect(inpSpan.attributes['browser.web_vital.inp.target']).toEqual({ type: 'string', value: 'body > SlowButton' });
8383
expect(inpSpan.attributes['sentry.exclusive_time']?.value).toBeGreaterThan(400);
8484

8585
const inpValue = inpSpan.attributes['browser.web_vital.inp.value']?.value as number;

‎dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp/test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ sentryTest(
8080
'sentry.origin': { value: 'auto.http.browser.inp', type: 'string' },
8181
'sentry.op': { value: 'ui.interaction.click', type: 'string' },
8282
'ui.component_name': { value: 'NormalButton', type: 'string' },
83-
'ui.element.target': { value: 'body > NormalButton', type: 'string' },
83+
'browser.web_vital.inp.target': { value: 'body > NormalButton', type: 'string' },
8484
'sentry.exclusive_time': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
8585
'browser.web_vital.inp.value': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
8686
'browser.navigation.type': { value: 'navigate', type: 'string' },
@@ -149,7 +149,7 @@ sentryTest(
149149
'sentry.origin': { value: 'auto.http.browser.inp', type: 'string' },
150150
'sentry.op': { value: 'ui.interaction.click', type: 'string' },
151151
'ui.component_name': { value: 'SlowButton', type: 'string' },
152-
'ui.element.target': { value: 'body > SlowButton', type: 'string' },
152+
'browser.web_vital.inp.target': { value: 'body > SlowButton', type: 'string' },
153153
'sentry.exclusive_time': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
154154
'browser.web_vital.inp.value': { value: inpValue, type: expect.stringMatching(/^(integer)|(double)$/) },
155155
'browser.navigation.type': { value: 'navigate', type: 'string' },

‎dev-packages/e2e-tests/test-applications/react-17/tests/spans.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ test('sends an INP span', async ({ page }) => {
8989
expect.objectContaining({
9090
'sentry.op': { value: 'ui.interaction.click', type: 'string' },
9191
'sentry.origin': { value: 'auto.http.browser.inp', type: 'string' },
92-
'ui.element.target': {
92+
'browser.web_vital.inp.target': {
9393
value: 'body > div#root > input#exception-button[type="button"]',
9494
type: 'string',
9595
},

0 commit comments

Comments
 (0)