8000 feat(tracing): Remove some more `@sentry/tracing` references (#7570) · GingerAdonis/sentry-javascript@ff469ab · GitHub
[go: up one dir, main page]

Skip to content

Commit ff469ab

Browse files
authored
feat(tracing): Remove some more @sentry/tracing references (getsentry#7570)
1 parent 0e3552d commit ff469ab

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

packages/nextjs/test/clientSdk.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
import { BaseClient, getCurrentHub } from '@sentry/core';
22
import * as SentryReact from '@sentry/react';
3-
import { WINDOW } from '@sentry/react';
4-
import { Integrations as TracingIntegrations } from '@sentry/tracing';
3+
import { BrowserTracing, WINDOW } from '@sentry/react';
54
import type { Integration } from '@sentry/types';
65
import type { UserIntegrationsFunction } from '@sentry/utils';
76
import { logger } from '@sentry/utils';
87
import { JSDOM } from 'jsdom';
98

109
import { init, Integrations, nextRouterInstrumentation } from '../src/client';
1110

12-
const { BrowserTracing } = TracingIntegrations;
13-
1411
const reactInit = jest.spyOn(SentryReact, 'init');
1512
const captureEvent = jest.spyOn(BaseClient.prototype, 'captureEvent');
1613
const loggerLogSpy = jest.spyOn(logger, 'log');

packages/nextjs/test/config/withSentry.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import * as hub from '@sentry/core';
2+
import { addTracingExtensions } from '@sentry/core';
23
import * as Sentry from '@sentry/node';
34
import type { Client, ClientOptions } from '@sentry/types';
45
import type { NextApiRequest, NextApiResponse } from 'next';
56

67
import { withSentry } from '../../src/server';
78
import type { AugmentedNextApiResponse, NextApiHandler } from '../../src/server/types';
89

10+
// The wrap* functions require the hub to have tracing extensions. This is normally called by the NodeClient
11+
// constructor but the client isn't used in these tests.
12+
addTracingExtensions();
13+
914
const FLUSH_DURATION = 200;
1015

1116
async function sleep(ms: number): Promise<void> {

packages/nextjs/test/edge/edgeWrapperUtils.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import * as coreSdk from '@sentry/core';
2+
import { addTracingExtensions } from '@sentry/core';
23

34
import { withEdgeWrapping } from '../../src/edge/utils/edgeWrapperUtils';
45

6+
// The wrap* functions require the hub to have tracing extensions. This is normally called by the EdgeClient
7+
// constructor but the client isn't used in these tests.
8+
addTracingExtensions();
9+
510
// @ts-ignore Request does not exist on type Global
611
const origRequest = global.Request;
712
// @ts-ignore Response does not exist on type Global

packages/node/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"tslib": "^1.9.3"
2727
},
2828
"devDependencies": {
29-
"@sentry/tracing": "7.44.2",
3029
"@types/cookie": "0.3.2",
3130
"@types/express": "^4.17.14",
3231
"@types/lru-cache": "^5.1.0",

packages/node/src/integrations/onuncaughtexception.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ export class OnUncaughtException implements Integration {
105105
if (
106106
// There are 3 listeners we ignore:
107107
listener.name === 'domainUncaughtExceptionClear' || // as soon as we're using domains this listener is attached by node itself
108-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
109108
(listener.tag && listener.tag === 'sentry_tracingErrorCallback') || // the handler we register for tracing
110109
listener === this.handler // the handler we register in this integration
111110
) {

packages/node/test/integrations/http.test.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
import type { Span, Transaction } from '@sentry/core';
12
import * as sentryCore from '@sentry/core';
2-
import { Hub } from '@sentry/core';
3-
import type { Span, Transaction } from '@sentry/tracing';
4-
import { addExtensionMethods, TRACEPARENT_REGEXP } from '@sentry/tracing';
3+
import { addTracingExtensions, Hub } from '@sentry/core';
54
import type { TransactionContext } from '@sentry/types';
6-
import { logger, parseSemver } from '@sentry/utils';
5+
import { logger, parseSemver, TRACEPARENT_REGEXP } from '@sentry/utils';
76
import * as http from 'http';
87
import * as https from 'https';
98
import * as HttpsProxyAgent from 'https-proxy-agent';
@@ -34,7 +33,7 @@ describe('tracing', () => {
3433
...customOptions,
3534
});
3635
const hub = new Hub(new NodeClient(options));
37-
addExtensionMethods();
36+
addTracingExtensions();
3837

3938
hub.configureScope(scope =>
4039
scope.setUser({
@@ -227,7 +226,7 @@ describe('tracing', () => {
227226
}
228227

229228
function createTransactionAndPutOnScope(hub: Hub) {
230-
addExtensionMethods();
229+
addTracingExtensions();
231230
const transaction = hub.startTransaction({ name: 'dogpark' });
232231
hub.getScope()?.setSpan(transaction);
233232
return transaction;

0 commit comments

Comments
 (0)
0