Skip to content

Commit a0b3540

Browse files
author
Luca Forstner
authored
feat(nextjs): Remove runtime and vercel tags (#11291)
1 parent b21aa19 commit a0b3540

File tree

4 files changed

+1
-23
lines changed

4 files changed

+1
-23
lines changed

packages/nextjs/src/server/index.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { addEventProcessor, addTracingExtensions, applySdkMetadata, getClient, setTag } from '@sentry/core';
1+
import { addEventProcessor, addTracingExtensions, applySdkMetadata, getClient } from '@sentry/core';
22
import { getDefaultIntegrations, init as nodeInit } from '@sentry/node';
33
import type { NodeOptions } from '@sentry/node';
44
import { GLOBAL_OBJ, logger } from '@sentry/utils';
@@ -63,8 +63,6 @@ export function showReportDialog(): void {
6363
return;
6464
}
6565

66-
const IS_VERCEL = !!process.env.VERCEL;
67-
6866
/** Inits the Sentry NextJS SDK on node. */
6967
export function init(options: NodeOptions): void {
7068
addTracingExtensions();
@@ -173,12 +171,6 @@ export function init(options: NodeOptions): void {
173171
),
174172
);
175173

176-
// TODO(v8): Remove these tags
177-
setTag('runtime', 'node');
178-
if (IS_VERCEL) {
179-
setTag('vercel', true);
180-
}
181-
182174
if (process.env.NODE_ENV === 'development') {
183175
addEventProcessor(devErrorSymbolicationEventProcessor);
184176
}

packages/nextjs/test/integration/test/server/errorApiEndpoint.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ describe('Error API Endpoints', () => {
1919
},
2020
],
2121
},
22-
tags: {
23-
runtime: 'node',
24-
},
2522
request: {
2623
url,
2724
method: 'GET',

packages/nextjs/test/integration/test/server/errorServerSideProps.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ describe('Error Server-side Props', () => {
1919
},
2020
],
2121
},
22-
tags: {
23-
runtime: 'node',
24-
},
2522
request: {
2623
url,
2724
method: 'GET',

packages/nextjs/test/serverSdk.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@ describe('Server init()', () => {
7070
expect(nodeInit).toHaveBeenCalledTimes(1);
7171
});
7272

73-
it('sets runtime on scope', () => {
74-
expect(SentryNode.getIsolationScope().getScopeData().tags).toEqual({});
75-
76-
init({ dsn: 'https://[email protected]/1337' });
77-
78-
expect(SentryNode.getIsolationScope().getScopeData().tags).toEqual({ runtime: 'node' });
79-
});
80-
8173
// TODO: test `vercel` tag when running on Vercel
8274
// Can't just add the test and set env variables, since the value in `index.server.ts`
8375
// is resolved when importing.

0 commit comments

Comments
 (0)