Skip to content

Commit 437d20a

Browse files
authored
feat(v8): Remove @sentry/tracing (#10625)
Aside from deleting the tracing package and all of it's references, it also moves some relevant tests into core.
1 parent 36806f3 commit 437d20a

File tree

88 files changed

+278
-2517
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+278
-2517
lines changed

.craft.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,7 @@ targets:
131131
id: '@sentry-internal/eslint-config-sdk'
132132
includeNames: /^sentry-internal-eslint-config-sdk-\d.*\.tgz$/
133133

134-
## 8. Deprecated packages we still release (but no packages depend on them anymore)
135-
- name: npm
136-
id: '@sentry/tracing'
137-
includeNames: /^sentry-tracing-\d.*\.tgz$/
138-
139-
## 9. Experimental packages
134+
## 8. Experimental packages
140135
- name: npm
141136
id: '@sentry/node-experimental'
142137
includeNames: /^sentry-node-experimental-\d.*\.tgz$/

MIGRATION.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@ to access and mutate the current scope.
8888

8989
## Deletion of `@sentry/hub` package (#10530)
9090

91-
`@sentry/hub` has been removed. All exports from `@sentry.hub` should be available in `@sentry/core`.
91+
`@sentry/hub` has been removed. All exports from `@sentry/tracing` should be available in `@sentry/core` or in
92+
`@sentry/browser` and `@sentry/node`.
93+
94+
## Deletion of `@sentry/tracing` package
95+
96+
`@sentry/tracing` has been removed. All exports from `@sentry/tracing` should be available in `@sentry/core` or in
97+
`@sentry/browser` and `@sentry/node`.
9298

9399
## Removal of `makeXHRTransport` transport (#10703)
94100

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ Besides the high-level SDKs, this repository contains shared packages, helpers a
9595
development. If you're thinking about contributing to or creating a JavaScript-based SDK, have a look at the resources
9696
below:
9797

98-
- [`@sentry/tracing`](https://github.com/getsentry/sentry-javascript/tree/master/packages/tracing): Provides
99-
integrations and extensions for Performance Monitoring / Tracing.
10098
- [`@sentry/replay`](https://github.com/getsentry/sentry-javascript/tree/master/packages/replay): Provides the
10199
integration for Session Replay.
102100
- [`@sentry/core`](https://github.com/getsentry/sentry-javascript/tree/master/packages/core): The base for all

dev-packages/browser-integration-tests/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"@playwright/test": "^1.40.1",
4949
"@sentry-internal/rrweb": "2.11.0",
5050
"@sentry/browser": "7.100.0",
51-
"@sentry/tracing": "7.100.0",
5251
"axios": "1.6.7",
5352
"babel-loader": "^8.2.2",
5453
"html-webpack-plugin": "^5.5.0",

dev-packages/browser-integration-tests/suites/public-api/startSpan/init.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
/* eslint-disable no-unused-vars */
21
import * as Sentry from '@sentry/browser';
3-
// biome-ignore lint/nursery/noUnusedImports: Need to import tracing for side effect
4-
import * as _ from '@sentry/tracing';
52

63
window.Sentry = Sentry;
74

5+
Sentry.addTracingExtensions();
6+
87
Sentry.init({
98
dsn: 'https://[email protected]/1337',
109
tracesSampleRate: 1.0,

dev-packages/browser-integration-tests/suites/public-api/startTransaction/init.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
/* eslint-disable no-unused-vars */
21
import * as Sentry from '@sentry/browser';
3-
// biome-ignore lint/nursery/noUnusedImports: Need to import tracing for side effect
4-
import * as _ from '@sentry/tracing';
52

63
window.Sentry = Sentry;
74

5+
Sentry.addTracingExtensions();
6+
87
Sentry.init({
98
dsn: 'https://[email protected]/1337',
109
tracesSampleRate: 1.0,

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Route } from '@playwright/test';
22
import { expect } from '@playwright/test';
3-
import type { Event } from '@sentry/types';
3+
import type { SerializedEvent } from '@sentry/types';
44

55
import { sentryTest } from '../../../../utils/fixtures';
66
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -15,8 +15,7 @@ sentryTest('should not capture long task when flag is disabled.', async ({ brows
1515

1616
const url = await getLocalTestPath({ testDir: __dirname });
1717

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

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

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Route } from '@playwright/test';
22
import { expect } from '@playwright/test';
3-
import type { Event } from '@sentry/types';
3+
import type { SerializedEvent } from '@sentry/types';
44

55
import { sentryTest } from '../../../../utils/fixtures';
66
import { getFirstSentryEnvelopeRequest, shouldSkipTracingTest } from '../../../../utils/helpers';
@@ -15,8 +15,7 @@ sentryTest('should capture long task.', async ({ browserName, getLocalTestPath,
1515

1616
const url = await getLocalTestPath({ testDir: __dirname });
1717

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

2221
expect(uiSpans?.length).toBeGreaterThan(0);
@@ -29,8 +28,8 @@ sentryTest('should capture long task.', async ({ browserName, getLocalTestPath,
2928
parent_span_id: eventData.contexts?.trace?.span_id,
3029
}),
3130
);
32-
const start = (firstUISpan as Event)['start_timestamp'] ?? 0;
33-
const end = (firstUISpan as Event)['timestamp'] ?? 0;
31+
const start = firstUISpan.start_timestamp ?? 0;
32+
const end = firstUISpan.timestamp ?? 0;
3433
const duration = end - start;
3534

3635
expect(duration).toBeGreaterThanOrEqual(0.1);

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ window.Sentry = Sentry;
55
Sentry.init({
66
dsn: 'https://[email protected]/1337',
77
sampleRate: 1,
8-
integrations: [new Sentry.browserTracingIntegration()],
8+
integrations: [Sentry.browserTracingIntegration()],
99
});
1010

1111
// This should not fail
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import * as Sentry from '@sentry/browser';
2-
import { Integrations } from '@sentry/tracing';
32

43
window.Sentry = Sentry;
54

65
Sentry.init({
76
dsn: 'https://[email protected]/1337',
8-
integrations: [new Integrations.BrowserTracing({ idleTimeout: 9000, startTransactionOnPageLoad: false })],
7+
integrations: [new Sentry.BrowserTracing({ idleTimeout: 9000, startTransactionOnPageLoad: false })],
98
tracesSampleRate: 1,
109
});

0 commit comments

Comments
 (0)