Skip to content

Commit b3f0589

Browse files
authored
feat(types): Deprecate op on Span interface (#10217)
As discovered during #10208, the `op` property of the `Span` interface was still missing a deprecation because `Span` inherited it from `SpanContext` which I missed.
1 parent 7992d25 commit b3f0589

File tree

16 files changed

+116
-10
lines changed

16 files changed

+116
-10
lines changed

dev-packages/browser-integration-tests/suites/public-api/startTransaction/basic_usage/test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,20 @@ sentryTest('should report finished spans as children of the root transaction', a
2929
expect(transaction.spans).toHaveLength(3);
3030

3131
const span_1 = transaction.spans?.[0];
32+
33+
// eslint-disable-next-line deprecation/deprecation
3234
expect(span_1?.op).toBe('span_1');
3335
expect(span_1?.parentSpanId).toEqual(rootSpanId);
3436
// eslint-disable-next-line deprecation/deprecation
3537
expect(span_1?.data).toMatchObject({ foo: 'bar', baz: [1, 2, 3] });
3638

3739
const span_3 = transaction.spans?.[1];
40+
// eslint-disable-next-line deprecation/deprecation
3841
expect(span_3?.op).toBe('span_3');
3942
expect(span_3?.parentSpanId).toEqual(rootSpanId);
4043

4144
const span_5 = transaction.spans?.[2];
45+
// eslint-disable-next-line deprecation/deprecation
4246
expect(span_5?.op).toBe('span_5');
4347
// eslint-disable-next-line deprecation/deprecation
4448
expect(span_5?.parentSpanId).toEqual(span_3?.spanId);

dev-packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ sentryTest('should create fetch spans with http timing @firefox', async ({ brows
2626
const envelopes = await getMultipleSentryEnvelopeRequests<Event>(page, 2, { url, timeout: 10000 });
2727
const tracingEvent = envelopes[envelopes.length - 1]; // last envelope contains tracing data on all browsers
2828

29+
// eslint-disable-next-line deprecation/deprecation
2930
const requestSpans = tracingEvent.spans?.filter(({ op }) => op === 'http.client');
3031

3132
expect(requestSpans).toHaveLength(3);

dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ sentryTest('should not capture long task when flag is disabled.', async ({ brows
1616
const url = await getLocalTestPath({ testDir: __dirname });
1717

1818
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
19+
// eslint-disable-next-line deprecation/deprecation
1920
const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui'));
2021

2122
expect(uiSpans?.length).toBe(0);

dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ sentryTest('should capture long task.', async ({ browserName, getLocalTestPath,
1616
const url = await getLocalTestPath({ testDir: __dirname });
1717

1818
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
19+
// eslint-disable-next-line deprecation/deprecation
1920
const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui'));
2021

2122
expect(uiSpans?.length).toBeGreaterThan(0);

dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-browser-spans/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ sentryTest('should add browser-related spans to pageload transaction', async ({
1212
const url = await getLocalTestPath({ testDir: __dirname });
1313

1414
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
15+
// eslint-disable-next-line deprecation/deprecation
1516
const browserSpans = eventData.spans?.filter(({ op }) => op === 'browser');
1617

1718
// Spans `connect`, `cache` and `DNS` are not always inside `pageload` transaction.

dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ sentryTest('should add resource spans to pageload transaction', async ({ getLoca
1818
const url = await getLocalTestPath({ testDir: __dirname });
1919

2020
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
21+
// eslint-disable-next-line deprecation/deprecation
2122
const resourceSpans = eventData.spans?.filter(({ op }) => op?.startsWith('resource'));
2223

2324
// Webkit 16.0 (which is linked to Playwright 1.27.1) consistently creates 2 consectutive spans for `css`,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ sentryTest('should capture a FID vital.', async ({ browserName, getLocalTestPath
2525
const fidSpan = eventData.spans?.filter(({ description }) => description === 'first input delay')[0];
2626

2727
expect(fidSpan).toBeDefined();
28+
// eslint-disable-next-line deprecation/deprecation
2829
expect(fidSpan?.op).toBe('ui.action');
2930
expect(fidSpan?.parentSpanId).toBe(eventData.contexts?.trace_span_id);
3031
});

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ sentryTest('should capture FP vital.', async ({ browserName, getLocalTestPath, p
2020
const fpSpan = eventData.spans?.filter(({ description }) => description === 'first-paint')[0];
2121

2222
expect(fpSpan).toBeDefined();
23+
// eslint-disable-next-line deprecation/deprecation
2324
expect(fpSpan?.op).toBe('paint');
2425
expect(fpSpan?.parentSpanId).toBe(eventData.contexts?.trace_span_id);
2526
});
@@ -39,6 +40,7 @@ sentryTest('should capture FCP vital.', async ({ getLocalTestPath, page }) => {
3940
const fcpSpan = eventData.spans?.filter(({ description }) => description === 'first-contentful-paint')[0];
4041

4142
expect(fcpSpan).toBeDefined();
43+
// eslint-disable-next-line deprecation/deprecation
4244
expect(fcpSpan?.op).toBe('paint');
4345
expect(fcpSpan?.parentSpanId).toBe(eventData.contexts?.trace_span_id);
4446
});

dev-packages/browser-integration-tests/suites/tracing/request/fetch/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ sentryTest('should create spans for multiple fetch requests', async ({ getLocalT
2525
const envelopes = await getMultipleSentryEnvelopeRequests<Event>(page, 2, { url, timeout: 10000 });
2626
const tracingEvent = envelopes[envelopes.length - 1]; // last envelope contains tracing data on all browsers
2727

28+
// eslint-disable-next-line deprecation/deprecation
2829
const requestSpans = tracingEvent.spans?.filter(({ op }) => op === 'http.client');
2930

3031
expect(requestSpans).toHaveLength(3);

dev-packages/browser-integration-tests/suites/tracing/request/xhr/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ sentryTest('should create spans for multiple XHR requests', async ({ getLocalTes
1313
const url = await getLocalTestPath({ testDir: __dirname });
1414

1515
const eventData = await getFirstSentryEnvelopeRequest<Event>(page, url);
16+
// eslint-disable-next-line deprecation/deprecation
1617
const requestSpans = eventData.spans?.filter(({ op }) => op === 'http.client');
1718

1819
expect(requestSpans).toHaveLength(3);

0 commit comments

Comments
 (0)