Skip to content

Commit f406cf0

Browse files
author
Luca Forstner
committed
Random removals
1 parent 5e8d0b5 commit f406cf0

33 files changed

+68
-567
lines changed

dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customBrowserTracing/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
waitForTransactionRequestOnUrl,
88
} from '../../../../utils/helpers';
99

10-
sentryTest('should handle custom added BrowserTracing integration', async ({ getLocalTestUrl, page }) => {
10+
sentryTest('should handle custom added browserTracingIntegration instances', async ({ getLocalTestUrl, page }) => {
1111
if (shouldSkipTracingTest()) {
1212
sentryTest.skip();
1313
}

dev-packages/browser-integration-tests/suites/tracing/envelope-header/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ sentryTest(
2121

2222
// In this test, we don't expect trace.transaction to be present because without a custom routing instrumentation
2323
// we for now don't have parameterization. This might change in the future but for now the only way of having
24-
// transaction in DSC with the default BrowserTracing integration is when the transaction name is set manually.
24+
// transaction in DSC with the default browserTracingIntegration is when the transaction name is set manually.
2525
// This scenario is covered in another integration test (envelope-header-transaction-name).
2626
expect(envHeader.trace).toBeDefined();
2727
expect(envHeader.trace).toEqual({

packages/angular/src/tracing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function routingInstrumentation(
6767
export const instrumentAngularRouting = routingInstrumentation;
6868

6969
/**
70-
* A custom BrowserTracing integration for Angular.
70+
* A custom browser tracing integration for Angular.
7171
*
7272
* Use this integration in combination with `TraceService`
7373
*/

packages/astro/test/client/sdk.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe('Sentry client SDK', () => {
5656
['tracesSampleRate', { tracesSampleRate: 0 }],
5757
['tracesSampler', { tracesSampler: () => 1.0 }],
5858
['enableTracing', { enableTracing: true }],
59-
])('adds the BrowserTracing integration if tracing is enabled via %s', (_, tracingOptions) => {
59+
])('adds browserTracingIntegration if tracing is enabled via %s', (_, tracingOptions) => {
6060
init({
6161
dsn: 'https://[email protected]/1337',
6262
...tracingOptions,
@@ -72,7 +72,7 @@ describe('Sentry client SDK', () => {
7272
it.each([
7373
['enableTracing', { enableTracing: false }],
7474
['no tracing option set', {}],
75-
])("doesn't add the BrowserTracing integration if tracing is disabled via %s", (_, tracingOptions) => {
75+
])("doesn't add browserTracingIntegration if tracing is disabled via %s", (_, tracingOptions) => {
7676
init({
7777
dsn: 'https://[email protected]/1337',
7878
...tracingOptions,
@@ -85,7 +85,7 @@ describe('Sentry client SDK', () => {
8585
expect(browserTracing).toBeUndefined();
8686
});
8787

88-
it("doesn't add the BrowserTracing integration if `__SENTRY_TRACING__` is set to false", () => {
88+
it("doesn't add browserTracingIntegration if `__SENTRY_TRACING__` is set to false", () => {
8989
globalThis.__SENTRY_TRACING__ = false;
9090

9191
init({
@@ -102,7 +102,7 @@ describe('Sentry client SDK', () => {
102102
delete globalThis.__SENTRY_TRACING__;
103103
});
104104

105-
it('Overrides the automatically default BrowserTracing instance with a a user-provided browserTracingIntegration instance', () => {
105+
it('Overrides the automatically default browserTracingIntegration instance with a a user-provided browserTracingIntegration instance', () => {
106106
init({
107107
dsn: 'https://[email protected]/1337',
108108
integrations: [

packages/astro/test/integration/snippets.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('buildClientSnippet', () => {
5050
`);
5151
});
5252

53-
it('does not include BrowserTracing if tracesSampleRate is 0', () => {
53+
it('does not include browserTracingIntegration if tracesSampleRate is 0', () => {
5454
const snippet = buildClientSnippet({ tracesSampleRate: 0 });
5555
expect(snippet).toMatchInlineSnapshot(`
5656
"import * as Sentry from \\"@sentry/astro\\";

packages/browser/src/helpers.ts

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import type { browserTracingIntegration } from '@sentry-internal/tracing';
2-
import { BrowserTracing } from '@sentry-internal/tracing';
31
import { captureException, withScope } from '@sentry/core';
4-
import type { Integration, Mechanism, WrappedFunction } from '@sentry/types';
2+
import type { Mechanism, WrappedFunction } from '@sentry/types';
53
import {
64
GLOBAL_OBJ,
75
addExceptionMechanism,
@@ -155,35 +153,3 @@ export function wrap(
155153

156154
return sentryWrapped;
157155
}
158-
159-
/**
160-
* This is a slim shim of `browserTracingIntegration` for the CDN bundles.
161-
* Since the actual functional integration uses a different code from `BrowserTracing`,
162-
* we want to avoid shipping both of them in the CDN bundles, as that would blow up the size.
163-
* Instead, we provide a functional integration with the same API, but the old implementation.
164-
* This means that it's not possible to register custom routing instrumentation, but that's OK for now.
165-
* We also don't expose the utilities for this anyhow in the CDN bundles.
166-
* For users that need custom routing in CDN bundles, they have to continue using `new BrowserTracing()` until v8.
167-
*/
168-
export function bundleBrowserTracingIntegration(
169-
options: Parameters<typeof browserTracingIntegration>[0] = {},
170-
): Integration {
171-
// Migrate some options from the old integration to the new one
172-
// eslint-disable-next-line deprecation/deprecation
173-
const opts: ConstructorParameters<typeof BrowserTracing>[0] = options;
174-
175-
if (typeof options.markBackgroundSpan === 'boolean') {
176-
opts.markBackgroundTransactions = options.markBackgroundSpan;
177-
}
178-
179-
if (typeof options.instrumentPageLoad === 'boolean') {
180-
opts.startTransactionOnPageLoad = options.instrumentPageLoad;
181-
}
182-
183-
if (typeof options.instrumentNavigation === 'boolean') {
184-
opts.startTransactionOnLocationChange = options.instrumentNavigation;
185-
}
186-
187-
// eslint-disable-next-line deprecation/deprecation
188-
return new BrowserTracing(opts);
189-
}

packages/browser/src/index.bundle.feedback.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// This is exported so the loader does not fail when switching off Replay/Tracing
22
import { Feedback, feedbackIntegration } from '@sentry-internal/feedback';
33
import {
4-
BrowserTracing,
54
Replay,
65
addTracingExtensions,
76
browserTracingIntegration,
@@ -14,13 +13,8 @@ import * as Sentry from './index.bundle.base';
1413
// eslint-disable-next-line deprecation/deprecation
1514
Sentry.Integrations.Replay = Replay;
1615

17-
// eslint-disable-next-line deprecation/deprecation
18-
Sentry.Integrations.BrowserTracing = BrowserTracing;
19-
2016
export * from './index.bundle.base';
2117
export {
22-
// eslint-disable-next-line deprecation/deprecation
23-
BrowserTracing,
2418
browserTracingIntegration,
2519
addTracingExtensions,
2620
// eslint-disable-next-line deprecation/deprecation

packages/browser/src/index.bundle.replay.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// This is exported so the loader does not fail when switching off Replay/Tracing
22
import {
3-
BrowserTracing,
43
Feedback,
54
addTracingExtensions,
65
browserTracingIntegration,
@@ -14,13 +13,8 @@ import * as Sentry from './index.bundle.base';
1413
// eslint-disable-next-line deprecation/deprecation
1514
Sentry.Integrations.Replay = Replay;
1615

17-
// eslint-disable-next-line deprecation/deprecation
18-
Sentry.Integrations.BrowserTracing = BrowserTracing;
19-
2016
export * from './index.bundle.base';
2117
export {
22-
// eslint-disable-next-line deprecation/deprecation
23-
BrowserTracing,
2418
browserTracingIntegration,
2519
addTracingExtensions,
2620
// eslint-disable-next-line deprecation/deprecation

packages/browser/src/index.bundle.tracing.replay.feedback.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Feedback, feedbackIntegration } from '@sentry-internal/feedback';
2-
import { BrowserTracing, addExtensionMethods } from '@sentry-internal/tracing';
2+
import { addExtensionMethods, browserTracingIntegration } from '@sentry-internal/tracing';
33
import { Replay, replayIntegration } from '@sentry/replay';
4-
import { bundleBrowserTracingIntegration as browserTracingIntegration } from './helpers';
54

65
import * as Sentry from './index.bundle.base';
76

@@ -11,9 +10,6 @@ import * as Sentry from './index.bundle.base';
1110
// eslint-disable-next-line deprecation/deprecation
1211
Sentry.Integrations.Replay = Replay;
1312

14-
// eslint-disable-next-line deprecation/deprecation
15-
Sentry.Integrations.BrowserTracing = BrowserTracing;
16-
1713
// We are patching the global object with our hub extension methods
1814
addExtensionMethods();
1915

@@ -24,8 +20,6 @@ export {
2420
Replay,
2521
feedbackIntegration,
2622
replayIntegration,
27-
// eslint-disable-next-line deprecation/deprecation
28-
BrowserTracing,
2923
browserTracingIntegration,
3024
addExtensionMethods,
3125
};

packages/browser/src/index.bundle.tracing.replay.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Feedback, feedbackIntegration } from '@sentry-internal/integration-shims';
2-
import { BrowserTracing, addExtensionMethods } from '@sentry-internal/tracing';
2+
import { addExtensionMethods, browserTracingIntegration } from '@sentry-internal/tracing';
33
import { Replay, replayIntegration } from '@sentry/replay';
4-
import { bundleBrowserTracingIntegration as browserTracingIntegration } from './helpers';
54

65
import * as Sentry from './index.bundle.base';
76

@@ -11,9 +10,6 @@ import * as Sentry from './index.bundle.base';
1110
// eslint-disable-next-line deprecation/deprecation
1211
Sentry.Integrations.Replay = Replay;
1312

14-
// eslint-disable-next-line deprecation/deprecation
15-
Sentry.Integrations.BrowserTracing = BrowserTracing;
16-
1713
// We are patching the global object with our hub extension methods
1814
addExtensionMethods();
1915

@@ -24,8 +20,6 @@ export {
2420
Replay,
2521
replayIntegration,
2622
feedbackIntegration,
27-
// eslint-disable-next-line deprecation/deprecation
28-
BrowserTracing,
2923
browserTracingIntegration,
3024
addExtensionMethods,
3125
};

packages/browser/src/index.bundle.tracing.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// This is exported so the loader does not fail when switching off Replay
22
import { Feedback, Replay, feedbackIntegration, replayIntegration } from '@sentry-internal/integration-shims';
3-
import { BrowserTracing, addExtensionMethods } from '@sentry-internal/tracing';
4-
import { bundleBrowserTracingIntegration as browserTracingIntegration } from './helpers';
3+
import { addExtensionMethods, browserTracingIntegration } from '@sentry-internal/tracing';
54

65
import * as Sentry from './index.bundle.base';
76

@@ -11,9 +10,6 @@ import * as Sentry from './index.bundle.base';
1110
// eslint-disable-next-line deprecation/deprecation
1211
Sentry.Integrations.Replay = Replay;
1312

14-
// eslint-disable-next-line deprecation/deprecation
15-
Sentry.Integrations.BrowserTracing = BrowserTracing;
16-
1713
// We are patching the global object with our hub extension methods
1814
addExtensionMethods();
1915

@@ -24,8 +20,6 @@ export {
2420
Replay,
2521
feedbackIntegration,
2622
replayIntegration,
27-
// eslint-disable-next-line deprecation/deprecation
28-
BrowserTracing,
2923
browserTracingIntegration,
3024
addExtensionMethods,
3125
};

packages/browser/src/index.bundle.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// This is exported so the loader does not fail when switching off Replay/Tracing
22
import {
3-
BrowserTracing,
43
Feedback,
54
Replay,
65
addTracingExtensions,
@@ -15,13 +14,8 @@ import * as Sentry from './index.bundle.base';
1514
// eslint-disable-next-line deprecation/deprecation
1615
Sentry.Integrations.Replay = Replay;
1716

18-
// eslint-disable-next-line deprecation/deprecation
19-
Sentry.Integrations.BrowserTracing = BrowserTracing;
20-
2117
export * from './index.bundle.base';
2218
export {
23-
// eslint-disable-next-line deprecation/deprecation
24-
BrowserTracing,
2519
addTracingExtensions,
2620
// eslint-disable-next-line deprecation/deprecation
2721
Replay,

packages/browser/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ export {
5555
} from '@sentry-internal/feedback';
5656

5757
export {
58-
// eslint-disable-next-line deprecation/deprecation
59-
BrowserTracing,
6058
defaultRequestInstrumentationOptions,
6159
instrumentOutgoingRequests,
6260
browserTracingIntegration,

packages/browser/test/unit/index.bundle.feedback.test.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,14 @@ import * as TracingReplayBundle from '../../src/index.bundle.feedback';
1111
describe('index.bundle.feedback', () => {
1212
it('has correct exports', () => {
1313
Object.keys(TracingReplayBundle.Integrations).forEach(key => {
14-
// Skip BrowserTracing because it doesn't have a static id field.
15-
if (key === 'BrowserTracing') {
16-
return;
17-
}
18-
1914
expect((TracingReplayBundle.Integrations[key] as any).id).toStrictEqual(expect.any(String));
2015
});
2116

2217
expect(TracingReplayBundle.Integrations.Replay).toBe(ReplayShim);
2318
expect(TracingReplayBundle.Replay).toBe(ReplayShim);
2419
expect(TracingReplayBundle.replayIntegration).toBe(replayIntegrationShim);
2520

26-
expect(TracingReplayBundle.Integrations.BrowserTracing).toBe(BrowserTracingShim);
27-
expect(TracingReplayBundle.BrowserTracing).toBe(BrowserTracingShim);
21+
expect(TracingReplayBundle.browserTracingIntegration).toBe(BrowserTracingShim);
2822

2923
expect(TracingReplayBundle.Feedback).toBe(Feedback);
3024
expect(TracingReplayBundle.feedbackIntegration).toBe(feedbackIntegration);

packages/browser/test/unit/index.bundle.replay.test.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,14 @@ import * as TracingReplayBundle from '../../src/index.bundle.replay';
1111
describe('index.bundle.replay', () => {
1212
it('has correct exports', () => {
1313
Object.keys(TracingReplayBundle.Integrations).forEach(key => {
14-
// Skip BrowserTracing because it doesn't have a static id field.
15-
if (key === 'BrowserTracing') {
16-
return;
17-
}
18-
1914
expect((TracingReplayBundle.Integrations[key] as any).id).toStrictEqual(expect.any(String));
2015
});
2116

2217
expect(TracingReplayBundle.Integrations.Replay).toBe(Replay);
2318
expect(TracingReplayBundle.Replay).toBe(Replay);
2419
expect(TracingReplayBundle.replayIntegration).toBe(replayIntegration);
2520

26-
expect(TracingReplayBundle.Integrations.BrowserTracing).toBe(BrowserTracingShim);
27-
expect(TracingReplayBundle.BrowserTracing).toBe(BrowserTracingShim);
21+
expect(TracingReplayBundle.browserTracingIntegration).toBe(BrowserTracingShim);
2822

2923
expect(TracingReplayBundle.Feedback).toBe(FeedbackShim);
3024
expect(TracingReplayBundle.feedbackIntegration).toBe(feedbackIntegrationShim);

packages/browser/test/unit/index.bundle.test.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,14 @@ import * as TracingBundle from '../../src/index.bundle';
1212
describe('index.bundle', () => {
1313
it('has correct exports', () => {
1414
Object.keys(TracingBundle.Integrations).forEach(key => {
15-
// Skip BrowserTracing because it doesn't have a static id field.
16-
if (key === 'BrowserTracing') {
17-
return;
18-
}
19-
2015
expect((TracingBundle.Integrations[key] as any).id).toStrictEqual(expect.any(String));
2116
});
2217

2318
expect(TracingBundle.Integrations.Replay).toBe(ReplayShim);
2419
expect(TracingBundle.Replay).toBe(ReplayShim);
2520
expect(TracingBundle.replayIntegration).toBe(replayIntegrationShim);
2621

27-
expect(TracingBundle.Integrations.BrowserTracing).toBe(BrowserTracingShim);
28-
expect(TracingBundle.BrowserTracing).toBe(BrowserTracingShim);
22+
expect(TracingBundle.browserTracingIntegration).toBe(BrowserTracingShim);
2923

3024
expect(TracingBundle.Feedback).toBe(FeedbackShim);
3125
expect(TracingBundle.feedbackIntegration).toBe(feedbackIntegrationShim);

packages/browser/test/unit/index.bundle.tracing.replay.feedback.test.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
1-
/* eslint-disable deprecation/deprecation */
2-
import { BrowserTracing } from '@sentry-internal/tracing';
1+
import { browserTracingIntegration } from '@sentry-internal/tracing';
32
import { Feedback, Replay, feedbackIntegration, replayIntegration } from '@sentry/browser';
43

54
import * as TracingReplayFeedbackBundle from '../../src/index.bundle.tracing.replay.feedback';
65

76
describe('index.bundle.tracing.replay.feedback', () => {
87
it('has correct exports', () => {
98
Object.keys(TracingReplayFeedbackBundle.Integrations).forEach(key => {
10-
// Skip BrowserTracing because it doesn't have a static id field.
11-
if (key === 'BrowserTracing') {
12-
return;
13-
}
14-
159
expect((TracingReplayFeedbackBundle.Integrations[key] as any).id).toStrictEqual(expect.any(String));
1610
});
1711

1812
expect(TracingReplayFeedbackBundle.Integrations.Replay).toBe(Replay);
1913
expect(TracingReplayFeedbackBundle.Replay).toBe(Replay);
2014
expect(TracingReplayFeedbackBundle.replayIntegration).toBe(replayIntegration);
2115

22-
expect(TracingReplayFeedbackBundle.Integrations.BrowserTracing).toBe(BrowserTracing);
23-
expect(TracingReplayFeedbackBundle.BrowserTracing).toBe(BrowserTracing);
16+
expect(TracingReplayFeedbackBundle.browserTracingIntegration).toBe(browserTracingIntegration);
2417

2518
expect(TracingReplayFeedbackBundle.Feedback).toBe(Feedback);
2619
expect(TracingReplayFeedbackBundle.feedbackIntegration).toBe(feedbackIntegration);

packages/browser/test/unit/index.bundle.tracing.replay.test.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,22 @@ import {
33
Feedback as FeedbackShim,
44
feedbackIntegration as feedbackIntegrationShim,
55
} from '@sentry-internal/integration-shims';
6-
import { BrowserTracing } from '@sentry-internal/tracing';
6+
import { browserTracingIntegration } from '@sentry-internal/tracing';
77
import { Replay, replayIntegration } from '@sentry/browser';
88

99
import * as TracingReplayBundle from '../../src/index.bundle.tracing.replay';
1010

1111
describe('index.bundle.tracing.replay', () => {
1212
it('has correct exports', () => {
1313
Object.keys(TracingReplayBundle.Integrations).forEach(key => {
14-
// Skip BrowserTracing because it doesn't have a static id field.
15-
if (key === 'BrowserTracing') {
16-
return;
17-
}
18-
1914
expect((TracingReplayBundle.Integrations[key] as any).id).toStrictEqual(expect.any(String));
2015
});
2116

2217
expect(TracingReplayBundle.Integrations.Replay).toBe(Replay);
2318
expect(TracingReplayBundle.Replay).toBe(Replay);
2419
expect(TracingReplayBundle.replayIntegration).toBe(replayIntegration);
2520

26-
expect(TracingReplayBundle.Integrations.BrowserTracing).toBe(BrowserTracing);
27-
expect(TracingReplayBundle.BrowserTracing).toBe(BrowserTracing);
21+
expect(TracingReplayBundle.browserTracingIntegration).toBe(browserTracingIntegration);
2822

2923
expect(TracingReplayBundle.Feedback).toBe(FeedbackShim);
3024
expect(TracingReplayBundle.feedbackIntegration).toBe(feedbackIntegrationShim);

0 commit comments

Comments
 (0)