diff --git a/dev-packages/e2e-tests/test-applications/create-next-app/tests/client-transactions.test.ts b/dev-packages/e2e-tests/test-applications/create-next-app/tests/client-transactions.test.ts index dd4633620e8b..d46191a77c03 100644 --- a/dev-packages/e2e-tests/test-applications/create-next-app/tests/client-transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/create-next-app/tests/client-transactions.test.ts @@ -13,7 +13,6 @@ test('Sends a pageload transaction to Sentry', async ({ page }) => { expect(transactionEvent).toEqual( expect.objectContaining({ transaction: '/', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -59,7 +58,6 @@ test('captures a navigation transcation to Sentry', async ({ page }) => { expect(clientTxnEvent).toEqual( expect.objectContaining({ transaction: '/user/[id]', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { diff --git a/dev-packages/e2e-tests/test-applications/create-next-app/tests/server-transactions.test.ts b/dev-packages/e2e-tests/test-applications/create-next-app/tests/server-transactions.test.ts index 56be8b65d60b..db5aec11ced0 100644 --- a/dev-packages/e2e-tests/test-applications/create-next-app/tests/server-transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/create-next-app/tests/server-transactions.test.ts @@ -32,10 +32,6 @@ test('Sends server-side transactions to Sentry', async ({ baseURL }) => { }), status: 'ok', }, - runtime: { - name: 'node', - version: expect.any(String), - }, }), spans: [ { diff --git a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/transactions.test.ts index 42fee84295b8..8d2489bab34d 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/transactions.test.ts @@ -19,7 +19,6 @@ test('Sends a pageload transaction', async ({ page }) => { expect(transactionEvent).toEqual( expect.objectContaining({ transaction: '/', - tags: { runtime: 'browser' }, transaction_info: { source: 'url' }, type: 'transaction', contexts: { diff --git a/dev-packages/e2e-tests/test-applications/solidstart/tests/errors.client.test.ts b/dev-packages/e2e-tests/test-applications/solidstart/tests/errors.client.test.ts index c9ab1db244b5..0f5ef61b365a 100644 --- a/dev-packages/e2e-tests/test-applications/solidstart/tests/errors.client.test.ts +++ b/dev-packages/e2e-tests/test-applications/solidstart/tests/errors.client.test.ts @@ -26,7 +26,6 @@ test.describe('client-side errors', () => { }, transaction: '/client-error', }); - expect(error.tags).toMatchObject({ runtime: 'browser' }); expect(error.transaction).toEqual('/client-error'); }); }); diff --git a/dev-packages/e2e-tests/test-applications/solidstart/tests/errors.server.test.ts b/dev-packages/e2e-tests/test-applications/solidstart/tests/errors.server.test.ts index 0ccea7d3767e..ccd0a802fbb2 100644 --- a/dev-packages/e2e-tests/test-applications/solidstart/tests/errors.server.test.ts +++ b/dev-packages/e2e-tests/test-applications/solidstart/tests/errors.server.test.ts @@ -11,7 +11,6 @@ test.describe('server-side errors', () => { const error = await errorEventPromise; - expect(error.tags).toMatchObject({ runtime: 'node' }); expect(error).toMatchObject({ exception: { values: [ diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/errors.client.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/errors.client.test.ts index 1984a0db9603..fce77451551b 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/errors.client.test.ts +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/errors.client.test.ts @@ -26,8 +26,6 @@ test.describe('client-side errors', () => { }), ); - expect(errorEvent.tags).toMatchObject({ runtime: 'browser' }); - expect(errorEvent.transaction).toEqual('/client-error'); }); @@ -53,7 +51,6 @@ test.describe('client-side errors', () => { }), ); - expect(errorEvent.tags).toMatchObject({ runtime: 'browser' }); expect(errorEvent.transaction).toEqual('/universal-load-error'); }); }); diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/errors.server.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/errors.server.test.ts index 0764d26e05a5..c019a5b7260e 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/errors.server.test.ts +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/errors.server.test.ts @@ -19,8 +19,6 @@ test.describe('server-side errors', () => { }), ); - expect(errorEvent.tags).toMatchObject({ runtime: 'node' }); - expect(errorEvent.request).toEqual({ cookies: {}, headers: expect.objectContaining({ @@ -49,8 +47,6 @@ test.describe('server-side errors', () => { }), ); - expect(errorEvent.tags).toMatchObject({ runtime: 'node' }); - expect(errorEvent.request).toEqual({ cookies: {}, headers: expect.objectContaining({ diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/performance.server.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/performance.server.test.ts index 8c23996c9a37..f065f5148411 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/performance.server.test.ts +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/performance.server.test.ts @@ -13,7 +13,6 @@ test('server pageload request span has nested request span for sub request', asy expect(serverTxnEvent).toMatchObject({ transaction: 'GET /server-load-fetch', - tags: { runtime: 'node' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/performance.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/performance.test.ts index 622562b9ab6a..95855d8f8e81 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/performance.test.ts +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2-svelte-5/tests/performance.test.ts @@ -21,7 +21,6 @@ test.describe('performance events', () => { expect(clientTxnEvent).toMatchObject({ transaction: '/users/[id]', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -34,7 +33,6 @@ test.describe('performance events', () => { expect(serverTxnEvent).toMatchObject({ transaction: 'GET /users/[id]', - tags: { runtime: 'node' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -77,7 +75,6 @@ test.describe('performance events', () => { expect(clientTxnEvent).toMatchObject({ transaction: '/users', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -90,7 +87,6 @@ test.describe('performance events', () => { expect(serverTxnEvent).toMatchObject({ transaction: 'GET /users', - tags: { runtime: 'node' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -130,7 +126,6 @@ test.describe('performance events', () => { expect(clientTxnEvent).toMatchObject({ transaction: '/universal-load-fetch', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -143,7 +138,6 @@ test.describe('performance events', () => { expect(serverTxnEvent).toMatchObject({ transaction: 'GET /api/users', - tags: { runtime: 'node' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -186,11 +180,11 @@ test.describe('performance events', () => { test('captures a navigation transaction directly after pageload', async ({ page }) => { const clientPageloadTxnPromise = waitForTransaction('sveltekit-2-svelte-5', txnEvent => { - return txnEvent?.contexts?.trace?.op === 'pageload' && txnEvent?.tags?.runtime === 'browser'; + return txnEvent?.contexts?.trace?.op === 'pageload'; }); const clientNavigationTxnPromise = waitForTransaction('sveltekit-2-svelte-5', txnEvent => { - return txnEvent?.contexts?.trace?.op === 'navigation' && txnEvent?.tags?.runtime === 'browser'; + return txnEvent?.contexts?.trace?.op === 'navigation'; }); await waitForInitialPageload(page, { route: '/' }); @@ -205,7 +199,6 @@ test.describe('performance events', () => { expect(pageloadTxnEvent).toMatchObject({ transaction: '/', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -218,7 +211,6 @@ test.describe('performance events', () => { expect(navigationTxnEvent).toMatchObject({ transaction: '/users/[id]', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -253,27 +245,15 @@ test.describe('performance events', () => { test('captures one navigation transaction per redirect', async ({ page }) => { const clientNavigationRedirect1TxnPromise = waitForTransaction('sveltekit-2-svelte-5', txnEvent => { - return ( - txnEvent?.contexts?.trace?.op === 'navigation' && - txnEvent?.tags?.runtime === 'browser' && - txnEvent?.transaction === '/redirect1' - ); + return txnEvent?.contexts?.trace?.op === 'navigation' && txnEvent?.transaction === '/redirect1'; }); const clientNavigationRedirect2TxnPromise = waitForTransaction('sveltekit-2-svelte-5', txnEvent => { - return ( - txnEvent?.contexts?.trace?.op === 'navigation' && - txnEvent?.tags?.runtime === 'browser' && - txnEvent?.transaction === '/redirect2' - ); + return txnEvent?.contexts?.trace?.op === 'navigation' && txnEvent?.transaction === '/redirect2'; }); const clientNavigationRedirect3TxnPromise = waitForTransaction('sveltekit-2-svelte-5', txnEvent => { - return ( - txnEvent?.contexts?.trace?.op === 'navigation' && - txnEvent?.tags?.runtime === 'browser' && - txnEvent?.transaction === '/users/[id]' - ); + return txnEvent?.contexts?.trace?.op === 'navigation' && txnEvent?.transaction === '/users/[id]'; }); await waitForInitialPageload(page, { route: '/' }); @@ -289,7 +269,6 @@ test.describe('performance events', () => { expect(redirect1TxnEvent).toMatchObject({ transaction: '/redirect1', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -327,7 +306,6 @@ test.describe('performance events', () => { expect(redirect2TxnEvent).toMatchObject({ transaction: '/redirect2', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -365,7 +343,6 @@ test.describe('performance events', () => { expect(redirect3TxnEvent).toMatchObject({ transaction: '/users/[id]', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/errors.client.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/errors.client.test.ts index eecd5e00fae0..2764d5a742f9 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/errors.client.test.ts +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/errors.client.test.ts @@ -26,8 +26,6 @@ test.describe('client-side errors', () => { }), ); - expect(errorEvent.tags).toMatchObject({ runtime: 'browser' }); - expect(errorEvent.transaction).toEqual('/client-error'); }); @@ -53,7 +51,6 @@ test.describe('client-side errors', () => { }), ); - expect(errorEvent.tags).toMatchObject({ runtime: 'browser' }); expect(errorEvent.transaction).toEqual('/universal-load-error'); }); }); diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/errors.server.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/errors.server.test.ts index 64a0b2e3c855..c9dc56b9c96b 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/errors.server.test.ts +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/errors.server.test.ts @@ -18,8 +18,6 @@ test.describe('server-side errors', () => { in_app: true, }), ); - - expect(errorEvent.tags).toMatchObject({ runtime: 'node' }); }); test('captures server load error', async ({ page }) => { @@ -38,8 +36,6 @@ test.describe('server-side errors', () => { in_app: true, }), ); - - expect(errorEvent.tags).toMatchObject({ runtime: 'node' }); }); test('captures server route (GET) error', async ({ page }) => { diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/performance.server.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/performance.server.test.ts index 6f11fd17cd5b..4cc3fb5cef9e 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/performance.server.test.ts +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/performance.server.test.ts @@ -13,7 +13,6 @@ test('server pageload request span has nested request span for sub request', asy expect(serverTxnEvent).toMatchObject({ transaction: 'GET /server-load-fetch', - tags: { runtime: 'node' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { diff --git a/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/performance.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/performance.test.ts index ddaac44096f5..24f2cd256a63 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/performance.test.ts +++ b/dev-packages/e2e-tests/test-applications/sveltekit-2/tests/performance.test.ts @@ -21,7 +21,6 @@ test.describe('performance events', () => { expect(clientTxnEvent).toMatchObject({ transaction: '/users/[id]', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -34,7 +33,6 @@ test.describe('performance events', () => { expect(serverTxnEvent).toMatchObject({ transaction: 'GET /users/[id]', - tags: { runtime: 'node' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -77,7 +75,6 @@ test.describe('performance events', () => { expect(clientTxnEvent).toMatchObject({ transaction: '/users', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -90,7 +87,6 @@ test.describe('performance events', () => { expect(serverTxnEvent).toMatchObject({ transaction: 'GET /users', - tags: { runtime: 'node' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -130,7 +126,6 @@ test.describe('performance events', () => { expect(clientTxnEvent).toMatchObject({ transaction: '/universal-load-fetch', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -143,7 +138,6 @@ test.describe('performance events', () => { expect(serverTxnEvent).toMatchObject({ transaction: 'GET /api/users', - tags: { runtime: 'node' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -186,11 +180,11 @@ test.describe('performance events', () => { test('captures a navigation transaction directly after pageload', async ({ page }) => { const clientPageloadTxnPromise = waitForTransaction('sveltekit-2', txnEvent => { - return txnEvent?.contexts?.trace?.op === 'pageload' && txnEvent?.tags?.runtime === 'browser'; + return txnEvent?.contexts?.trace?.op === 'pageload'; }); const clientNavigationTxnPromise = waitForTransaction('sveltekit-2', txnEvent => { - return txnEvent?.contexts?.trace?.op === 'navigation' && txnEvent?.tags?.runtime === 'browser'; + return txnEvent?.contexts?.trace?.op === 'navigation'; }); await waitForInitialPageload(page, { route: '/' }); @@ -205,7 +199,6 @@ test.describe('performance events', () => { expect(pageloadTxnEvent).toMatchObject({ transaction: '/', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -218,7 +211,6 @@ test.describe('performance events', () => { expect(navigationTxnEvent).toMatchObject({ transaction: '/users/[id]', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -253,27 +245,15 @@ test.describe('performance events', () => { test('captures one navigation transaction per redirect', async ({ page }) => { const clientNavigationRedirect1TxnPromise = waitForTransaction('sveltekit-2', txnEvent => { - return ( - txnEvent?.contexts?.trace?.op === 'navigation' && - txnEvent?.tags?.runtime === 'browser' && - txnEvent?.transaction === '/redirect1' - ); + return txnEvent?.contexts?.trace?.op === 'navigation' && txnEvent?.transaction === '/redirect1'; }); const clientNavigationRedirect2TxnPromise = waitForTransaction('sveltekit-2', txnEvent => { - return ( - txnEvent?.contexts?.trace?.op === 'navigation' && - txnEvent?.tags?.runtime === 'browser' && - txnEvent?.transaction === '/redirect2' - ); + return txnEvent?.contexts?.trace?.op === 'navigation' && txnEvent?.transaction === '/redirect2'; }); const clientNavigationRedirect3TxnPromise = waitForTransaction('sveltekit-2', txnEvent => { - return ( - txnEvent?.contexts?.trace?.op === 'navigation' && - txnEvent?.tags?.runtime === 'browser' && - txnEvent?.transaction === '/users/[id]' - ); + return txnEvent?.contexts?.trace?.op === 'navigation' && txnEvent?.transaction === '/users/[id]'; }); await waitForInitialPageload(page, { route: '/' }); @@ -289,7 +269,6 @@ test.describe('performance events', () => { expect(redirect1TxnEvent).toMatchObject({ transaction: '/redirect1', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -327,7 +306,6 @@ test.describe('performance events', () => { expect(redirect2TxnEvent).toMatchObject({ transaction: '/redirect2', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -365,7 +343,6 @@ test.describe('performance events', () => { expect(redirect3TxnEvent).toMatchObject({ transaction: '/users/[id]', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { diff --git a/dev-packages/e2e-tests/test-applications/sveltekit/tests/errors.client.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit/tests/errors.client.test.ts index b149496514c4..2676a690a517 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit/tests/errors.client.test.ts +++ b/dev-packages/e2e-tests/test-applications/sveltekit/tests/errors.client.test.ts @@ -25,8 +25,6 @@ test.describe('client-side errors', () => { in_app: true, }), ); - - expect(errorEvent.tags).toMatchObject({ runtime: 'browser' }); }); test('captures universal load error', async ({ page }) => { @@ -49,7 +47,5 @@ test.describe('client-side errors', () => { in_app: true, }), ); - - expect(errorEvent.tags).toMatchObject({ runtime: 'browser' }); }); }); diff --git a/dev-packages/e2e-tests/test-applications/sveltekit/tests/errors.server.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit/tests/errors.server.test.ts index 22b6bb9d340c..fbf8cf6e673a 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit/tests/errors.server.test.ts +++ b/dev-packages/e2e-tests/test-applications/sveltekit/tests/errors.server.test.ts @@ -20,8 +20,6 @@ test.describe('server-side errors', () => { }), ); - expect(errorEvent.tags).toMatchObject({ runtime: 'node' }); - expect(errorEvent.request).toEqual({ cookies: {}, headers: expect.objectContaining({ @@ -51,8 +49,6 @@ test.describe('server-side errors', () => { }), ); - expect(errorEvent.tags).toMatchObject({ runtime: 'node' }); - expect(errorEvent.request).toEqual({ cookies: {}, headers: expect.objectContaining({ diff --git a/dev-packages/e2e-tests/test-applications/sveltekit/tests/performance.server.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit/tests/performance.server.test.ts index 42ad638676f7..5c3fd61e5467 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit/tests/performance.server.test.ts +++ b/dev-packages/e2e-tests/test-applications/sveltekit/tests/performance.server.test.ts @@ -13,7 +13,6 @@ test('server pageload request span has nested request span for sub request', asy expect(serverTxnEvent).toMatchObject({ transaction: 'GET /server-load-fetch', - tags: { runtime: 'node' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { diff --git a/dev-packages/e2e-tests/test-applications/sveltekit/tests/performance.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit/tests/performance.test.ts index 42d4ef82a589..c452e1d48cb3 100644 --- a/dev-packages/e2e-tests/test-applications/sveltekit/tests/performance.test.ts +++ b/dev-packages/e2e-tests/test-applications/sveltekit/tests/performance.test.ts @@ -40,7 +40,6 @@ test('captures a distributed pageload trace', async ({ page }) => { expect(clientTxnEvent).toMatchObject({ transaction: '/users/[id]', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -53,7 +52,6 @@ test('captures a distributed pageload trace', async ({ page }) => { expect(serverTxnEvent).toMatchObject({ transaction: 'GET /users/[id]', - tags: { runtime: 'node' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -92,7 +90,6 @@ test('captures a distributed navigation trace', async ({ page }) => { expect(clientTxnEvent).toMatchObject({ transaction: '/users/[id]', - tags: { runtime: 'browser' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { @@ -105,7 +102,6 @@ test('captures a distributed navigation trace', async ({ page }) => { expect(serverTxnEvent).toMatchObject({ transaction: 'GET /users/[id]', - tags: { runtime: 'node' }, transaction_info: { source: 'route' }, type: 'transaction', contexts: { diff --git a/packages/astro/src/client/sdk.ts b/packages/astro/src/client/sdk.ts index a43c4211f047..e38a552feb39 100644 --- a/packages/astro/src/client/sdk.ts +++ b/packages/astro/src/client/sdk.ts @@ -3,7 +3,6 @@ import { browserTracingIntegration, getDefaultIntegrations as getBrowserDefaultIntegrations, init as initBrowserSdk, - setTag, } from '@sentry/browser'; import { applySdkMetadata, hasTracingEnabled } from '@sentry/core'; import type { Client, Integration } from '@sentry/types'; @@ -24,11 +23,7 @@ export function init(options: BrowserOptions): Client | undefined { applySdkMetadata(opts, 'astro', ['astro', 'browser']); - const client = initBrowserSdk(opts); - - setTag('runtime', 'browser'); - - return client; + return initBrowserSdk(opts); } function getDefaultIntegrations(options: BrowserOptions): Integration[] | undefined { diff --git a/packages/astro/src/server/sdk.ts b/packages/astro/src/server/sdk.ts index cb2cec03f982..884747dcf72a 100644 --- a/packages/astro/src/server/sdk.ts +++ b/packages/astro/src/server/sdk.ts @@ -1,6 +1,6 @@ import { applySdkMetadata } from '@sentry/core'; import type { NodeClient, NodeOptions } from '@sentry/node'; -import { init as initNodeSdk, setTag } from '@sentry/node'; +import { init as initNodeSdk } from '@sentry/node'; /** * @@ -13,9 +13,5 @@ export function init(options: NodeOptions): NodeClient | undefined { applySdkMetadata(opts, 'astro', ['astro', 'node']); - const client = initNodeSdk(opts); - - setTag('runtime', 'node'); - - return client; + return initNodeSdk(opts); } diff --git a/packages/astro/test/client/sdk.test.ts b/packages/astro/test/client/sdk.test.ts index 55381f52be17..1ef31131cb77 100644 --- a/packages/astro/test/client/sdk.test.ts +++ b/packages/astro/test/client/sdk.test.ts @@ -48,14 +48,6 @@ describe('Sentry client SDK', () => { ); }); - it('sets the runtime tag on the isolation scope', () => { - expect(getIsolationScope().getScopeData().tags).toEqual({}); - - init({ dsn: 'https://public@dsn.ingest.sentry.io/1337' }); - - expect(getIsolationScope().getScopeData().tags).toEqual({ runtime: 'browser' }); - }); - describe('automatically adds integrations', () => { it.each([ ['tracesSampleRate', { tracesSampleRate: 0 }], diff --git a/packages/astro/test/server/sdk.test.ts b/packages/astro/test/server/sdk.test.ts index b1f9c3854b77..3e571628d29f 100644 --- a/packages/astro/test/server/sdk.test.ts +++ b/packages/astro/test/server/sdk.test.ts @@ -39,14 +39,6 @@ describe('Sentry server SDK', () => { ); }); - it('sets the runtime tag on the isolation scope', () => { - expect(SentryNode.getIsolationScope().getScopeData().tags).toEqual({}); - - init({ dsn: 'https://public@dsn.ingest.sentry.io/1337' }); - - expect(SentryNode.getIsolationScope().getScopeData().tags).toEqual({ runtime: 'node' }); - }); - it('returns client from init', () => { expect(init({})).not.toBeUndefined(); }); diff --git a/packages/nextjs/src/client/index.ts b/packages/nextjs/src/client/index.ts index 49a8fefb22d9..597cc3d4cd91 100644 --- a/packages/nextjs/src/client/index.ts +++ b/packages/nextjs/src/client/index.ts @@ -1,4 +1,4 @@ -import { addEventProcessor, applySdkMetadata, hasTracingEnabled, setTag } from '@sentry/core'; +import { addEventProcessor, applySdkMetadata, hasTracingEnabled } from '@sentry/core'; import type { BrowserOptions } from '@sentry/react'; import { getDefaultIntegrations as getReactDefaultIntegrations, init as reactInit } from '@sentry/react'; import type { Client, EventProcessor, Integration } from '@sentry/types'; @@ -34,7 +34,6 @@ export function init(options: BrowserOptions): Client | undefined { const client = reactInit(opts); - setTag('runtime', 'browser'); const filterTransactions: EventProcessor = event => event.type === 'transaction' && event.transaction === '/404' ? null : event; filterTransactions.id = 'NextClient404Filter'; diff --git a/packages/nextjs/test/clientSdk.test.ts b/packages/nextjs/test/clientSdk.test.ts index 1749a3b824d4..169c7cde5bfc 100644 --- a/packages/nextjs/test/clientSdk.test.ts +++ b/packages/nextjs/test/clientSdk.test.ts @@ -73,14 +73,6 @@ describe('Client init()', () => { ); }); - it('sets runtime on scope', () => { - expect(SentryReact.getIsolationScope().getScopeData().tags).toEqual({}); - - init({ dsn: 'https://public@dsn.ingest.sentry.io/1337' }); - - expect(SentryReact.getIsolationScope().getScopeData().tags).toEqual({ runtime: 'browser' }); - }); - it('adds 404 transaction filter', () => { init({ dsn: 'https://dogsarebadatkeepingsecrets@squirrelchasers.ingest.sentry.io/12312012', diff --git a/packages/remix/src/index.client.tsx b/packages/remix/src/index.client.tsx index 711fd3c2d2fc..615287bed17b 100644 --- a/packages/remix/src/index.client.tsx +++ b/packages/remix/src/index.client.tsx @@ -1,4 +1,4 @@ -import { applySdkMetadata, setTag } from '@sentry/core'; +import { applySdkMetadata } from '@sentry/core'; import { init as reactInit } from '@sentry/react'; import type { Client } from '@sentry/types'; import { logger } from '@sentry/utils'; @@ -37,9 +37,5 @@ export function init(options: RemixOptions): Client | undefined { applySdkMetadata(opts, 'remix', ['remix', 'react']); - const client = reactInit(opts); - - setTag('runtime', 'browser'); - - return client; + return reactInit(opts); } diff --git a/packages/remix/src/index.server.ts b/packages/remix/src/index.server.ts index 978a4a5c15d9..7ab6efb15827 100644 --- a/packages/remix/src/index.server.ts +++ b/packages/remix/src/index.server.ts @@ -1,11 +1,6 @@ import { applySdkMetadata } from '@sentry/core'; import type { NodeClient, NodeOptions } from '@sentry/node'; -import { - getDefaultIntegrations as getDefaultNodeIntegrations, - init as nodeInit, - isInitialized, - setTag, -} from '@sentry/node'; +import { getDefaultIntegrations as getDefaultNodeIntegrations, init as nodeInit, isInitialized } from '@sentry/node'; import type { Integration } from '@sentry/types'; import { logger } from '@sentry/utils'; @@ -194,7 +189,5 @@ export function init(options: RemixOptions): NodeClient | undefined { instrumentServer(options); - setTag('runtime', 'node'); - return client; } diff --git a/packages/remix/test/index.client.test.ts b/packages/remix/test/index.client.test.ts index 6b04a7ccd800..365794e0f213 100644 --- a/packages/remix/test/index.client.test.ts +++ b/packages/remix/test/index.client.test.ts @@ -43,12 +43,4 @@ describe('Client init()', () => { it('returns client from init', () => { expect(init({})).not.toBeUndefined(); }); - - it('sets runtime on scope', () => { - expect(SentryReact.getIsolationScope().getScopeData().tags).toEqual({}); - - init({ dsn: 'https://public@dsn.ingest.sentry.io/1337' }); - - expect(SentryReact.getIsolationScope().getScopeData().tags).toEqual({ runtime: 'browser' }); - }); }); diff --git a/packages/remix/test/index.server.test.ts b/packages/remix/test/index.server.test.ts index 6ee76317a366..842684a4640a 100644 --- a/packages/remix/test/index.server.test.ts +++ b/packages/remix/test/index.server.test.ts @@ -48,14 +48,6 @@ describe('Server init()', () => { expect(nodeInit).toHaveBeenCalledTimes(1); }); - it('sets runtime on scope', () => { - expect(SentryNode.getIsolationScope().getScopeData().tags).toEqual({}); - - init({ dsn: 'https://public@dsn.ingest.sentry.io/1337' }); - - expect(SentryNode.getIsolationScope().getScopeData().tags).toEqual({ runtime: 'node' }); - }); - it('returns client from init', () => { expect(init({})).not.toBeUndefined(); }); diff --git a/packages/remix/test/integration/test/server/instrumentation-legacy/ssr.test.ts b/packages/remix/test/integration/test/server/instrumentation-legacy/ssr.test.ts index e67258b9e14d..9fafe0a70056 100644 --- a/packages/remix/test/integration/test/server/instrumentation-legacy/ssr.test.ts +++ b/packages/remix/test/integration/test/server/instrumentation-legacy/ssr.test.ts @@ -19,12 +19,12 @@ describe('Server Side Rendering', () => { }, }, }, - tags: useV2 - ? { - // Testing that the wrapped `handleError` correctly adds tags - 'remix-test-tag': 'remix-test-value', - } - : {}, + ...(useV2 && { + tags: { + // Testing that the wrapped `handleError` correctly adds tags + 'remix-test-tag': 'remix-test-value', + }, + }), }); assertSentryEvent(event![2]!, { diff --git a/packages/remix/test/integration/test/server/instrumentation-otel/ssr.test.ts b/packages/remix/test/integration/test/server/instrumentation-otel/ssr.test.ts index 587e57abb1c3..f3a5d7e4124f 100644 --- a/packages/remix/test/integration/test/server/instrumentation-otel/ssr.test.ts +++ b/packages/remix/test/integration/test/server/instrumentation-otel/ssr.test.ts @@ -20,12 +20,12 @@ describe('Server Side Rendering', () => { }, }, }, - tags: useV2 - ? { - // Testing that the wrapped `handleError` correctly adds tags - 'remix-test-tag': 'remix-test-value', - } - : {}, + ...(useV2 && { + tags: { + // Testing that the wrapped `handleError` correctly adds tags + 'remix-test-tag': 'remix-test-value', + }, + }), }); assertSentryEvent(event[2], { diff --git a/packages/solidstart/src/client/sdk.ts b/packages/solidstart/src/client/sdk.ts index 1b5cf2359306..f44a2134ce50 100644 --- a/packages/solidstart/src/client/sdk.ts +++ b/packages/solidstart/src/client/sdk.ts @@ -1,4 +1,4 @@ -import { applySdkMetadata, setTag } from '@sentry/core'; +import { applySdkMetadata } from '@sentry/core'; import type { BrowserOptions } from '@sentry/solid'; import { init as initSolidSDK } from '@sentry/solid'; import type { Client } from '@sentry/types'; @@ -13,9 +13,5 @@ export function init(options: BrowserOptions): Client | undefined { applySdkMetadata(opts, 'solidstart', ['solidstart', 'solid']); - const client = initSolidSDK(opts); - - setTag('runtime', 'browser'); - - return client; + return initSolidSDK(opts); } diff --git a/packages/solidstart/src/server/sdk.ts b/packages/solidstart/src/server/sdk.ts index 86287f79ea75..7329100d9de9 100644 --- a/packages/solidstart/src/server/sdk.ts +++ b/packages/solidstart/src/server/sdk.ts @@ -1,4 +1,4 @@ -import { applySdkMetadata, setTag } from '@sentry/core'; +import { applySdkMetadata } from '@sentry/core'; import type { NodeClient, NodeOptions } from '@sentry/node'; import { init as initNodeSdk } from '@sentry/node'; @@ -12,9 +12,5 @@ export function init(options: NodeOptions): NodeClient | undefined { applySdkMetadata(opts, 'solidstart', ['solidstart', 'node']); - const client = initNodeSdk(opts); - - setTag('runtime', 'node'); - - return client; + return initNodeSdk(opts); } diff --git a/packages/solidstart/test/client/sdk.test.ts b/packages/solidstart/test/client/sdk.test.ts index 76fa71ade8ec..886bb29b515d 100644 --- a/packages/solidstart/test/client/sdk.test.ts +++ b/packages/solidstart/test/client/sdk.test.ts @@ -33,10 +33,4 @@ describe('Initialize Solid Start SDK', () => { expect(browserInit).toHaveBeenCalledTimes(1); expect(browserInit).toHaveBeenLastCalledWith(expect.objectContaining(expectedMetadata)); }); - - it('sets the runtime tag on the isolation scope', () => { - solidStartInit({ dsn: 'https://public@dsn.ingest.sentry.io/1337' }); - - expect(SentrySolid.getIsolationScope().getScopeData().tags).toEqual({ runtime: 'browser' }); - }); }); diff --git a/packages/solidstart/test/server/sdk.test.ts b/packages/solidstart/test/server/sdk.test.ts index ac610ad6dcd4..e658876c0a12 100644 --- a/packages/solidstart/test/server/sdk.test.ts +++ b/packages/solidstart/test/server/sdk.test.ts @@ -33,10 +33,4 @@ describe('Initialize Solid Start SDK', () => { expect(browserInit).toHaveBeenCalledTimes(1); expect(browserInit).toHaveBeenLastCalledWith(expect.objectContaining(expectedMetadata)); }); - - it('sets the runtime tag on the isolation scope', () => { - solidStartInit({ dsn: 'https://public@dsn.ingest.sentry.io/1337' }); - - expect(SentryNode.getIsolationScope().getScopeData().tags).toEqual({ runtime: 'node' }); - }); }); diff --git a/packages/sveltekit/src/client/sdk.ts b/packages/sveltekit/src/client/sdk.ts index 65c7ffb8deab..98fd328c7abe 100644 --- a/packages/sveltekit/src/client/sdk.ts +++ b/packages/sveltekit/src/client/sdk.ts @@ -1,4 +1,4 @@ -import { applySdkMetadata, hasTracingEnabled, setTag } from '@sentry/core'; +import { applySdkMetadata, hasTracingEnabled } from '@sentry/core'; import type { BrowserOptions } from '@sentry/svelte'; import { getDefaultIntegrations as getDefaultSvelteIntegrations } from '@sentry/svelte'; import { WINDOW, init as initSvelteSdk } from '@sentry/svelte'; @@ -37,8 +37,6 @@ export function init(options: BrowserOptions): Client | undefined { restoreFetch(actualFetch); } - setTag('runtime', 'browser'); - return client; } diff --git a/packages/sveltekit/src/server/sdk.ts b/packages/sveltekit/src/server/sdk.ts index 889a60c14e57..7f3acbf57fbd 100644 --- a/packages/sveltekit/src/server/sdk.ts +++ b/packages/sveltekit/src/server/sdk.ts @@ -1,4 +1,4 @@ -import { applySdkMetadata, setTag } from '@sentry/core'; +import { applySdkMetadata } from '@sentry/core'; import type { NodeClient, NodeOptions } from '@sentry/node'; import { getDefaultIntegrations as getDefaultNodeIntegrations } from '@sentry/node'; import { init as initNodeSdk } from '@sentry/node'; @@ -17,9 +17,5 @@ export function init(options: NodeOptions): NodeClient | undefined { applySdkMetadata(opts, 'sveltekit', ['sveltekit', 'node']); - const client = initNodeSdk(opts); - - setTag('runtime', 'node'); - - return client; + return initNodeSdk(opts); } diff --git a/packages/sveltekit/test/client/sdk.test.ts b/packages/sveltekit/test/client/sdk.test.ts index 46cab7400d12..cdecffbea3a5 100644 --- a/packages/sveltekit/test/client/sdk.test.ts +++ b/packages/sveltekit/test/client/sdk.test.ts @@ -41,14 +41,6 @@ describe('Sentry client SDK', () => { ); }); - it('sets the runtime tag on the isolation scope', () => { - expect(getIsolationScope().getScopeData().tags).toEqual({}); - - init({ dsn: 'https://public@dsn.ingest.sentry.io/1337' }); - - expect(getIsolationScope().getScopeData().tags).toEqual({ runtime: 'browser' }); - }); - describe('automatically added integrations', () => { it.each([ ['tracesSampleRate', { tracesSampleRate: 0 }], diff --git a/packages/sveltekit/test/server/sdk.test.ts b/packages/sveltekit/test/server/sdk.test.ts index aa7dbc560e1a..4c6c9917c572 100644 --- a/packages/sveltekit/test/server/sdk.test.ts +++ b/packages/sveltekit/test/server/sdk.test.ts @@ -41,14 +41,6 @@ describe('Sentry server SDK', () => { ); }); - it('sets the runtime tag on the isolation scope', () => { - expect(SentryNode.getIsolationScope().getScopeData().tags).toEqual({}); - - init({ dsn: 'https://public@dsn.ingest.sentry.io/1337' }); - - expect(SentryNode.getIsolationScope().getScopeData().tags).toEqual({ runtime: 'node' }); - }); - it('adds rewriteFramesIntegration by default', () => { init({ dsn: 'https://public@dsn.ingest.sentry.io/1337',