From cbdba100bda765f5698eff332f62b1c5575a7f6c Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 22 Dec 2023 13:21:25 +0100 Subject: [PATCH 01/51] feat(integrations): Capture error cause with `captureErrorCause` in `ExtraErrorData` integration (#9914) Co-authored-by: Lukas Stracke --- packages/integrations/src/extraerrordata.ts | 32 ++++++++++-- .../integrations/test/extraerrordata.test.ts | 50 +++++++++++++++++++ 2 files changed, 78 insertions(+), 4 deletions(-) diff --git a/packages/integrations/src/extraerrordata.ts b/packages/integrations/src/extraerrordata.ts index 9d8a00f976cf..8d9d72cb81d7 100644 --- a/packages/integrations/src/extraerrordata.ts +++ b/packages/integrations/src/extraerrordata.ts @@ -7,16 +7,29 @@ import { DEBUG_BUILD } from './debug-build'; const INTEGRATION_NAME = 'ExtraErrorData'; interface ExtraErrorDataOptions { + /** + * The object depth up to which to capture data on error objects. + */ depth: number; + + /** + * Whether to capture error causes. + * + * More information: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + */ + captureErrorCause: boolean; } const extraErrorDataIntegration = ((options: Partial = {}) => { const depth = options.depth || 3; + // TODO(v8): Flip the default for this option to true + const captureErrorCause = options.captureErrorCause || false; + return { name: INTEGRATION_NAME, processEvent(event, hint) { - return _enhanceEventWithErrorData(event, hint, depth); + return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause); }, }; }) satisfies IntegrationFn; @@ -25,13 +38,18 @@ const extraErrorDataIntegration = ((options: Partial = {} // eslint-disable-next-line deprecation/deprecation export const ExtraErrorData = convertIntegrationFnToClass(INTEGRATION_NAME, extraErrorDataIntegration); -function _enhanceEventWithErrorData(event: Event, hint: EventHint = {}, depth: number): Event { +function _enhanceEventWithErrorData( + event: Event, + hint: EventHint = {}, + depth: number, + captureErrorCause: boolean, +): Event { if (!hint.originalException || !isError(hint.originalException)) { return event; } const exceptionName = (hint.originalException as ExtendedError).name || hint.originalException.constructor.name; - const errorData = _extractErrorData(hint.originalException as ExtendedError); + const errorData = _extractErrorData(hint.originalException as ExtendedError, captureErrorCause); if (errorData) { const contexts: Contexts = { @@ -59,7 +77,7 @@ function _enhanceEventWithErrorData(event: Event, hint: EventHint = {}, depth: n /** * Extract extra information from the Error object */ -function _extractErrorData(error: ExtendedError): Record | null { +function _extractErrorData(error: ExtendedError, captureErrorCause: boolean): Record | null { // We are trying to enhance already existing event, so no harm done if it won't succeed try { const nativeKeys = [ @@ -85,6 +103,12 @@ function _extractErrorData(error: ExtendedError): Record | null extraErrorInfo[key] = isError(value) ? value.toString() : value; } + // Error.cause is a standard property that is non enumerable, we therefore need to access it separately. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause + if (captureErrorCause && error.cause !== undefined) { + extraErrorInfo.cause = isError(error.cause) ? error.cause.toString() : error.cause; + } + // Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that) if (typeof error.toJSON === 'function') { const serializedError = error.toJSON() as Record; diff --git a/packages/integrations/test/extraerrordata.test.ts b/packages/integrations/test/extraerrordata.test.ts index 166c8e66fe37..d72a43c57f8b 100644 --- a/packages/integrations/test/extraerrordata.test.ts +++ b/packages/integrations/test/extraerrordata.test.ts @@ -178,4 +178,54 @@ describe('ExtraErrorData()', () => { }, }); }); + + it('captures Error causes when captureErrorCause = true', () => { + // Error.cause is only available from node 16 upwards + const nodeMajorVersion = parseInt(process.versions.node.split('.')[0]); + if (nodeMajorVersion < 16) { + return; + } + + const extraErrorDataWithCauseCapture = new ExtraErrorData({ captureErrorCause: true }); + + // @ts-expect-error The typing .d.ts library we have installed isn't aware of Error.cause yet + const error = new Error('foo', { cause: { woot: 'foo' } }) as ExtendedError; + + const enhancedEvent = extraErrorDataWithCauseCapture.processEvent(event, { + originalException: error, + }); + + expect(enhancedEvent.contexts).toEqual({ + Error: { + cause: { + woot: 'foo', + }, + }, + }); + }); + + it("doesn't capture Error causes when captureErrorCause != true", () => { + // Error.cause is only available from node 16 upwards + const nodeMajorVersion = parseInt(process.versions.node.split('.')[0]); + if (nodeMajorVersion < 16) { + return; + } + + const extraErrorDataWithoutCauseCapture = new ExtraErrorData(); + + // @ts-expect-error The typing .d.ts library we have installed isn't aware of Error.cause yet + const error = new Error('foo', { cause: { woot: 'foo' } }) as ExtendedError; + + const enhancedEvent = extraErrorDataWithoutCauseCapture.processEvent(event, { + originalException: error, + }); + + expect(enhancedEvent.contexts).not.toEqual({ + Error: { + cause: { + woot: 'foo', + }, + }, + }); + }); }); From 0425a71ab69f9a329ac5766f6fdcbf5ea62b9ddb Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Fri, 22 Dec 2023 15:24:23 +0100 Subject: [PATCH 02/51] fix(node): Make `NODE_VERSION` properties required (#9964) These types have been annoying me for a while. We can safely assume the node version can be parsed. --- packages/node/src/async/index.ts | 2 +- packages/node/src/integrations/anr/index.ts | 2 +- packages/node/src/integrations/http.ts | 2 +- packages/node/src/integrations/localvariables.ts | 2 +- packages/node/src/integrations/undici/index.ts | 2 +- packages/node/src/integrations/utils/http.ts | 2 +- packages/node/src/nodeVersion.ts | 2 +- packages/node/test/integrations/http.test.ts | 4 ++-- packages/node/test/integrations/localvariables.test.ts | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/node/src/async/index.ts b/packages/node/src/async/index.ts index c8bb8e2ebb9f..a9563e4f0ce6 100644 --- a/packages/node/src/async/index.ts +++ b/packages/node/src/async/index.ts @@ -9,7 +9,7 @@ import { setHooksAsyncContextStrategy } from './hooks'; * Node.js < 14 uses domains */ export function setNodeAsyncContextStrategy(): void { - if (NODE_VERSION.major && NODE_VERSION.major >= 14) { + if (NODE_VERSION.major >= 14) { setHooksAsyncContextStrategy(); } else { setDomainAsyncContextStrategy(); diff --git a/packages/node/src/integrations/anr/index.ts b/packages/node/src/integrations/anr/index.ts index 4a623fb3ff0b..cf1f1cd6cab7 100644 --- a/packages/node/src/integrations/anr/index.ts +++ b/packages/node/src/integrations/anr/index.ts @@ -65,7 +65,7 @@ export class Anr implements Integration { /** @inheritdoc */ public setup(client: NodeClient): void { - if ((NODE_VERSION.major || 0) < 16) { + if (NODE_VERSION.major < 16) { throw new Error('ANR detection requires Node 16 or later'); } diff --git a/packages/node/src/integrations/http.ts b/packages/node/src/integrations/http.ts index 5d6b8857f93b..f0734142a3e1 100644 --- a/packages/node/src/integrations/http.ts +++ b/packages/node/src/integrations/http.ts @@ -132,7 +132,7 @@ export class Http implements Integration { // NOTE: Prior to Node 9, `https` used internals of `http` module, thus we don't patch it. // If we do, we'd get double breadcrumbs and double spans for `https` calls. // It has been changed in Node 9, so for all versions equal and above, we patch `https` separately. - if (NODE_VERSION.major && NODE_VERSION.major > 8) { + if (NODE_VERSION.major > 8) { // eslint-disable-next-line @typescript-eslint/no-var-requires const httpsModule = require('https'); const wrappedHttpsHandlerMaker = _createWrappedRequestMethodFactory( diff --git a/packages/node/src/integrations/localvariables.ts b/packages/node/src/integrations/localvariables.ts index 1ba9907c4806..f1a410501b4e 100644 --- a/packages/node/src/integrations/localvariables.ts +++ b/packages/node/src/integrations/localvariables.ts @@ -353,7 +353,7 @@ export class LocalVariables implements Integration { if (this._session && clientOptions.includeLocalVariables) { // Only setup this integration if the Node version is >= v18 // https://github.com/getsentry/sentry-javascript/issues/7697 - const unsupportedNodeVersion = (NODE_VERSION.major || 0) < 18; + const unsupportedNodeVersion = NODE_VERSION.major < 18; if (unsupportedNodeVersion) { logger.log('The `LocalVariables` integration is only supported on Node >= v18.'); diff --git a/packages/node/src/integrations/undici/index.ts b/packages/node/src/integrations/undici/index.ts index 4f67993f7321..d7111a6076de 100644 --- a/packages/node/src/integrations/undici/index.ts +++ b/packages/node/src/integrations/undici/index.ts @@ -96,7 +96,7 @@ export class Undici implements Integration { */ public setupOnce(_addGlobalEventProcessor: (callback: EventProcessor) => void): void { // Requires Node 16+ to use the diagnostics_channel API. - if (NODE_VERSION.major && NODE_VERSION.major < 16) { + if (NODE_VERSION.major < 16) { return; } diff --git a/packages/node/src/integrations/utils/http.ts b/packages/node/src/integrations/utils/http.ts index fc2e6a1e88bd..76a826801814 100644 --- a/packages/node/src/integrations/utils/http.ts +++ b/packages/node/src/integrations/utils/http.ts @@ -183,7 +183,7 @@ export function normalizeRequestArgs( // as it will always return `http`, even when using `https` module. // // See test/integrations/http.test.ts for more details on Node <=v8 protocol issue. - if (NODE_VERSION.major && NODE_VERSION.major > 8) { + if (NODE_VERSION.major > 8) { requestOptions.protocol = (httpModule?.globalAgent as any)?.protocol || (requestOptions.agent as any)?.protocol || diff --git a/packages/node/src/nodeVersion.ts b/packages/node/src/nodeVersion.ts index e67fa3f1b2b9..1574237f3fb4 100644 --- a/packages/node/src/nodeVersion.ts +++ b/packages/node/src/nodeVersion.ts @@ -1,3 +1,3 @@ import { parseSemver } from '@sentry/utils'; -export const NODE_VERSION: ReturnType = parseSemver(process.versions.node); +export const NODE_VERSION = parseSemver(process.versions.node) as { major: number; minor: number; patch: number }; diff --git a/packages/node/test/integrations/http.test.ts b/packages/node/test/integrations/http.test.ts index 2055aefeca39..42eb9391ec52 100644 --- a/packages/node/test/integrations/http.test.ts +++ b/packages/node/test/integrations/http.test.ts @@ -648,7 +648,7 @@ describe('default protocols', () => { // intercepting a https:// request with http:// mock. It's a safe bet // because the latest versions of nock no longer support Node v8 and lower, // so won't bother dealing with this old Node edge case. - if (NODE_VERSION.major && NODE_VERSION.major < 9) { + if (NODE_VERSION.major < 9) { nockProtocol = 'http'; } nock(`${nockProtocol}://${key}.ingest.sentry.io`).get('/api/123122332/store/').reply(200); @@ -671,7 +671,7 @@ describe('default protocols', () => { const proxy = 'http://:3128'; const agent = HttpsProxyAgent(proxy); - if (NODE_VERSION.major && NODE_VERSION.major < 9) { + if (NODE_VERSION.major < 9) { nockProtocol = 'http'; } diff --git a/packages/node/test/integrations/localvariables.test.ts b/packages/node/test/integrations/localvariables.test.ts index 027ccc391c6d..b5fcc051c411 100644 --- a/packages/node/test/integrations/localvariables.test.ts +++ b/packages/node/test/integrations/localvariables.test.ts @@ -150,7 +150,7 @@ const exceptionEvent100Frames = { }, }; -describeIf((NODE_VERSION.major || 0) >= 18)('LocalVariables', () => { +describeIf(NODE_VERSION.major >= 18)('LocalVariables', () => { it('Adds local variables to stack frames', async () => { const session = new MockDebugSession({ '-6224981551105448869.1.2': { name: 'tim' }, From 2c0b6d3d180c7315bd0e7c5b96f046fbdd4d2ba1 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Fri, 22 Dec 2023 15:30:05 +0100 Subject: [PATCH 03/51] fix(core): Ensure `withScope` sets current scope correctly with async callbacks (#9974) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Oops, I noticed that our current `withScope` implementation does not actually wait for async callbacks for setting the current scope 😬 Related to https://github.com/getsentry/sentry-javascript/pull/9958, which I copied there now! --- packages/core/src/hub.ts | 37 ++++++++++++- packages/core/test/lib/exports.test.ts | 76 +++++++++++++++++++++++++- 2 files changed, 109 insertions(+), 4 deletions(-) diff --git a/packages/core/src/hub.ts b/packages/core/src/hub.ts index 29e9d5af3956..53c74d348537 100644 --- a/packages/core/src/hub.ts +++ b/packages/core/src/hub.ts @@ -20,7 +20,15 @@ import type { TransactionContext, User, } from '@sentry/types'; -import { GLOBAL_OBJ, consoleSandbox, dateTimestampInSeconds, getGlobalSingleton, logger, uuid4 } from '@sentry/utils'; +import { + GLOBAL_OBJ, + consoleSandbox, + dateTimestampInSeconds, + getGlobalSingleton, + isThenable, + logger, + uuid4, +} from '@sentry/utils'; import { DEFAULT_ENVIRONMENT } from './constants'; import { DEBUG_BUILD } from './debug-build'; @@ -177,12 +185,35 @@ export class Hub implements HubInterface { public withScope(callback: (scope: Scope) => T): T { // eslint-disable-next-line deprecation/deprecation const scope = this.pushScope(); + + let maybePromiseResult: T; try { - return callback(scope); - } finally { + maybePromiseResult = callback(scope); + } catch (e) { // eslint-disable-next-line deprecation/deprecation this.popScope(); + throw e; } + + if (isThenable(maybePromiseResult)) { + // @ts-expect-error - isThenable returns the wrong type + return maybePromiseResult.then( + res => { + // eslint-disable-next-line deprecation/deprecation + this.popScope(); + return res; + }, + e => { + // eslint-disable-next-line deprecation/deprecation + this.popScope(); + throw e; + }, + ); + } + + // eslint-disable-next-line deprecation/deprecation + this.popScope(); + return maybePromiseResult; } /** diff --git a/packages/core/test/lib/exports.test.ts b/packages/core/test/lib/exports.test.ts index 89b4fd9105d5..de048c209530 100644 --- a/packages/core/test/lib/exports.test.ts +++ b/packages/core/test/lib/exports.test.ts @@ -42,7 +42,7 @@ describe('withScope', () => { expect(res).toBe('foo'); }); - it('works with an async function', async () => { + it('works with an async function return value', async () => { const res = withScope(async scope => { return 'foo'; }); @@ -50,4 +50,78 @@ describe('withScope', () => { expect(res).toBeInstanceOf(Promise); expect(await res).toBe('foo'); }); + + it('correctly sets & resets the current scope', () => { + const scope1 = getCurrentScope(); + + withScope(scope2 => { + expect(scope2).not.toBe(scope1); + expect(getCurrentScope()).toBe(scope2); + }); + + withScope(scope3 => { + expect(scope3).not.toBe(scope1); + expect(getCurrentScope()).toBe(scope3); + }); + + expect(getCurrentScope()).toBe(scope1); + }); + + it('correctly sets & resets the current scope with async functions', async () => { + const scope1 = getCurrentScope(); + + await withScope(async scope2 => { + expect(scope2).not.toBe(scope1); + expect(getCurrentScope()).toBe(scope2); + + await new Promise(resolve => setTimeout(resolve, 10)); + + expect(getCurrentScope()).toBe(scope2); + }); + + await withScope(async scope3 => { + expect(scope3).not.toBe(scope1); + expect(getCurrentScope()).toBe(scope3); + + await new Promise(resolve => setTimeout(resolve, 10)); + + expect(getCurrentScope()).toBe(scope3); + }); + + expect(getCurrentScope()).toBe(scope1); + }); + + it('correctly sets & resets the current scope when an error happens', () => { + const scope1 = getCurrentScope(); + + const error = new Error('foo'); + + expect(() => + withScope(scope2 => { + expect(scope2).not.toBe(scope1); + expect(getCurrentScope()).toBe(scope2); + + throw error; + }), + ).toThrow(error); + + expect(getCurrentScope()).toBe(scope1); + }); + + it('correctly sets & resets the current scope with async functions & errors', async () => { + const scope1 = getCurrentScope(); + + const error = new Error('foo'); + + await expect( + withScope(async scope2 => { + expect(scope2).not.toBe(scope1); + expect(getCurrentScope()).toBe(scope2); + + throw error; + }), + ).rejects.toBe(error); + + expect(getCurrentScope()).toBe(scope1); + }); }); From eadfd615f2461e395d3992b7345413e7420190e0 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Fri, 22 Dec 2023 15:36:12 +0100 Subject: [PATCH 04/51] ref(serverless): Use `startSpanManual()` instead of `startTransaction()` (#9970) Also refactor it to use `continueTrace`. Note that this already uses the "new" way of `startSpanManual` which ignores the `finish` function. --------- Co-authored-by: Lukas Stracke --- packages/serverless/src/awslambda.ts | 107 ++++++----- .../src/gcpfunction/cloud_events.ts | 101 +++++------ packages/serverless/src/gcpfunction/events.ts | 104 ++++++----- packages/serverless/src/gcpfunction/http.ts | 134 +++++++------- .../serverless/test/__mocks__/@sentry/node.ts | 23 +-- packages/serverless/test/awslambda.test.ts | 64 +++---- packages/serverless/test/gcpfunction.test.ts | 168 +++--------------- 7 files changed, 287 insertions(+), 414 deletions(-) diff --git a/packages/serverless/src/awslambda.ts b/packages/serverless/src/awslambda.ts index 9094709082dc..d9cbe177efc8 100644 --- a/packages/serverless/src/awslambda.ts +++ b/packages/serverless/src/awslambda.ts @@ -3,11 +3,21 @@ import { hostname } from 'os'; import { basename, resolve } from 'path'; import { types } from 'util'; /* eslint-disable max-lines */ -import type { Scope } from '@sentry/node'; -import * as Sentry from '@sentry/node'; -import { captureException, captureMessage, flush, getCurrentHub, withScope } from '@sentry/node'; -import type { Integration, SdkMetadata } from '@sentry/types'; -import { isString, logger, tracingContextFromHeaders } from '@sentry/utils'; +import type { NodeOptions, Scope } from '@sentry/node'; +import { SDK_VERSION } from '@sentry/node'; +import { + captureException, + captureMessage, + continueTrace, + defaultIntegrations as nodeDefaultIntegrations, + flush, + getCurrentScope, + init as initNode, + startSpanManual, + withScope, +} from '@sentry/node'; +import type { Integration, SdkMetadata, Span } from '@sentry/types'; +import { isString, logger } from '@sentry/utils'; // NOTE: I have no idea how to fix this right now, and don't want to waste more time, as it builds just fine — Kamil import type { Context, Handler } from 'aws-lambda'; import { performance } from 'perf_hooks'; @@ -55,9 +65,9 @@ export interface WrapperOptions { startTrace: boolean; } -export const defaultIntegrations: Integration[] = [...Sentry.defaultIntegrations, new AWSServices({ optional: true })]; +export const defaultIntegrations: Integration[] = [...nodeDefaultIntegrations, new AWSServices({ optional: true })]; -interface AWSLambdaOptions extends Sentry.NodeOptions { +interface AWSLambdaOptions extends NodeOptions { /** * Internal field that is set to `true` when init() is called by the Sentry AWS Lambda layer. * @@ -66,7 +76,9 @@ interface AWSLambdaOptions extends Sentry.NodeOptions { } /** - * @see {@link Sentry.init} + * Initializes the Sentry AWS Lambda SDK. + * + * @param options Configuration options for the SDK, @see {@link AWSLambdaOptions}. */ export function init(options: AWSLambdaOptions = {}): void { const opts = { @@ -81,13 +93,13 @@ export function init(options: AWSLambdaOptions = {}): void { packages: [ { name: 'npm:@sentry/serverless', - version: Sentry.SDK_VERSION, + version: SDK_VERSION, }, ], - version: Sentry.SDK_VERSION, + version: SDK_VERSION, }; - Sentry.init(opts); + initNode(opts); } /** */ @@ -290,44 +302,13 @@ export function wrapHandler( }, timeoutWarningDelay) as unknown as NodeJS.Timeout; } - const hub = getCurrentHub(); - - let transaction: Sentry.Transaction | undefined; - if (options.startTrace) { - const eventWithHeaders = event as { headers?: { [key: string]: string } }; - - const sentryTrace = - eventWithHeaders.headers && isString(eventWithHeaders.headers['sentry-trace']) - ? eventWithHeaders.headers['sentry-trace'] - : undefined; - const baggage = eventWithHeaders.headers?.baggage; - const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders( - sentryTrace, - baggage, - ); - Sentry.getCurrentScope().setPropagationContext(propagationContext); - - transaction = hub.startTransaction({ - name: context.functionName, - op: 'function.aws.lambda', - origin: 'auto.function.serverless', - ...traceparentData, - metadata: { - dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext, - source: 'component', - }, - }); - } + async function processResult(span?: Span): Promise { + const scope = getCurrentScope(); - return withScope(async scope => { let rv: TResult; try { enhanceScopeWithEnvironmentData(scope, context, START_TIME); - if (options.startTrace) { - enhanceScopeWithTransactionData(scope, context); - // We put the transaction on the scope so users can attach children to it - scope.setSpan(transaction); - } + rv = await asyncHandler(event, context); // We manage lambdas that use Promise.allSettled by capturing the errors of failed promises @@ -342,12 +323,46 @@ export function wrapHandler( throw e; } finally { clearTimeout(timeoutWarningTimer); - transaction?.end(); + span?.end(); await flush(options.flushTimeout).catch(e => { DEBUG_BUILD && logger.error(e); }); } return rv; + } + + if (options.startTrace) { + const eventWithHeaders = event as { headers?: { [key: string]: string } }; + + const sentryTrace = + eventWithHeaders.headers && isString(eventWithHeaders.headers['sentry-trace']) + ? eventWithHeaders.headers['sentry-trace'] + : undefined; + const baggage = eventWithHeaders.headers?.baggage; + + const continueTraceContext = continueTrace({ sentryTrace, baggage }); + + return startSpanManual( + { + name: context.functionName, + op: 'function.aws.lambda', + origin: 'auto.function.serverless', + ...continueTraceContext, + metadata: { + ...continueTraceContext.metadata, + source: 'component', + }, + }, + span => { + enhanceScopeWithTransactionData(getCurrentScope(), context); + + return processResult(span); + }, + ); + } + + return withScope(async () => { + return processResult(undefined); }); }; } diff --git a/packages/serverless/src/gcpfunction/cloud_events.ts b/packages/serverless/src/gcpfunction/cloud_events.ts index 547cf93b3a5f..233d6c9a79f8 100644 --- a/packages/serverless/src/gcpfunction/cloud_events.ts +++ b/packages/serverless/src/gcpfunction/cloud_events.ts @@ -1,4 +1,4 @@ -import { captureException, flush, getCurrentHub, getCurrentScope } from '@sentry/node'; +import { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node'; import { isThenable, logger } from '@sentry/utils'; import { DEBUG_BUILD } from '../debug-build'; @@ -21,7 +21,6 @@ export function wrapCloudEventFunction( return proxyFunction(fn, f => domainify(_wrapCloudEventFunction(f, wrapOptions))); } -/** */ function _wrapCloudEventFunction( fn: CloudEventFunction | CloudEventFunctionWithCallback, wrapOptions: Partial = {}, @@ -31,63 +30,59 @@ function _wrapCloudEventFunction( ...wrapOptions, }; return (context, callback) => { - const hub = getCurrentHub(); + return startSpanManual( + { + name: context.type || '', + op: 'function.gcp.cloud_event', + origin: 'auto.function.serverless.gcp_cloud_event', + metadata: { source: 'component' }, + }, + span => { + const scope = getCurrentScope(); + scope.setContext('gcp.function.context', { ...context }); - const transaction = hub.startTransaction({ - name: context.type || '', - op: 'function.gcp.cloud_event', - origin: 'auto.function.serverless.gcp_cloud_event', - metadata: { source: 'component' }, - }) as ReturnType | undefined; + const newCallback = domainify((...args: unknown[]) => { + if (args[0] !== null && args[0] !== undefined) { + captureException(args[0], scope => markEventUnhandled(scope)); + } + span?.end(); - // getCurrentHub() is expected to use current active domain as a carrier - // since functions-framework creates a domain for each incoming request. - // So adding of event processors every time should not lead to memory bloat. - const scope = getCurrentScope(); - scope.setContext('gcp.function.context', { ...context }); - // We put the transaction on the scope so users can attach children to it - scope.setSpan(transaction); - - const newCallback = domainify((...args: unknown[]) => { - if (args[0] !== null && args[0] !== undefined) { - captureException(args[0], scope => markEventUnhandled(scope)); - } - transaction?.end(); - - // eslint-disable-next-line @typescript-eslint/no-floating-promises - flush(options.flushTimeout) - .then(null, e => { - DEBUG_BUILD && logger.error(e); - }) - .then(() => { - callback(...args); + // eslint-disable-next-line @typescript-eslint/no-floating-promises + flush(options.flushTimeout) + .then(null, e => { + DEBUG_BUILD && logger.error(e); + }) + .then(() => { + callback(...args); + }); }); - }); - if (fn.length > 1) { - let fnResult; - try { - fnResult = (fn as CloudEventFunctionWithCallback)(context, newCallback); - } catch (err) { - captureException(err, scope => markEventUnhandled(scope)); - throw err; - } + if (fn.length > 1) { + let fnResult; + try { + fnResult = (fn as CloudEventFunctionWithCallback)(context, newCallback); + } catch (err) { + captureException(err, scope => markEventUnhandled(scope)); + throw err; + } - if (isThenable(fnResult)) { - fnResult.then(null, err => { - captureException(err, scope => markEventUnhandled(scope)); - throw err; - }); - } + if (isThenable(fnResult)) { + fnResult.then(null, err => { + captureException(err, scope => markEventUnhandled(scope)); + throw err; + }); + } - return fnResult; - } + return fnResult; + } - return Promise.resolve() - .then(() => (fn as CloudEventFunction)(context)) - .then( - result => newCallback(null, result), - err => newCallback(err, undefined), - ); + return Promise.resolve() + .then(() => (fn as CloudEventFunction)(context)) + .then( + result => newCallback(null, result), + err => newCallback(err, undefined), + ); + }, + ); }; } diff --git a/packages/serverless/src/gcpfunction/events.ts b/packages/serverless/src/gcpfunction/events.ts index e3f6b30a4525..a3d1af662d3c 100644 --- a/packages/serverless/src/gcpfunction/events.ts +++ b/packages/serverless/src/gcpfunction/events.ts @@ -1,4 +1,4 @@ -import { captureException, flush, getCurrentHub, getCurrentScope } from '@sentry/node'; +import { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node'; import { isThenable, logger } from '@sentry/utils'; import { DEBUG_BUILD } from '../debug-build'; @@ -33,65 +33,61 @@ function _wrapEventFunction return (...eventFunctionArguments: Parameters): ReturnType | Promise => { const [data, context, callback] = eventFunctionArguments; - const hub = getCurrentHub(); + return startSpanManual( + { + name: context.eventType, + op: 'function.gcp.event', + origin: 'auto.function.serverless.gcp_event', + metadata: { source: 'component' }, + }, + span => { + const scope = getCurrentScope(); + scope.setContext('gcp.function.context', { ...context }); - const transaction = hub.startTransaction({ - name: context.eventType, - op: 'function.gcp.event', - origin: 'auto.function.serverless.gcp_event', - metadata: { source: 'component' }, - }) as ReturnType | undefined; - - // getCurrentHub() is expected to use current active domain as a carrier - // since functions-framework creates a domain for each incoming request. - // So adding of event processors every time should not lead to memory bloat. - const scope = getCurrentScope(); - scope.setContext('gcp.function.context', { ...context }); - // We put the transaction on the scope so users can attach children to it - scope.setSpan(transaction); - - const newCallback = domainify((...args: unknown[]) => { - if (args[0] !== null && args[0] !== undefined) { - captureException(args[0], scope => markEventUnhandled(scope)); - } - transaction?.end(); - - // eslint-disable-next-line @typescript-eslint/no-floating-promises - flush(options.flushTimeout) - .then(null, e => { - DEBUG_BUILD && logger.error(e); - }) - .then(() => { - if (typeof callback === 'function') { - callback(...args); + const newCallback = domainify((...args: unknown[]) => { + if (args[0] !== null && args[0] !== undefined) { + captureException(args[0], scope => markEventUnhandled(scope)); } + span?.end(); + + // eslint-disable-next-line @typescript-eslint/no-floating-promises + flush(options.flushTimeout) + .then(null, e => { + DEBUG_BUILD && logger.error(e); + }) + .then(() => { + if (typeof callback === 'function') { + callback(...args); + } + }); }); - }); - if (fn.length > 2) { - let fnResult; - try { - fnResult = (fn as EventFunctionWithCallback)(data, context, newCallback); - } catch (err) { - captureException(err, scope => markEventUnhandled(scope)); - throw err; - } + if (fn.length > 2) { + let fnResult; + try { + fnResult = (fn as EventFunctionWithCallback)(data, context, newCallback); + } catch (err) { + captureException(err, scope => markEventUnhandled(scope)); + throw err; + } - if (isThenable(fnResult)) { - fnResult.then(null, err => { - captureException(err, scope => markEventUnhandled(scope)); - throw err; - }); - } + if (isThenable(fnResult)) { + fnResult.then(null, err => { + captureException(err, scope => markEventUnhandled(scope)); + throw err; + }); + } - return fnResult; - } + return fnResult; + } - return Promise.resolve() - .then(() => (fn as EventFunction)(data, context)) - .then( - result => newCallback(null, result), - err => newCallback(err, undefined), - ); + return Promise.resolve() + .then(() => (fn as EventFunction)(data, context)) + .then( + result => newCallback(null, result), + err => newCallback(err, undefined), + ); + }, + ); }; } diff --git a/packages/serverless/src/gcpfunction/http.ts b/packages/serverless/src/gcpfunction/http.ts index 50bbcd76e782..26d156010373 100644 --- a/packages/serverless/src/gcpfunction/http.ts +++ b/packages/serverless/src/gcpfunction/http.ts @@ -1,7 +1,9 @@ +import { Transaction } from '@sentry/core'; import type { AddRequestDataToEventOptions } from '@sentry/node'; +import { continueTrace, startSpanManual } from '@sentry/node'; import { getCurrentScope } from '@sentry/node'; -import { captureException, flush, getCurrentHub } from '@sentry/node'; -import { isString, isThenable, logger, stripUrlQueryAndFragment, tracingContextFromHeaders } from '@sentry/utils'; +import { captureException, flush } from '@sentry/node'; +import { isString, isThenable, logger, stripUrlQueryAndFragment } from '@sentry/utils'; import { DEBUG_BUILD } from '../debug-build'; import { domainify, markEventUnhandled, proxyFunction } from './../utils'; @@ -63,78 +65,74 @@ function _wrapHttpFunction(fn: HttpFunction, wrapOptions: Partial { - const hub = getCurrentHub(); - const scope = getCurrentScope(); - const reqMethod = (req.method || '').toUpperCase(); const reqUrl = stripUrlQueryAndFragment(req.originalUrl || req.url || ''); const sentryTrace = req.headers && isString(req.headers['sentry-trace']) ? req.headers['sentry-trace'] : undefined; const baggage = req.headers?.baggage; - const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders( - sentryTrace, - baggage, - ); - scope.setPropagationContext(propagationContext); - - const transaction = hub.startTransaction({ - name: `${reqMethod} ${reqUrl}`, - op: 'function.gcp.http', - origin: 'auto.function.serverless.gcp_http', - ...traceparentData, - metadata: { - dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext, - source: 'route', + + const continueTraceContext = continueTrace({ sentryTrace, baggage }); + + return startSpanManual( + { + ...continueTraceContext, + name: `${reqMethod} ${reqUrl}`, + op: 'function.gcp.http', + origin: 'auto.function.serverless.gcp_http', + + metadata: { + ...continueTraceContext.metadata, + source: 'route', + }, }, - }) as ReturnType | undefined; - - // getCurrentHub() is expected to use current active domain as a carrier - // since functions-framework creates a domain for each incoming request. - // So adding of event processors every time should not lead to memory bloat. - scope.setSDKProcessingMetadata({ - request: req, - requestDataOptionsFromGCPWrapper: options.addRequestDataToEventOptions, - }); - // We put the transaction on the scope so users can attach children to it - scope.setSpan(transaction); - - // We also set __sentry_transaction on the response so people can grab the transaction there to add - // spans to it later. - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access - (res as any).__sentry_transaction = transaction; - - // eslint-disable-next-line @typescript-eslint/unbound-method - const _end = res.end; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - res.end = function (chunk?: any | (() => void), encoding?: string | (() => void), cb?: () => void): any { - transaction?.setHttpStatus(res.statusCode); - transaction?.end(); - - // eslint-disable-next-line @typescript-eslint/no-floating-promises - flush(options.flushTimeout) - .then(null, e => { - DEBUG_BUILD && logger.error(e); - }) - .then(() => { - _end.call(this, chunk, encoding, cb); + span => { + getCurrentScope().setSDKProcessingMetadata({ + request: req, + requestDataOptionsFromGCPWrapper: options.addRequestDataToEventOptions, }); - }; - - let fnResult; - try { - fnResult = fn(req, res); - } catch (err) { - captureException(err, scope => markEventUnhandled(scope)); - throw err; - } - - if (isThenable(fnResult)) { - fnResult.then(null, err => { - captureException(err, scope => markEventUnhandled(scope)); - throw err; - }); - } - - return fnResult; + + if (span instanceof Transaction) { + // We also set __sentry_transaction on the response so people can grab the transaction there to add + // spans to it later. + // TODO(v8): Remove this + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access + (res as any).__sentry_transaction = span; + } + + // eslint-disable-next-line @typescript-eslint/unbound-method + const _end = res.end; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + res.end = function (chunk?: any | (() => void), encoding?: string | (() => void), cb?: () => void): any { + span?.setHttpStatus(res.statusCode); + span?.end(); + + // eslint-disable-next-line @typescript-eslint/no-floating-promises + flush(options.flushTimeout) + .then(null, e => { + DEBUG_BUILD && logger.error(e); + }) + .then(() => { + _end.call(this, chunk, encoding, cb); + }); + }; + + let fnResult; + try { + fnResult = fn(req, res); + } catch (err) { + captureException(err, scope => markEventUnhandled(scope)); + throw err; + } + + if (isThenable(fnResult)) { + fnResult.then(null, err => { + captureException(err, scope => markEventUnhandled(scope)); + throw err; + }); + } + + return fnResult; + }, + ); }; } diff --git a/packages/serverless/test/__mocks__/@sentry/node.ts b/packages/serverless/test/__mocks__/@sentry/node.ts index 0dbf38c3d483..d37bbbd2023c 100644 --- a/packages/serverless/test/__mocks__/@sentry/node.ts +++ b/packages/serverless/test/__mocks__/@sentry/node.ts @@ -7,13 +7,8 @@ export const SDK_VERSION = '6.6.6'; export const Severity = { Warning: 'warning', }; -export const fakeHub = { - configureScope: jest.fn((fn: (arg: any) => any) => fn(fakeScope)), - pushScope: jest.fn(() => fakeScope), - popScope: jest.fn(), - getScope: jest.fn(() => fakeScope), - startTransaction: jest.fn(context => ({ ...fakeTransaction, ...context })), -}; +export const continueTrace = origSentry.continueTrace; + export const fakeScope = { addEventProcessor: jest.fn(), setTransactionName: jest.fn(), @@ -26,6 +21,7 @@ export const fakeScope = { }; export const fakeSpan = { end: jest.fn(), + setHttpStatus: jest.fn(), }; export const fakeTransaction = { end: jest.fn(), @@ -34,25 +30,20 @@ export const fakeTransaction = { }; export const init = jest.fn(); export const addGlobalEventProcessor = jest.fn(); -export const getCurrentHub = jest.fn(() => fakeHub); export const getCurrentScope = jest.fn(() => fakeScope); -export const startTransaction = jest.fn(_ => fakeTransaction); export const captureException = jest.fn(); export const captureMessage = jest.fn(); export const withScope = jest.fn(cb => cb(fakeScope)); export const flush = jest.fn(() => Promise.resolve()); export const getClient = jest.fn(() => ({})); +export const startSpanManual = jest.fn((ctx, callback: (span: any) => any) => callback(fakeSpan)); export const resetMocks = (): void => { fakeTransaction.setHttpStatus.mockClear(); fakeTransaction.end.mockClear(); fakeTransaction.startChild.mockClear(); fakeSpan.end.mockClear(); - fakeHub.configureScope.mockClear(); - fakeHub.pushScope.mockClear(); - fakeHub.popScope.mockClear(); - fakeHub.getScope.mockClear(); - fakeHub.startTransaction.mockClear(); + fakeSpan.setHttpStatus.mockClear(); fakeScope.addEventProcessor.mockClear(); fakeScope.setTransactionName.mockClear(); @@ -63,11 +54,11 @@ export const resetMocks = (): void => { init.mockClear(); addGlobalEventProcessor.mockClear(); - getCurrentHub.mockClear(); - startTransaction.mockClear(); + captureException.mockClear(); captureMessage.mockClear(); withScope.mockClear(); flush.mockClear(); getClient.mockClear(); + startSpanManual.mockClear(); }; diff --git a/packages/serverless/test/awslambda.test.ts b/packages/serverless/test/awslambda.test.ts index 49f41e67f6fd..1188f0466295 100644 --- a/packages/serverless/test/awslambda.test.ts +++ b/packages/serverless/test/awslambda.test.ts @@ -41,12 +41,10 @@ const fakeCallback: Callback = (err, result) => { function expectScopeSettings(fakeTransactionContext: any) { // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; + const fakeSpan = { ...SentryNode.fakeSpan, ...fakeTransactionContext }; // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeScope.setTransactionName).toBeCalledWith('functionName'); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); - // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeScope.setTag).toBeCalledWith('server_name', expect.anything()); // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeScope.setTag).toBeCalledWith('url', 'awslambda:///functionName'); @@ -103,7 +101,7 @@ describe('AWSLambda', () => { const wrappedHandler = wrapHandler(handler); await wrappedHandler(fakeEvent, fakeContext, fakeCallback); - expect(Sentry.withScope).toBeCalledTimes(2); + expect(Sentry.withScope).toBeCalledTimes(1); expect(Sentry.captureMessage).toBeCalled(); // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeScope.setTag).toBeCalledWith('timeout', '1s'); @@ -120,7 +118,7 @@ describe('AWSLambda', () => { }); await wrappedHandler(fakeEvent, fakeContext, fakeCallback); - expect(Sentry.withScope).toBeCalledTimes(1); + expect(Sentry.withScope).toBeCalledTimes(0); expect(Sentry.captureMessage).not.toBeCalled(); // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeScope.setTag).not.toBeCalledWith('timeout', '1s'); @@ -192,14 +190,13 @@ describe('AWSLambda', () => { expect(SentryNode.fakeScope.setTransactionName).toBeCalledTimes(0); // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeScope.setTag).toBeCalledTimes(0); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledTimes(0); + expect(SentryNode.startSpanManual).toBeCalledTimes(0); }); }); describe('wrapHandler() on sync handler', () => { test('successful execution', async () => { - expect.assertions(10); + expect.assertions(9); const handler: Handler = (_event, _context, callback) => { callback(null, 42); @@ -215,16 +212,15 @@ describe('AWSLambda', () => { }; expect(rv).toStrictEqual(42); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expectScopeSettings(fakeTransactionContext); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalledWith(2000); }); test('unsuccessful execution', async () => { - expect.assertions(10); + expect.assertions(9); const error = new Error('sorry'); const handler: Handler = (_event, _context, callback) => { @@ -242,12 +238,11 @@ describe('AWSLambda', () => { metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expectScopeSettings(fakeTransactionContext); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalledWith(2000); } }); @@ -273,8 +268,7 @@ describe('AWSLambda', () => { }; const handler: Handler = (_event, _context, callback) => { - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith( + expect(SentryNode.startSpanManual).toBeCalledWith( expect.objectContaining({ parentSpanId: '1121201211212012', parentSampled: false, @@ -289,6 +283,7 @@ describe('AWSLambda', () => { source: 'component', }, }), + expect.any(Function), ); callback(undefined, { its: 'fine' }); @@ -299,7 +294,7 @@ describe('AWSLambda', () => { }); test('capture error', async () => { - expect.assertions(10); + expect.assertions(9); const error = new Error('wat'); const handler: Handler = (_event, _context, _callback) => { @@ -321,12 +316,11 @@ describe('AWSLambda', () => { metadata: { dynamicSamplingContext: {}, source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expectScopeSettings(fakeTransactionContext); expect(SentryNode.captureException).toBeCalledWith(e, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalled(); } }); @@ -334,7 +328,7 @@ describe('AWSLambda', () => { describe('wrapHandler() on async handler', () => { test('successful execution', async () => { - expect.assertions(10); + expect.assertions(9); const handler: Handler = async (_event, _context) => { return 42; @@ -350,11 +344,10 @@ describe('AWSLambda', () => { }; expect(rv).toStrictEqual(42); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expectScopeSettings(fakeTransactionContext); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalled(); }); @@ -370,7 +363,7 @@ describe('AWSLambda', () => { }); test('capture error', async () => { - expect.assertions(10); + expect.assertions(9); const error = new Error('wat'); const handler: Handler = async (_event, _context) => { @@ -388,12 +381,11 @@ describe('AWSLambda', () => { metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expectScopeSettings(fakeTransactionContext); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalled(); } }); @@ -416,7 +408,7 @@ describe('AWSLambda', () => { describe('wrapHandler() on async handler with a callback method (aka incorrect usage)', () => { test('successful execution', async () => { - expect.assertions(10); + expect.assertions(9); const handler: Handler = async (_event, _context, _callback) => { return 42; @@ -432,11 +424,10 @@ describe('AWSLambda', () => { }; expect(rv).toStrictEqual(42); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expectScopeSettings(fakeTransactionContext); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalled(); }); @@ -452,7 +443,7 @@ describe('AWSLambda', () => { }); test('capture error', async () => { - expect.assertions(10); + expect.assertions(9); const error = new Error('wat'); const handler: Handler = async (_event, _context, _callback) => { @@ -470,12 +461,11 @@ describe('AWSLambda', () => { metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expectScopeSettings(fakeTransactionContext); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalled(); } }); diff --git a/packages/serverless/test/gcpfunction.test.ts b/packages/serverless/test/gcpfunction.test.ts index 4f442c543678..19a3a2565cdd 100644 --- a/packages/serverless/test/gcpfunction.test.ts +++ b/packages/serverless/test/gcpfunction.test.ts @@ -88,8 +88,6 @@ describe('GCPFunction', () => { describe('wrapHttpFunction() options', () => { test('flushTimeout', async () => { - expect.assertions(1); - const handler: HttpFunction = (_, res) => { res.end(); }; @@ -102,8 +100,6 @@ describe('GCPFunction', () => { describe('wrapHttpFunction()', () => { test('successful execution', async () => { - expect.assertions(5); - const handler: HttpFunction = (_req, res) => { res.statusCode = 200; res.end(); @@ -117,23 +113,16 @@ describe('GCPFunction', () => { origin: 'auto.function.serverless.gcp_http', metadata: { source: 'route' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); + expect(SentryNode.fakeSpan.setHttpStatus).toBeCalledWith(200); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.setHttpStatus).toBeCalledWith(200); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalledWith(2000); }); test('incoming trace headers are correctly parsed and used', async () => { - expect.assertions(1); - const handler: HttpFunction = (_req, res) => { res.statusCode = 200; res.end(); @@ -160,13 +149,10 @@ describe('GCPFunction', () => { }, }; - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); }); test('capture error', async () => { - expect.assertions(5); - const error = new Error('wat'); const handler: HttpFunction = (_req, _res) => { throw error; @@ -188,22 +174,15 @@ describe('GCPFunction', () => { parentSampled: false, metadata: { dynamicSamplingContext: {}, source: 'route' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalled(); }); test('should not throw when flush rejects', async () => { - expect.assertions(2); - const handler: HttpFunction = async (_req, res) => { res.statusCode = 200; res.end(); @@ -262,8 +241,6 @@ describe('GCPFunction', () => { describe('wrapEventFunction() without callback', () => { test('successful execution', async () => { - expect.assertions(5); - const func: EventFunction = (_data, _context) => { return 42; }; @@ -276,21 +253,14 @@ describe('GCPFunction', () => { origin: 'auto.function.serverless.gcp_event', metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalledWith(2000); }); test('capture error', async () => { - expect.assertions(6); - const error = new Error('wat'); const handler: EventFunction = (_data, _context) => { throw error; @@ -304,24 +274,17 @@ describe('GCPFunction', () => { origin: 'auto.function.serverless.gcp_event', metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalled(); }); }); describe('wrapEventFunction() as Promise', () => { test('successful execution', async () => { - expect.assertions(5); - const func: EventFunction = (_data, _context) => new Promise(resolve => { setTimeout(() => { @@ -337,21 +300,14 @@ describe('GCPFunction', () => { origin: 'auto.function.serverless.gcp_event', metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalledWith(2000); }); test('capture error', async () => { - expect.assertions(6); - const error = new Error('wat'); const handler: EventFunction = (_data, _context) => new Promise((_, reject) => { @@ -369,24 +325,17 @@ describe('GCPFunction', () => { origin: 'auto.function.serverless.gcp_event', metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalled(); }); }); describe('wrapEventFunction() with callback', () => { test('successful execution', async () => { - expect.assertions(5); - const func: EventFunctionWithCallback = (_data, _context, cb) => { cb(null, 42); }; @@ -399,21 +348,14 @@ describe('GCPFunction', () => { origin: 'auto.function.serverless.gcp_event', metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalledWith(2000); }); test('capture error', async () => { - expect.assertions(6); - const error = new Error('wat'); const handler: EventFunctionWithCallback = (_data, _context, cb) => { cb(error); @@ -427,22 +369,15 @@ describe('GCPFunction', () => { origin: 'auto.function.serverless.gcp_event', metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalled(); }); test('capture exception', async () => { - expect.assertions(4); - const error = new Error('wat'); const handler: EventFunctionWithCallback = (_data, _context, _cb) => { throw error; @@ -456,20 +391,13 @@ describe('GCPFunction', () => { origin: 'auto.function.serverless.gcp_event', metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); }); }); test('marks the captured error as unhandled', async () => { - expect.assertions(4); - const error = new Error('wat'); const handler: EventFunctionWithCallback = (_data, _context, _cb) => { throw error; @@ -494,8 +422,6 @@ describe('GCPFunction', () => { }); test('wrapEventFunction scope data', async () => { - expect.assertions(1); - const handler: EventFunction = (_data, _context) => 42; const wrappedHandler = wrapEventFunction(handler); await handleEvent(wrappedHandler); @@ -508,8 +434,6 @@ describe('GCPFunction', () => { describe('wrapCloudEventFunction() without callback', () => { test('successful execution', async () => { - expect.assertions(5); - const func: CloudEventFunction = _context => { return 42; }; @@ -522,21 +446,14 @@ describe('GCPFunction', () => { origin: 'auto.function.serverless.gcp_cloud_event', metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalledWith(2000); }); test('capture error', async () => { - expect.assertions(6); - const error = new Error('wat'); const handler: CloudEventFunction = _context => { throw error; @@ -550,24 +467,17 @@ describe('GCPFunction', () => { origin: 'auto.function.serverless.gcp_cloud_event', metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalled(); }); }); describe('wrapCloudEventFunction() with callback', () => { test('successful execution', async () => { - expect.assertions(5); - const func: CloudEventFunctionWithCallback = (_context, cb) => { cb(null, 42); }; @@ -580,21 +490,14 @@ describe('GCPFunction', () => { origin: 'auto.function.serverless.gcp_cloud_event', metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalledWith(2000); }); test('capture error', async () => { - expect.assertions(6); - const error = new Error('wat'); const handler: CloudEventFunctionWithCallback = (_context, cb) => { cb(error); @@ -608,22 +511,15 @@ describe('GCPFunction', () => { origin: 'auto.function.serverless.gcp_cloud_event', metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeTransaction.end).toBeCalled(); + expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalled(); }); test('capture exception', async () => { - expect.assertions(4); - const error = new Error('wat'); const handler: CloudEventFunctionWithCallback = (_context, _cb) => { throw error; @@ -637,21 +533,13 @@ describe('GCPFunction', () => { origin: 'auto.function.serverless.gcp_cloud_event', metadata: { source: 'component' }, }; - // @ts-expect-error see "Why @ts-expect-error" note - const fakeTransaction = { ...SentryNode.fakeTransaction, ...fakeTransactionContext }; - - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeHub.startTransaction).toBeCalledWith(fakeTransactionContext); - // @ts-expect-error see "Why @ts-expect-error" note - expect(SentryNode.fakeScope.setSpan).toBeCalledWith(fakeTransaction); + expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); }); }); test('wrapCloudEventFunction scope data', async () => { - expect.assertions(1); - const handler: CloudEventFunction = _context => 42; const wrappedHandler = wrapCloudEventFunction(handler); await handleCloudEvent(wrappedHandler); From 152e90141e0adf6ba1db17b739dd61e8007597bd Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 27 Dec 2023 12:39:36 +0100 Subject: [PATCH 05/51] ref(nextjs): Replace `startTrancsaction` in `withSentry` (#9941) --- .../src/common/wrapApiHandlerWithSentry.ts | 266 ++++++++---------- .../nextjs/test/config/withSentry.test.ts | 45 +-- 2 files changed, 120 insertions(+), 191 deletions(-) diff --git a/packages/nextjs/src/common/wrapApiHandlerWithSentry.ts b/packages/nextjs/src/common/wrapApiHandlerWithSentry.ts index dfd6d888fbef..fc8f602f524b 100644 --- a/packages/nextjs/src/common/wrapApiHandlerWithSentry.ts +++ b/packages/nextjs/src/common/wrapApiHandlerWithSentry.ts @@ -1,25 +1,16 @@ import { addTracingExtensions, captureException, - getClient, + continueTrace, getCurrentScope, runWithAsyncContext, - startTransaction, + startSpanManual, } from '@sentry/core'; -import type { Transaction } from '@sentry/types'; -import { - consoleSandbox, - isString, - logger, - objectify, - stripUrlQueryAndFragment, - tracingContextFromHeaders, -} from '@sentry/utils'; - -import { DEBUG_BUILD } from './debug-build'; +import { consoleSandbox, isString, logger, objectify, stripUrlQueryAndFragment } from '@sentry/utils'; + import type { AugmentedNextApiRequest, AugmentedNextApiResponse, NextApiHandler } from './types'; import { platformSupportsStreaming } from './utils/platformSupportsStreaming'; -import { autoEndTransactionOnResponseEnd, finishTransaction, flushQueue } from './utils/responseEnd'; +import { flushQueue } from './utils/responseEnd'; /** * Wrap the given API route handler for tracing and error capturing. Thin wrapper around `withSentry`, which only @@ -84,151 +75,126 @@ export function withSentry(apiHandler: NextApiHandler, parameterizedRoute?: stri addTracingExtensions(); - // eslint-disable-next-line complexity, @typescript-eslint/no-explicit-any - const boundHandler = runWithAsyncContext( - // eslint-disable-next-line complexity - async () => { - let transaction: Transaction | undefined; - const currentScope = getCurrentScope(); - const options = getClient()?.getOptions(); - - currentScope.setSDKProcessingMetadata({ request: req }); - - if (options?.instrumenter === 'sentry') { - const sentryTrace = - req.headers && isString(req.headers['sentry-trace']) ? req.headers['sentry-trace'] : undefined; - const baggage = req.headers?.baggage; - const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders( - sentryTrace, - baggage, - ); - currentScope.setPropagationContext(propagationContext); - - if (DEBUG_BUILD && traceparentData) { - logger.log(`[Tracing] Continuing trace ${traceparentData.traceId}.`); + return runWithAsyncContext(async () => { + const transactionContext = continueTrace({ + sentryTrace: req.headers && isString(req.headers['sentry-trace']) ? req.headers['sentry-trace'] : undefined, + baggage: req.headers?.baggage, + }); + + // prefer the parameterized route, if we have it (which we will if we've auto-wrapped the route handler) + let reqPath = parameterizedRoute; + + // If not, fake it by just replacing parameter values with their names, hoping that none of them match either + // each other or any hard-coded parts of the path + if (!reqPath) { + const url = `${req.url}`; + // pull off query string, if any + reqPath = stripUrlQueryAndFragment(url); + // Replace with placeholder + if (req.query) { + for (const [key, value] of Object.entries(req.query)) { + reqPath = reqPath.replace(`${value}`, `[${key}]`); } - - // prefer the parameterized route, if we have it (which we will if we've auto-wrapped the route handler) - let reqPath = parameterizedRoute; - - // If not, fake it by just replacing parameter values with their names, hoping that none of them match either - // each other or any hard-coded parts of the path - if (!reqPath) { - const url = `${req.url}`; - // pull off query string, if any - reqPath = stripUrlQueryAndFragment(url); - // Replace with placeholder - if (req.query) { - for (const [key, value] of Object.entries(req.query)) { - reqPath = reqPath.replace(`${value}`, `[${key}]`); + } + } + + const reqMethod = `${(req.method || 'GET').toUpperCase()} `; + + getCurrentScope().setSDKProcessingMetadata({ request: req }); + + return startSpanManual( + { + ...transactionContext, + name: `${reqMethod}${reqPath}`, + op: 'http.server', + origin: 'auto.http.nextjs', + metadata: { + ...transactionContext.metadata, + source: 'route', + request: req, + }, + }, + async span => { + // eslint-disable-next-line @typescript-eslint/unbound-method + res.end = new Proxy(res.end, { + apply(target, thisArg, argArray) { + span?.setHttpStatus(res.statusCode); + span?.end(); + if (platformSupportsStreaming() && !wrappingTarget.__sentry_test_doesnt_support_streaming__) { + target.apply(thisArg, argArray); + } else { + // flushQueue will not reject + // eslint-disable-next-line @typescript-eslint/no-floating-promises + flushQueue().then(() => { + target.apply(thisArg, argArray); + }); } - } - } - - const reqMethod = `${(req.method || 'GET').toUpperCase()} `; - - transaction = startTransaction( - { - name: `${reqMethod}${reqPath}`, - op: 'http.server', - origin: 'auto.http.nextjs', - ...traceparentData, - metadata: { - dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext, - source: 'route', - request: req, - }, }, - // extra context passed to the `tracesSampler` - { request: req }, - ); - currentScope.setSpan(transaction); - if (platformSupportsStreaming() && !wrappingTarget.__sentry_test_doesnt_support_streaming__) { - autoEndTransactionOnResponseEnd(transaction, res); - } else { - // If we're not on a platform that supports streaming, we're blocking res.end() until the queue is flushed. - // res.json() and res.send() will implicitly call res.end(), so it is enough to wrap res.end(). - - // eslint-disable-next-line @typescript-eslint/unbound-method - const origResEnd = res.end; - res.end = async function (this: unknown, ...args: unknown[]) { - if (transaction) { - finishTransaction(transaction, res); - await flushQueue(); - } + }); - origResEnd.apply(this, args); - }; - } - } + try { + const handlerResult = await wrappingTarget.apply(thisArg, args); + if ( + process.env.NODE_ENV === 'development' && + !process.env.SENTRY_IGNORE_API_RESOLUTION_ERROR && + !res.finished + // TODO(v8): Remove this warning? + // This can only happen (not always) when the user is using `withSentry` manually, which we're deprecating. + // Warning suppression on Next.JS is only necessary in that case. + ) { + consoleSandbox(() => { + // eslint-disable-next-line no-console + console.warn( + '[sentry] If Next.js logs a warning "API resolved without sending a response", it\'s a false positive, which may happen when you use `withSentry` manually to wrap your routes. To suppress this warning, set `SENTRY_IGNORE_API_RESOLUTION_ERROR` to 1 in your env. To suppress the nextjs warning, use the `externalResolver` API route option (see https://nextjs.org/docs/api-routes/api-middlewares#custom-config for details).', + ); + }); + } - try { - const handlerResult = await wrappingTarget.apply(thisArg, args); - - if ( - process.env.NODE_ENV === 'development' && - !process.env.SENTRY_IGNORE_API_RESOLUTION_ERROR && - !res.finished - // This can only happen (not always) when the user is using `withSentry` manually, which we're deprecating. - // Warning suppression on Next.JS is only necessary in that case. - ) { - consoleSandbox(() => { - // eslint-disable-next-line no-console - console.warn( - `[sentry] If Next.js logs a warning "API resolved without sending a response", it's a false positive, which may happen when you use \`withSentry\` manually to wrap your routes. - To suppress this warning, set \`SENTRY_IGNORE_API_RESOLUTION_ERROR\` to 1 in your env. - To suppress the nextjs warning, use the \`externalResolver\` API route option (see https://nextjs.org/docs/api-routes/api-middlewares#custom-config for details).`, - ); + return handlerResult; + } catch (e) { + // In case we have a primitive, wrap it in the equivalent wrapper class (string -> String, etc.) so that we can + // store a seen flag on it. (Because of the one-way-on-Vercel-one-way-off-of-Vercel approach we've been forced + // to take, it can happen that the same thrown object gets caught in two different ways, and flagging it is a + // way to prevent it from actually being reported twice.) + const objectifiedErr = objectify(e); + + captureException(objectifiedErr, { + mechanism: { + type: 'instrument', + handled: false, + data: { + wrapped_handler: wrappingTarget.name, + function: 'withSentry', + }, + }, }); - } - return handlerResult; - } catch (e) { - // In case we have a primitive, wrap it in the equivalent wrapper class (string -> String, etc.) so that we can - // store a seen flag on it. (Because of the one-way-on-Vercel-one-way-off-of-Vercel approach we've been forced - // to take, it can happen that the same thrown object gets caught in two different ways, and flagging it is a - // way to prevent it from actually being reported twice.) - const objectifiedErr = objectify(e); - - captureException(objectifiedErr, { - mechanism: { - type: 'instrument', - handled: false, - data: { - wrapped_handler: wrappingTarget.name, - function: 'withSentry', - }, - }, - }); + // Because we're going to finish and send the transaction before passing the error onto nextjs, it won't yet + // have had a chance to set the status to 500, so unless we do it ourselves now, we'll incorrectly report that + // the transaction was error-free + res.statusCode = 500; + res.statusMessage = 'Internal Server Error'; + + span?.setHttpStatus(res.statusCode); + span?.end(); + + // Make sure we have a chance to finish the transaction and flush events to Sentry before the handler errors + // out. (Apps which are deployed on Vercel run their API routes in lambdas, and those lambdas will shut down the + // moment they detect an error, so it's important to get this done before rethrowing the error. Apps not + // deployed serverlessly will run into this cleanup code again in `res.end(), but the transaction will already + // be finished and the queue will already be empty, so effectively it'll just no-op.) + if (platformSupportsStreaming() && !wrappingTarget.__sentry_test_doesnt_support_streaming__) { + await flushQueue(); + } - // Because we're going to finish and send the transaction before passing the error onto nextjs, it won't yet - // have had a chance to set the status to 500, so unless we do it ourselves now, we'll incorrectly report that - // the transaction was error-free - res.statusCode = 500; - res.statusMessage = 'Internal Server Error'; - - finishTransaction(transaction, res); - - // Make sure we have a chance to finish the transaction and flush events to Sentry before the handler errors - // out. (Apps which are deployed on Vercel run their API routes in lambdas, and those lambdas will shut down the - // moment they detect an error, so it's important to get this done before rethrowing the error. Apps not - // deployed serverlessly will run into this cleanup code again in `res.end(), but the transaction will already - // be finished and the queue will already be empty, so effectively it'll just no-op.) - if (platformSupportsStreaming() && !wrappingTarget.__sentry_test_doesnt_support_streaming__) { - await flushQueue(); + // We rethrow here so that nextjs can do with the error whatever it would normally do. (Sometimes "whatever it + // would normally do" is to allow the error to bubble up to the global handlers - another reason we need to mark + // the error as already having been captured.) + throw objectifiedErr; } - - // We rethrow here so that nextjs can do with the error whatever it would normally do. (Sometimes "whatever it - // would normally do" is to allow the error to bubble up to the global handlers - another reason we need to mark - // the error as already having been captured.) - throw objectifiedErr; - } - }, - ); - - // Since API route handlers are all async, nextjs always awaits the return value (meaning it's fine for us to return - // a promise here rather than a real result, and it saves us the overhead of an `await` call.) - return boundHandler; + }, + ); + }); }, }); } diff --git a/packages/nextjs/test/config/withSentry.test.ts b/packages/nextjs/test/config/withSentry.test.ts index d997419a88a2..da43ec724944 100644 --- a/packages/nextjs/test/config/withSentry.test.ts +++ b/packages/nextjs/test/config/withSentry.test.ts @@ -1,6 +1,5 @@ import * as SentryCore from '@sentry/core'; import { addTracingExtensions } from '@sentry/core'; -import type { Client, ClientOptions } from '@sentry/types'; import type { NextApiRequest, NextApiResponse } from 'next'; import type { AugmentedNextApiResponse, NextApiHandler } from '../../src/common/types'; @@ -10,37 +9,7 @@ import { withSentry } from '../../src/server'; // constructor but the client isn't used in these tests. addTracingExtensions(); -const FLUSH_DURATION = 200; - -async function sleep(ms: number): Promise { - await new Promise(resolve => setTimeout(resolve, ms)); -} -/** - * Helper to prevent tests from ending before `flush()` has finished its work. - * - * This is necessary because, like its real-life counterpart, our mocked `res.send()` below doesn't await `res.end() - * (which becomes async when we wrap it in `withSentry` in order to give `flush()` time to run). In real life, the - * request/response cycle is held open as subsequent steps wait for `end()` to emit its `prefinished` event. Here in - * tests, without any of that other machinery, we have to hold it open ourselves. - * - * @param wrappedHandler - * @param req - * @param res - */ -async function callWrappedHandler(wrappedHandler: NextApiHandler, req: NextApiRequest, res: NextApiResponse) { - await wrappedHandler(req, res); - - // we know we need to wait at least this long for `flush()` to finish - await sleep(FLUSH_DURATION); - - // should be <1 second, just long enough the `flush()` call to return, the original (pre-wrapping) `res.end()` to be - // called, and the response to be marked as done - while (!res.finished) { - await sleep(100); - } -} - -const startTransactionSpy = jest.spyOn(SentryCore, 'startTransaction'); +const startSpanManualSpy = jest.spyOn(SentryCore, 'startSpanManual'); describe('withSentry', () => { let req: NextApiRequest, res: NextApiResponse; @@ -70,24 +39,18 @@ describe('withSentry', () => { describe('tracing', () => { it('starts a transaction and sets metadata when tracing is enabled', async () => { - jest.spyOn(SentryCore.Hub.prototype, 'getClient').mockReturnValueOnce({ - getOptions: () => ({ tracesSampleRate: 1, instrumenter: 'sentry' }) as ClientOptions, - } as Client); - - await callWrappedHandler(wrappedHandlerNoError, req, res); - - expect(startTransactionSpy).toHaveBeenCalledWith( + await wrappedHandlerNoError(req, res); + expect(startSpanManualSpy).toHaveBeenCalledWith( { name: 'GET http://dogs.are.great', op: 'http.server', origin: 'auto.http.nextjs', - metadata: { source: 'route', request: expect.objectContaining({ url: 'http://dogs.are.great' }), }, }, - { request: expect.objectContaining({ url: 'http://dogs.are.great' }) }, + expect.any(Function), ); }); }); From ea74266f4967e1e9a25f50ea846a6c3f4be6c1e5 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 28 Dec 2023 10:06:54 +0100 Subject: [PATCH 06/51] ref: Remove `startTransaction` call from `withEdgeWrapping` (#9984) --- .../src/common/utils/edgeWrapperUtils.ts | 108 ++++++------------ .../nextjs/test/edge/edgeWrapperUtils.test.ts | 26 ++--- .../nextjs/test/edge/withSentryAPI.test.ts | 79 ++++++------- packages/utils/src/requestdata.ts | 1 + 4 files changed, 81 insertions(+), 133 deletions(-) diff --git a/packages/nextjs/src/common/utils/edgeWrapperUtils.ts b/packages/nextjs/src/common/utils/edgeWrapperUtils.ts index 8763f87854d3..0128339a9b72 100644 --- a/packages/nextjs/src/common/utils/edgeWrapperUtils.ts +++ b/packages/nextjs/src/common/utils/edgeWrapperUtils.ts @@ -1,15 +1,7 @@ -import { addTracingExtensions, captureException, getCurrentScope, startTransaction } from '@sentry/core'; -import type { Span } from '@sentry/types'; -import { - addExceptionMechanism, - logger, - objectify, - tracingContextFromHeaders, - winterCGRequestToRequestData, -} from '@sentry/utils'; +import { addTracingExtensions, captureException, continueTrace, trace } from '@sentry/core'; +import { winterCGRequestToRequestData } from '@sentry/utils'; import type { EdgeRouteHandler } from '../../edge/types'; -import { DEBUG_BUILD } from '../debug-build'; import { flushQueue } from './responseEnd'; /** @@ -21,84 +13,56 @@ export function withEdgeWrapping( ): (...params: Parameters) => Promise> { return async function (this: unknown, ...args) { addTracingExtensions(); + const req: unknown = args[0]; - const req = args[0]; - const currentScope = getCurrentScope(); - const prevSpan = currentScope.getSpan(); + let sentryTrace; + let baggage; - let span: Span | undefined; + if (req instanceof Request) { + sentryTrace = req.headers.get('sentry-trace') || ''; + baggage = req.headers.get('baggage'); + } - if (prevSpan) { - span = prevSpan.startChild({ - description: options.spanDescription, - op: options.spanOp, - origin: 'auto.function.nextjs', - }); - } else if (req instanceof Request) { - const sentryTrace = req.headers.get('sentry-trace') || ''; - const baggage = req.headers.get('baggage'); - const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders( - sentryTrace, - baggage, - ); - currentScope.setPropagationContext(propagationContext); - if (traceparentData) { - DEBUG_BUILD && logger.log(`[Tracing] Continuing trace ${traceparentData.traceId}.`); - } + const transactionContext = continueTrace({ + sentryTrace, + baggage, + }); - span = startTransaction({ + return trace( + { + ...transactionContext, name: options.spanDescription, op: options.spanOp, - origin: 'auto.ui.nextjs.withEdgeWrapping', - ...traceparentData, + origin: 'auto.function.nextjs.withEdgeWrapping', metadata: { - request: winterCGRequestToRequestData(req), - dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext, + ...transactionContext.metadata, + request: req instanceof Request ? winterCGRequestToRequestData(req) : undefined, source: 'route', }, - }); - } - - currentScope?.setSpan(span); - - try { - const handlerResult: ReturnType = await handler.apply(this, args); + }, + async span => { + const handlerResult = await handler.apply(this, args); - if ((handlerResult as unknown) instanceof Response) { - span?.setHttpStatus(handlerResult.status); - } else { - span?.setStatus('ok'); - } + if (handlerResult instanceof Response) { + span?.setHttpStatus(handlerResult.status); + } else { + span?.setStatus('ok'); + } - return handlerResult; - } catch (e) { - // In case we have a primitive, wrap it in the equivalent wrapper class (string -> String, etc.) so that we can - // store a seen flag on it. - const objectifiedErr = objectify(e); - - span?.setStatus('internal_error'); - - captureException(objectifiedErr, scope => { - scope.setSpan(span); - scope.addEventProcessor(event => { - addExceptionMechanism(event, { + return handlerResult; + }, + (err, span) => { + span?.setStatus('internal_error'); + captureException(err, { + mechanism: { type: 'instrument', handled: false, data: { function: options.mechanismFunctionName, }, - }); - return event; + }, }); - - return scope; - }); - - throw objectifiedErr; - } finally { - span?.end(); - currentScope?.setSpan(prevSpan); - await flushQueue(); - } + }, + ).finally(() => flushQueue()); }; } diff --git a/packages/nextjs/test/edge/edgeWrapperUtils.test.ts b/packages/nextjs/test/edge/edgeWrapperUtils.test.ts index 7ef9b6f5a85f..0003c07e756a 100644 --- a/packages/nextjs/test/edge/edgeWrapperUtils.test.ts +++ b/packages/nextjs/test/edge/edgeWrapperUtils.test.ts @@ -1,12 +1,7 @@ import * as coreSdk from '@sentry/core'; -import { addTracingExtensions } from '@sentry/core'; import { withEdgeWrapping } from '../../src/common/utils/edgeWrapperUtils'; -// The wrap* functions require the hub to have tracing extensions. This is normally called by the EdgeClient -// constructor but the client isn't used in these tests. -addTracingExtensions(); - // @ts-expect-error Request does not exist on type Global const origRequest = global.Request; // @ts-expect-error Response does not exist on type Global @@ -33,8 +28,6 @@ afterAll(() => { beforeEach(() => { jest.clearAllMocks(); - jest.resetAllMocks(); - jest.spyOn(coreSdk, 'hasTracingEnabled').mockImplementation(() => true); }); describe('withEdgeWrapping', () => { @@ -71,11 +64,11 @@ describe('withEdgeWrapping', () => { expect(captureExceptionSpy).toHaveBeenCalledTimes(1); }); - it('should return a function that starts a transaction when a request object is passed', async () => { - const startTransactionSpy = jest.spyOn(coreSdk, 'startTransaction'); + it('should return a function that calls trace', async () => { + const traceSpy = jest.spyOn(coreSdk, 'trace'); - const origFunctionReturnValue = new Response(); - const origFunction = jest.fn(_req => origFunctionReturnValue); + const request = new Request('https://sentry.io/'); + const origFunction = jest.fn(_req => new Response()); const wrappedFunction = withEdgeWrapping(origFunction, { spanDescription: 'some label', @@ -83,15 +76,18 @@ describe('withEdgeWrapping', () => { spanOp: 'some op', }); - const request = new Request('https://sentry.io/'); await wrappedFunction(request); - expect(startTransactionSpy).toHaveBeenCalledTimes(1); - expect(startTransactionSpy).toHaveBeenCalledWith( + + expect(traceSpy).toHaveBeenCalledTimes(1); + expect(traceSpy).toHaveBeenCalledWith( expect.objectContaining({ - metadata: expect.objectContaining({ source: 'route' }), + metadata: { request: { headers: {} }, source: 'route' }, name: 'some label', op: 'some op', + origin: 'auto.function.nextjs.withEdgeWrapping', }), + expect.any(Function), + expect.any(Function), ); }); diff --git a/packages/nextjs/test/edge/withSentryAPI.test.ts b/packages/nextjs/test/edge/withSentryAPI.test.ts index cd860d886826..db1fd3defab9 100644 --- a/packages/nextjs/test/edge/withSentryAPI.test.ts +++ b/packages/nextjs/test/edge/withSentryAPI.test.ts @@ -2,10 +2,6 @@ import * as coreSdk from '@sentry/core'; import { wrapApiHandlerWithSentry } from '../../src/edge'; -// The wrap* functions require the hub to have tracing extensions. This is normally called by the EdgeClient -// constructor but the client isn't used in these tests. -coreSdk.addTracingExtensions(); - // @ts-expect-error Request does not exist on type Global const origRequest = global.Request; // @ts-expect-error Response does not exist on type Global @@ -13,17 +9,23 @@ const origResponse = global.Response; // @ts-expect-error Request does not exist on type Global global.Request = class Request { - headers = { + public url: string; + + public headers = { get() { return null; }, }; - method = 'POST'; + public method = 'POST'; + + public constructor(input: string) { + this.url = input; + } }; // @ts-expect-error Response does not exist on type Global -global.Response = class Request {}; +global.Response = class Response {}; afterAll(() => { // @ts-expect-error Request does not exist on type Global @@ -32,66 +34,51 @@ afterAll(() => { global.Response = origResponse; }); -beforeEach(() => { - jest.resetAllMocks(); - jest.restoreAllMocks(); - jest.spyOn(coreSdk, 'hasTracingEnabled').mockImplementation(() => true); +const traceSpy = jest.spyOn(coreSdk, 'trace'); + +afterEach(() => { + jest.clearAllMocks(); }); describe('wrapApiHandlerWithSentry', () => { - it('should return a function that starts a transaction with the correct name when there is no active transaction and a request is being passed', async () => { - const startTransactionSpy = jest.spyOn(coreSdk, 'startTransaction'); - - const origFunctionReturnValue = new Response(); - const origFunction = jest.fn(_req => origFunctionReturnValue); + it('should return a function that calls trace', async () => { + const request = new Request('https://sentry.io/'); + const origFunction = jest.fn(_req => new Response()); const wrappedFunction = wrapApiHandlerWithSentry(origFunction, '/user/[userId]/post/[postId]'); - const request = new Request('https://sentry.io/'); await wrappedFunction(request); - expect(startTransactionSpy).toHaveBeenCalledTimes(1); - expect(startTransactionSpy).toHaveBeenCalledWith( + + expect(traceSpy).toHaveBeenCalledTimes(1); + expect(traceSpy).toHaveBeenCalledWith( expect.objectContaining({ - metadata: expect.objectContaining({ source: 'route' }), + metadata: { request: { headers: {}, method: 'POST', url: 'https://sentry.io/' }, source: 'route' }, name: 'POST /user/[userId]/post/[postId]', op: 'http.server', + origin: 'auto.function.nextjs.withEdgeWrapping', }), + expect.any(Function), + expect.any(Function), ); }); - it('should return a function that should not start a transaction when there is no active span and no request is being passed', async () => { - const startTransactionSpy = jest.spyOn(coreSdk, 'startTransaction'); - - const origFunctionReturnValue = new Response(); - const origFunction = jest.fn(() => origFunctionReturnValue); + it('should return a function that calls trace without throwing when no request is passed', async () => { + const origFunction = jest.fn(() => new Response()); const wrappedFunction = wrapApiHandlerWithSentry(origFunction, '/user/[userId]/post/[postId]'); await wrappedFunction(); - expect(startTransactionSpy).not.toHaveBeenCalled(); - }); - - it('should return a function that starts a span on the current transaction with the correct description when there is an active transaction and no request is being passed', async () => { - const testTransaction = coreSdk.startTransaction({ name: 'testTransaction' }); - coreSdk.getCurrentHub().getScope().setSpan(testTransaction); - - const startChildSpy = jest.spyOn(testTransaction, 'startChild'); - const origFunctionReturnValue = new Response(); - const origFunction = jest.fn(() => origFunctionReturnValue); - - const wrappedFunction = wrapApiHandlerWithSentry(origFunction, '/user/[userId]/post/[postId]'); - - await wrappedFunction(); - expect(startChildSpy).toHaveBeenCalledTimes(1); - expect(startChildSpy).toHaveBeenCalledWith( + expect(traceSpy).toHaveBeenCalledTimes(1); + expect(traceSpy).toHaveBeenCalledWith( expect.objectContaining({ - description: 'handler (/user/[userId]/post/[postId])', - op: 'function', + metadata: { source: 'route' }, + name: 'handler (/user/[userId]/post/[postId])', + op: 'http.server', + origin: 'auto.function.nextjs.withEdgeWrapping', }), + expect.any(Function), + expect.any(Function), ); - - testTransaction.end(); - coreSdk.getCurrentHub().getScope().setSpan(undefined); }); }); diff --git a/packages/utils/src/requestdata.ts b/packages/utils/src/requestdata.ts index 43be67f265f9..cfb9473f2595 100644 --- a/packages/utils/src/requestdata.ts +++ b/packages/utils/src/requestdata.ts @@ -374,6 +374,7 @@ function extractQueryParams( * Transforms a `Headers` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into a simple key-value dict. * The header keys will be lower case: e.g. A "Content-Type" header will be stored as "content-type". */ +// TODO(v8): Make this function return undefined when the extraction fails. export function winterCGHeadersToDict(winterCGHeaders: WebFetchHeaders): Record { const headers: Record = {}; try { From 1eb2b331b51ffa65d4ef2073b882fe73bfb2ba1e Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 28 Dec 2023 15:50:19 +0100 Subject: [PATCH 07/51] build(nx): Improve Nx setup (#9987) --- nx.json | 22 ++++++++++++---------- package.json | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/nx.json b/nx.json index da4ed2456a75..871546e98a4e 100644 --- a/nx.json +++ b/nx.json @@ -3,7 +3,14 @@ "default": { "runner": "nx/tasks-runners/default", "options": { - "cacheableOperations": ["build:bundle", "build:transpile", "build:types", "lint:eslint", "test:unit"], + "cacheableOperations": [ + "build:bundle", + "build:transpile", + "build:types", + "lint:eslint", + "test:unit", + "build:tarball" + ], "cacheDirectory": ".nxcache" } } @@ -11,7 +18,7 @@ "namedInputs": { "default": ["{projectRoot}/**/*", "sharedGlobals"], "sharedGlobals": ["{workspaceRoot}/*.js", "{workspaceRoot}/*.json"], - "production": ["default", "!{projectRoot}/test/**/*", "!{projectRoot}/**/*.md"] + "production": ["default", "!{projectRoot}/test/**/*", "!{projectRoot}/**/*.md", "!{projectRoot}/*.tgz"] }, "targetDefaults": { "build:bundle": { @@ -21,8 +28,8 @@ }, "build:tarball": { "inputs": ["production", "^production"], - "dependsOn": ["build:transpile", "build:types"], - "outputs": [] + "dependsOn": ["build:transpile", "^build:transpile", "build:types", "^build:types"], + "outputs": ["{projectRoot}/*.tgz"] }, "build:transpile": { "inputs": ["production", "^production"], @@ -32,12 +39,7 @@ "build:types": { "inputs": ["production", "^production"], "dependsOn": ["^build:types"], - "outputs": [ - "{projectRoot}/build/types", - "{projectRoot}/build/types-ts3.8", - "{projectRoot}/build/npm/types", - "{projectRoot}/build/npm/types-ts3.8" - ] + "outputs": ["{projectRoot}/build/**/*.d.ts"] }, "lint:eslint": { "inputs": ["default"], diff --git a/package.json b/package.json index e1d8309637c6..239ddb58ed84 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "scripts": { - "build": "node ./scripts/verify-packages-versions.js && run-s build:transpile build:types build:bundle", + "build": "node ./scripts/verify-packages-versions.js && lerna run build:transpile,build:types,build:bundle", "build:bundle": "lerna run build:bundle", "build:dev": "lerna run build:types,build:transpile", "build:dev:filter": "lerna run build:dev --include-filtered-dependencies --include-filtered-dependents --scope", From d0fe7edec05d6b38d477de568dd3e926464e91fa Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Thu, 28 Dec 2023 11:15:15 -0500 Subject: [PATCH 08/51] fix: enables prettier for markdown and css (#9992) Fixes https://github.com/getsentry/sentry-javascript/issues/9934 --- .vscode/extensions.json | 1 + .vscode/settings.json | 6 + docs/event-sending.md | 160 +++++++++--------- docs/gitflow.md | 11 +- docs/new-sdk-release-checklist.md | 140 ++++++++------- docs/publishing-a-release.md | 24 ++- docs/using-yalc.md | 14 +- package.json | 16 +- packages/ember/tests/dummy/app/styles/app.css | 10 +- yarn.lock | 5 + 10 files changed, 226 insertions(+), 161 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index cf9ee54f8ea5..9b4a2aa7eb87 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,6 +2,7 @@ // See http://go.microsoft.com/fwlink/?LinkId=827846 // for the documentation about the extensions.json format "recommendations": [ + "esbenp.prettier-vscode", "biomejs.biome", "dbaeumer.vscode-eslint", "augustocdias.tasks-shell-input", diff --git a/.vscode/settings.json b/.vscode/settings.json index 7835767bad18..d357aece1dd9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,6 +20,12 @@ "editor.formatOnPaste": false, "editor.formatOnSave": false }, + "[markdown]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[css]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, "yaml.schemas": { "https://json.schemastore.org/github-workflow.json": ".github/workflows/**.yml" }, diff --git a/docs/event-sending.md b/docs/event-sending.md index f014e1f2f94e..894da827508b 100644 --- a/docs/event-sending.md +++ b/docs/event-sending.md @@ -4,95 +4,95 @@ This document gives an outline for how event sending works, and which which plac ## Errors -* `hub.captureException()` - * `client.captureException()` (see baseclient) - * `checkOrSetAlreadyCaught()` - * `baseclient._process()` - * `baseclient.eventFromException()` - * `baseclient._captureEvent()` - * `baseclient._processEvent()` - * `baseclient._prepareEvent()` - * `baseclient._applyClientOptions()` - * `baseclient._applyIntegrationsMetadata()` - * `scope.applyToEvent()` - * `baseclient._normalizeEvent()` - * `baseclient._updateSessionFromEvent()` - * `baseclient.sendEvent()` - * `createEventEnvelope()` - * `getSdkMetadataForEnvelopeHeader()` - * `enhanceEventWithSdkInfo()` - * `createEventEnvelopeHeaders()` - * `createEnvelope()` - * `addItemToEnvelope()` - * `createAttachmentEnvelopeItem()` - * `baseclient._sendEnvelope()` - * `transport.send()` +- `hub.captureException()` + - `client.captureException()` (see baseclient) + - `checkOrSetAlreadyCaught()` + - `baseclient._process()` + - `baseclient.eventFromException()` + - `baseclient._captureEvent()` + - `baseclient._processEvent()` + - `baseclient._prepareEvent()` + - `baseclient._applyClientOptions()` + - `baseclient._applyIntegrationsMetadata()` + - `scope.applyToEvent()` + - `baseclient._normalizeEvent()` + - `baseclient._updateSessionFromEvent()` + - `baseclient.sendEvent()` + - `createEventEnvelope()` + - `getSdkMetadataForEnvelopeHeader()` + - `enhanceEventWithSdkInfo()` + - `createEventEnvelopeHeaders()` + - `createEnvelope()` + - `addItemToEnvelope()` + - `createAttachmentEnvelopeItem()` + - `baseclient._sendEnvelope()` + - `transport.send()` ## Transactions -* `transaction.finish()` - * `transaction.getTraceContext()` - * `transaction.getDynamicSamplingContext()` - * `hub.captureEvent()` - * `client.captureEvent()` (see baseclient) - * `checkOrSetAlreadyCaught()` - * `baseclient._process()` - * `baseclient.eventFromException()` - * `baseclient._captureEvent()` - * `baseclient._processEvent()` - * `baseclient._prepareEvent()` - * `baseclient._applyClientOptions()` - * `baseclient._applyIntegrationsMetadata()` - * `scope.applyToEvent()` - * `baseclient._normalizeEvent()` - * `baseclient._updateSessionFromEvent()` - * `baseclient.sendEvent()` - * `createEventEnvelope()` - * `getSdkMetadataForEnvelopeHeader()` - * `enhanceEventWithSdkInfo()` - * `createEventEnvelopeHeaders()` - * `createEnvelope()` - * `addItemToEnvelope()` - * `createAttachmentEnvelopeItem()` - * `baseclient._sendEnvelope()` - * `transport.send()` +- `transaction.finish()` + - `transaction.getTraceContext()` + - `transaction.getDynamicSamplingContext()` + - `hub.captureEvent()` + - `client.captureEvent()` (see baseclient) + - `checkOrSetAlreadyCaught()` + - `baseclient._process()` + - `baseclient.eventFromException()` + - `baseclient._captureEvent()` + - `baseclient._processEvent()` + - `baseclient._prepareEvent()` + - `baseclient._applyClientOptions()` + - `baseclient._applyIntegrationsMetadata()` + - `scope.applyToEvent()` + - `baseclient._normalizeEvent()` + - `baseclient._updateSessionFromEvent()` + - `baseclient.sendEvent()` + - `createEventEnvelope()` + - `getSdkMetadataForEnvelopeHeader()` + - `enhanceEventWithSdkInfo()` + - `createEventEnvelopeHeaders()` + - `createEnvelope()` + - `addItemToEnvelope()` + - `createAttachmentEnvelopeItem()` + - `baseclient._sendEnvelope()` + - `transport.send()` ## Sessions -* `hub.captureSession()` - * `hub.endSession()` - * `closeSession()` - * `hub._sendSessionUpdate()` - * `scope.setSession()` - * `hub._sendSessionUpdate()` - * `client.captureSession()` (see baseclient) - * `baseclient.sendSession()` - * `createSessionEnvelope()` - * `getSdkMetadataForEnvelopeHeader()` - * `createEnvelope()` - * `baseclient._sendEnvelope()` - * `transport.send()` - * `updateSession()` +- `hub.captureSession()` + - `hub.endSession()` + - `closeSession()` + - `hub._sendSessionUpdate()` + - `scope.setSession()` + - `hub._sendSessionUpdate()` + - `client.captureSession()` (see baseclient) + - `baseclient.sendSession()` + - `createSessionEnvelope()` + - `getSdkMetadataForEnvelopeHeader()` + - `createEnvelope()` + - `baseclient._sendEnvelope()` + - `transport.send()` + - `updateSession()` ## Replay (WIP) -* `replay.sendReplayRequest()` - * `createRecordingData()` - * `prepareReplayEvent()` - * `client._prepareEvent()` (see baseclient) - * `baseclient._applyClientOptions()` - * `baseclient._applyIntegrationsMetadata()` - * `scope.applyToEvent()` - * `baseclient._normalizeEvent()` - * `createReplayEnvelope()` - * `createEnvelope()` - * `transport.send()` +- `replay.sendReplayRequest()` + - `createRecordingData()` + - `prepareReplayEvent()` + - `client._prepareEvent()` (see baseclient) + - `baseclient._applyClientOptions()` + - `baseclient._applyIntegrationsMetadata()` + - `scope.applyToEvent()` + - `baseclient._normalizeEvent()` + - `createReplayEnvelope()` + - `createEnvelope()` + - `transport.send()` ## Client Reports -* `browser.client.constructor()` - * `browser.client._flushOutcomes()` - * `getEnvelopeEndpointWithUrlEncodedAuth()` - * `createClientReportEnvelope()` - * `baseclient._sendEnvelope()` - * `transport.send()` +- `browser.client.constructor()` + - `browser.client._flushOutcomes()` + - `getEnvelopeEndpointWithUrlEncodedAuth()` + - `createClientReportEnvelope()` + - `baseclient._sendEnvelope()` + - `transport.send()` diff --git a/docs/gitflow.md b/docs/gitflow.md index 91ac1cef1186..aa1927384d73 100644 --- a/docs/gitflow.md +++ b/docs/gitflow.md @@ -4,10 +4,11 @@ We use [Gitflow](https://docs.github.com/en/get-started/quickstart/github-flow) ## Summary -* Ongoing work happens on the `develop` branch -* Any PRs (features, ...) are implemented as PRs against `develop` -* When we are ready to release, we merge develop into master, create a release there, then merge master back into develop -* Whatever is currently on `master` can be considered the last released state of the SDK -* Never merge directly into `master` (unless we want e.g. an emergency bugfix release) +- Ongoing work happens on the `develop` branch +- Any PRs (features, ...) are implemented as PRs against `develop` +- When we are ready to release, we merge develop into master, create a release there, then merge master back into + develop +- Whatever is currently on `master` can be considered the last released state of the SDK +- Never merge directly into `master` (unless we want e.g. an emergency bugfix release) ![gitflow-chart](./assets/gitflow-chart.png) diff --git a/docs/new-sdk-release-checklist.md b/docs/new-sdk-release-checklist.md index fc7cd8be3edf..ffb101ede0fa 100644 --- a/docs/new-sdk-release-checklist.md +++ b/docs/new-sdk-release-checklist.md @@ -2,88 +2,114 @@ This page serves as a checklist of what to do when releasing a new SDK for the first time. -*This checklist was written while working on the `@sentry/svelte` Alpha 1 release. Some parts in this checklist might differ slightly for other SDKs depending on how they are structured and how they work* +_This checklist was written while working on the `@sentry/svelte` Alpha 1 release. Some parts in this checklist might +differ slightly for other SDKs depending on how they are structured and how they work_ ## Release Preparation: -- [ ] Make sure, the project is set up completely - - [ ] The package exports the necessary modules - - [ ] The package has a working unit testing environment - - [ ] The package builds correctly (inspect `/build` directory) +- [ ] Make sure, the project is set up completely -- [ ] Make sure that the `README.md` content is up to date and contains at least: - - [ ] The correct name + a brief description of the SDK - - [ ] Badges pointing to the correct (yet not existing) NPM package *(this isn’t deadly necessary but nice to have)* - - [ ] If the SDK is not yet stable, a clear message indicating that it is in alpha/beta state and that breaking changes can still occur - - [ ] A brief description how to set up and configure the SDK. If you already have docs, add a link to the docs, otherwise link to the “parent” SDK docs (e.g. `@sentry/browser`) if applicable - - [ ] Extra information (e.g. how to upload sourcemaps) + - [ ] The package exports the necessary modules + - [ ] The package has a working unit testing environment + - [ ] The package builds correctly (inspect `/build` directory) -- [ ] Make sure that the `LICENSE` file exists and has the correct license (We default to the `MIT` license) - - [ ] Also check, that the same license is mentioned in `package.json` +- [ ] Make sure that the `README.md` content is up to date and contains at least: -- [ ] Make sure that the tarball (`yarn build:tarball`) has all the necessary contents + - [ ] The correct name + a brief description of the SDK + - [ ] Badges pointing to the correct (yet not existing) NPM package _(this isn’t deadly necessary but nice to have)_ + - [ ] If the SDK is not yet stable, a clear message indicating that it is in alpha/beta state and that breaking + changes can still occur + - [ ] A brief description how to set up and configure the SDK. If you already have docs, add a link to the docs, + otherwise link to the “parent” SDK docs (e.g. `@sentry/browser`) if applicable + - [ ] Extra information (e.g. how to upload sourcemaps) - For basic SDKs, this means that the tarball has at least these files: +- [ ] Make sure that the `LICENSE` file exists and has the correct license (We default to the `MIT` license) - - [ ] `cjs/.js` - - [ ] `esm/.js` - - [ ] `types/` - - [ ] `package.json` - - [ ] Entry points registered in this file match the file structure above - - [ ] `LICENSE` - - [ ] `README.md` - - [ ] If your tarball should contain additional files outside `esm`, `cjs`, and `types` that are not listed above (e.g. like Gatsby or Remix), be sure to add a package-specific `prepack.ts` script. In this script, you can copy these additional files and make other adjustments.\ - Check out the [Gatsby script](https://github.com/getsentry/sentry-javascript/blob/acd7fbb56ed1859ce48f06a76143075108631c25/packages/gatsby/scripts/prepack.ts#L1) as an example.\ - It’s recommended to build and pack a tarball and then `yarn add path/to/tarball.tar.gz` it to your test app(s) to ensure that it has all the correct files. + - [ ] Also check, that the same license is mentioned in `package.json` -- [ ] Make sure `build.yml` CI script is correctly set up to cover tests for the new package - - [ ] Ensure dependent packages are correctly set for “Determine changed packages” - - [ ] Ensure unit tests run correctly +- [ ] Make sure that the tarball (`yarn build:tarball`) has all the necessary contents -- [ ] Make sure the file paths in the ["Upload Artifacts" job](https://github.com/getsentry/sentry-javascript/blob/e5c1486eed236b878f2c49d6a04be86093816ac9/.github/workflows/build.yml#L314-L349) in `build.yml` include your new artifacts. - - **This is especially important, if you're adding new CDN bundles!** - - Tarballs (*.tgz archives) should work OOTB + For basic SDKs, this means that the tarball has at least these files: + - [ ] `cjs/.js` + - [ ] `esm/.js` + - [ ] `types/` + - [ ] `package.json` + - [ ] Entry points registered in this file match the file structure above + - [ ] `LICENSE` + - [ ] `README.md` + - [ ] If your tarball should contain additional files outside `esm`, `cjs`, and `types` that are not listed above + (e.g. like Gatsby or Remix), be sure to add a package-specific `prepack.ts` script. In this script, you can copy + these additional files and make other adjustments.\ + Check out the + [Gatsby script](https://github.com/getsentry/sentry-javascript/blob/acd7fbb56ed1859ce48f06a76143075108631c25/packages/gatsby/scripts/prepack.ts#L1) + as an example.\ + It’s recommended to build and pack a tarball and then `yarn add path/to/tarball.tar.gz` it to your test app(s) + to ensure that it has all the correct files. -- [ ] Make sure it is added to `bundlePlugins.ts:makeTSPlugin` as `paths`, otherwise it will not be ES5 transpiled correctly for CDN builds. +- [ ] Make sure `build.yml` CI script is correctly set up to cover tests for the new package -- [ ] Make sure it is added to the [Verdaccio config](https://github.com/getsentry/sentry-javascript/blob/develop/packages/e2e-tests/verdaccio-config/config.yaml) for the E2E tests + - [ ] Ensure dependent packages are correctly set for “Determine changed packages” + - [ ] Ensure unit tests run correctly -- [ ] If the package you're adding is a dependency of fullstack framework (e.g. Remix or NextJS) SDKs, make sure that your package is added to the integration test apps' `"resolutions"` field in their `package.json`s. +- [ ] Make sure the file paths in the + ["Upload Artifacts" job](https://github.com/getsentry/sentry-javascript/blob/e5c1486eed236b878f2c49d6a04be86093816ac9/.github/workflows/build.yml#L314-L349) + in `build.yml` include your new artifacts. + + - **This is especially important, if you're adding new CDN bundles!** + - Tarballs (\*.tgz archives) should work OOTB + +- [ ] Make sure it is added to `bundlePlugins.ts:makeTSPlugin` as `paths`, otherwise it will not be ES5 transpiled + correctly for CDN builds. + +- [ ] Make sure it is added to the + [Verdaccio config](https://github.com/getsentry/sentry-javascript/blob/develop/packages/e2e-tests/verdaccio-config/config.yaml) + for the E2E tests + +- [ ] If the package you're adding is a dependency of fullstack framework (e.g. Remix or NextJS) SDKs, make sure that + your package is added to the integration test apps' `"resolutions"` field in their `package.json`s. ## Cutting the Release -When you’re ready to make the first release, there are a couple of steps that need to be performed in the **correct order**. Note that you can prepare the PRs at any time but the **merging oder** is important: +When you’re ready to make the first release, there are a couple of steps that need to be performed in the **correct +order**. Note that you can prepare the PRs at any time but the **merging oder** is important: -**All of these steps should happen when you’re committed to releasing the SDK in the *next upcoming* release**. +**All of these steps should happen when you’re committed to releasing the SDK in the _next upcoming_ release**. ### Before the Release: -- [ ] 1) If not yet done, be sure to remove the `private: true` property from your SDK’s `package.json`. Additionally, ensure that `"publishConfig": {"access": "public"}` is set. -- [ ] 2) Make sure that the new SDK is **not added** in`[craft.yml](https://github.com/getsentry/sentry-javascript/blob/develop/.craft.yml)` as a target for the **Sentry release registry**\ -*Once this is added, craft will try to publish an entry in the next release which does not work and caused failed release runs in the past* -- [ ] 3) Add an `npm` target in `craft.yml` for the new package. Make sure to insert it in the right place, after all the Sentry dependencies of your package but before packages that depend on your new package (if applicable). - ```yml - - name: npm - id: '@sentry/[yourPackage]' - includeNames: /^sentry-[yourPackage]-\d.*\.tgz$/ - ``` -- [ ] 4) Cut a new release (as usual, see [Publishing Release](https://github.com/getsentry/sentry-javascript/blob/develop/docs/publishing-a-release.md)) +- [ ] 1. If not yet done, be sure to remove the `private: true` property from your SDK’s `package.json`. Additionally, + ensure that `"publishConfig": {"access": "public"}` is set. +- [ ] 2. Make sure that the new SDK is **not added** + in`[craft.yml](https://github.com/getsentry/sentry-javascript/blob/develop/.craft.yml)` as a target for the + **Sentry release registry**\ + _Once this is added, craft will try to publish an entry in the next release which does not work and caused failed release + runs in the past_ +- [ ] 3. Add an `npm` target in `craft.yml` for the new package. Make sure to insert it in the right place, after all + the Sentry dependencies of your package but before packages that depend on your new package (if applicable). + ```yml + - name: npm + id: '@sentry/[yourPackage]' + includeNames: /^sentry-[yourPackage]-\d.*\.tgz$/ + ``` +- [ ] 4. Cut a new release (as usual, see + [Publishing Release](https://github.com/getsentry/sentry-javascript/blob/develop/docs/publishing-a-release.md)) ### After the Release -- [ ] 4) Check that the package was in fact published to NPM -- [ ] 5) Add the new SDK to the [Sentry Release Registry](https://github.com/getsentry/sentry-release-registry) \ - Instructions on how to do this can be found [here](https://github.com/getsentry/sentry-release-registry#adding-new-sdks) \ - You have to fork this repo and PR the files from your fork to the main repo \ - [Example PR](https://github.com/getsentry/sentry-release-registry/pull/80) from the Svelte SDK - -- [ ] 2) Add an entry to [craft.yml](https://github.com/getsentry/sentry-javascript/blob/develop/.craft.yml) to add releases of your SDK to the Sentry release registry \ - [Example PR](https://github.com/getsentry/sentry-javascript/pull/5547) from the Svelte SDK \ - *Subsequent releases will now be added automatically to the registry* +- [ ] 4. Check that the package was in fact published to NPM +- [ ] 5. Add the new SDK to the [Sentry Release Registry](https://github.com/getsentry/sentry-release-registry) \ + Instructions on how to do this can be found [here](https://github.com/getsentry/sentry-release-registry#adding-new-sdks) + \ + You have to fork this repo and PR the files from your fork to the main repo \ + [Example PR](https://github.com/getsentry/sentry-release-registry/pull/80) from the Svelte SDK +- [ ] 2. Add an entry to [craft.yml](https://github.com/getsentry/sentry-javascript/blob/develop/.craft.yml) to add + releases of your SDK to the Sentry release registry \ + [Example PR](https://github.com/getsentry/sentry-javascript/pull/5547) from the Svelte SDK \ + _Subsequent releases will now be added automatically to the registry_ ## Follow-up Tasks -- [ ] Monitor GH for incoming bug reports/feature requests/praises/thank you messages/marriage proposals and potatoes -- [ ] Feel good about yourself 😎 +- [ ] Monitor GH for incoming bug reports/feature requests/praises/thank you messages/marriage proposals and potatoes +- [ ] Feel good about yourself 😎 diff --git a/docs/publishing-a-release.md b/docs/publishing-a-release.md index ff94e6165ea8..ab3044529ddc 100644 --- a/docs/publishing-a-release.md +++ b/docs/publishing-a-release.md @@ -1,25 +1,31 @@ - # Publishing a Release _These steps are only relevant to Sentry employees when preparing and publishing a new SDK release._ -**If you want to release a new SDK for the first time, be sure to follow the [New SDK Release Checklist](./new-sdk-release-checklist.md)** +**If you want to release a new SDK for the first time, be sure to follow the +[New SDK Release Checklist](./new-sdk-release-checklist.md)** 1. Determine what version will be released (we use [semver](https://semver.org)). 2. Create a branch `prepare-release/VERSION`, eg. `prepare-release/7.37.0`, off develop -3. Update [`CHANGELOG.md`](https://github.com/getsentry/sentry-javascript/edit/master/CHANGELOG.md) to add an entry for the next release number and a list of changes since the last release. (See details below.) +3. Update [`CHANGELOG.md`](https://github.com/getsentry/sentry-javascript/edit/master/CHANGELOG.md) to add an entry for + the next release number and a list of changes since the last release. (See details below.) 4. Create a PR towards `master` branch -5. When the PR is merged, it will automatically trigger the [Prepare Release](https://github.com/getsentry/sentry-javascript/actions/workflows/release.yml) on master. +5. When the PR is merged, it will automatically trigger the + [Prepare Release](https://github.com/getsentry/sentry-javascript/actions/workflows/release.yml) on master. 6. A new issue should appear in https://github.com/getsentry/publish/issues. -7. Ask a member of the [@getsentry/releases team](https://github.com/orgs/getsentry/teams/releases/members) to approve the release. - a. Once the release is completed, a sync from `master` ->` develop` will be automatically triggered +7. Ask a member of the [@getsentry/releases team](https://github.com/orgs/getsentry/teams/releases/members) to approve + the release. a. Once the release is completed, a sync from `master` ->` develop` will be automatically triggered ## Updating the Changelog 1. Create a new branch `prepare-release/VERSION` off of `develop`, e.g. `prepare-release/7.37.1`. 2. Run `yarn changelog` and copy everything -3. Create a new section in the changelog, deciding based on the changes whether it should be a minor bump or a patch release. +3. Create a new section in the changelog, deciding based on the changes whether it should be a minor bump or a patch + release. 4. Paste in the logs you copied earlier. 5. Delete any which aren't user-facing changes. -7. If any of the PRs are from external contributors, include underneath the commits `Work in this release contributed by . Thank you for your contributions!`. If there's only one external PR, don't forget to remove the final `s`. If there are three or more, use an Oxford comma. (It's in the Sentry styleguide!) -8. Commit, push, and open a PR with the title `meta(changelog): Update changelog for VERSION` against `master` branch. +6. If any of the PRs are from external contributors, include underneath the commits + `Work in this release contributed by . Thank you for your contributions!`. + If there's only one external PR, don't forget to remove the final `s`. If there are three or more, use an Oxford + comma. (It's in the Sentry styleguide!) +7. Commit, push, and open a PR with the title `meta(changelog): Update changelog for VERSION` against `master` branch. diff --git a/docs/using-yalc.md b/docs/using-yalc.md index f5f4d331ecb1..2a733330f8a2 100644 --- a/docs/using-yalc.md +++ b/docs/using-yalc.md @@ -1,7 +1,8 @@ # Using `yalc` for Local SDK Testing -[Yalc](https://github.com/wclr/yalc) is a simple local dependency repository which we can use to work with local versions of our SDKs. -This is a good alternative to `npm|yarn link` for packages where linking is problematic (e.g. SvelteKit or Angular). +[Yalc](https://github.com/wclr/yalc) is a simple local dependency repository which we can use to work with local +versions of our SDKs. This is a good alternative to `npm|yarn link` for packages where linking is problematic (e.g. +SvelteKit or Angular). Here's how to set up and use yalc: @@ -25,7 +26,9 @@ Whenever you want to make your local changes available to your test projects (e. yarn yalc:publish ``` -If you run this command in the root of the repo, this will publish all SDK packages to the local yalc repo. If you run it in a specific SDK package, it will just publish this package. You **don't need to** call `yalc update` in your test project. Already linked test projects will be update automatically. +If you run this command in the root of the repo, this will publish all SDK packages to the local yalc repo. If you run +it in a specific SDK package, it will just publish this package. You **don't need to** call `yalc update` in your test +project. Already linked test projects will be update automatically. ## Using yalc packages @@ -47,5 +50,6 @@ Did you run `yarn build && yarn yalc:publish` after making your changes? ### My test project uses Vite and I still don't see changes -Vite pre-bundles and caches dependencies for dev builds. It [doesn't recognize changes in yalc packages though](https://github.com/wclr/yalc/issues/189) :( To make these changes show up anyway, run `vite dev --force`. - +Vite pre-bundles and caches dependencies for dev builds. It +[doesn't recognize changes in yalc packages though](https://github.com/wclr/yalc/issues/189) :( To make these changes +show up anyway, run `vite dev --force`. diff --git a/package.json b/package.json index 239ddb58ed84..f33d3c17e14f 100644 --- a/package.json +++ b/package.json @@ -18,14 +18,16 @@ "clean:deps": "lerna clean --yes && rm -rf node_modules && yarn", "clean:all": "run-s clean:build clean:caches clean:deps", "codecov": "codecov", - "fix": "run-p fix:lerna fix:biome", + "fix": "run-p fix:lerna fix:biome fix:prettier", "fix:lerna": "lerna run fix", "fix:biome": "biome check --apply .", + "fix:prettier": "prettier **/*.md **/*.css --write", "changelog": "ts-node ./scripts/get-commit-list.ts", "link:yarn": "lerna exec yarn link", - "lint": "run-p lint:lerna lint:biome", + "lint": "run-p lint:lerna lint:biome lint:prettier", "lint:lerna": "lerna run lint", "lint:biome": "biome check .", + "lint:prettier": "prettier **/*.md **/*.css", "validate:es5": "lerna run validate:es5", "postpublish": "lerna run --stream --concurrency 1 postpublish", "test": "lerna run --ignore \"@sentry-internal/{browser-integration-tests,e2e-tests,integration-shims,node-integration-tests,overhead-metrics}\" test", @@ -116,6 +118,7 @@ "mocha": "^6.1.4", "nodemon": "^2.0.16", "npm-run-all": "^4.1.5", + "prettier": "^3.1.1", "replace-in-file": "^4.0.0", "rimraf": "^3.0.2", "rollup": "^2.67.1", @@ -136,5 +139,12 @@ "**/terser/source-map": "0.7.4" }, "version": "0.0.0", - "name": "sentry-javascript" + "name": "sentry-javascript", + "prettier": { + "arrowParens": "avoid", + "printWidth": 120, + "proseWrap": "always", + "singleQuote": true, + "trailingComma": "all" + } } diff --git a/packages/ember/tests/dummy/app/styles/app.css b/packages/ember/tests/dummy/app/styles/app.css index 4d9686bbd61f..f926764e8b3d 100644 --- a/packages/ember/tests/dummy/app/styles/app.css +++ b/packages/ember/tests/dummy/app/styles/app.css @@ -17,7 +17,11 @@ body { background-repeat: repeat; height: 100%; margin: 0; - font-family: Rubik, Avenir Next, Helvetica Neue, sans-serif; + font-family: + Rubik, + Avenir Next, + Helvetica Neue, + sans-serif; font-size: 16px; line-height: 24px; color: var(--foreground-color); @@ -43,7 +47,9 @@ body { .box { background-color: #fff; border: 0; - box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.1); + box-shadow: + 0 0 0 1px rgba(0, 0, 0, 0.08), + 0 1px 4px rgba(0, 0, 0, 0.1); border-radius: 4px; display: flex; width: 100%; diff --git a/yarn.lock b/yarn.lock index 42e9c147cc69..57ae0e9f2357 100644 --- a/yarn.lock +++ b/yarn.lock @@ -25720,6 +25720,11 @@ prettier@^2.5.1: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== +prettier@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" + integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== + pretty-bytes@^5.3.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" From 66ea1e678819dc4ec8eb31b539825ac3e3525f95 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 28 Dec 2023 18:02:41 +0100 Subject: [PATCH 09/51] fix(astro): Handle non-utf8 encoded streams in middleware (#9989) --- packages/astro/src/server/middleware.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/server/middleware.ts b/packages/astro/src/server/middleware.ts index 7b4a02cceddf..907714d33874 100644 --- a/packages/astro/src/server/middleware.ts +++ b/packages/astro/src/server/middleware.ts @@ -162,7 +162,7 @@ async function instrumentRequest( const newResponseStream = new ReadableStream({ start: async controller => { for await (const chunk of originalBody) { - const html = typeof chunk === 'string' ? chunk : decoder.decode(chunk); + const html = typeof chunk === 'string' ? chunk : decoder.decode(chunk, { stream: true }); const modifiedHtml = addMetaTagToHead(html, scope, client, span); controller.enqueue(new TextEncoder().encode(modifiedHtml)); } From 679e149495190b682131aa1575cb96c5f4efcd2a Mon Sep 17 00:00:00 2001 From: Onur Temizkan Date: Fri, 29 Dec 2023 11:02:33 +0000 Subject: [PATCH 10/51] ref(remix): Isolate Express instrumentation from server auto-instrumentation. (#9966) --- packages/remix/src/utils/instrumentServer.ts | 37 ++++---- .../remix/src/utils/serverAdapters/express.ts | 91 +++++++++++-------- packages/remix/src/utils/vendor/types.ts | 4 +- .../integration/test/server/loader.test.ts | 4 +- packages/utils/src/requestdata.ts | 5 +- 5 files changed, 82 insertions(+), 59 deletions(-) diff --git a/packages/remix/src/utils/instrumentServer.ts b/packages/remix/src/utils/instrumentServer.ts index 90f72296d2a1..62d820a30eeb 100644 --- a/packages/remix/src/utils/instrumentServer.ts +++ b/packages/remix/src/utils/instrumentServer.ts @@ -28,6 +28,7 @@ import { } from './vendor/response'; import type { AppData, + AppLoadContext, CreateRequestHandlerFunction, DataFunction, DataFunctionArgs, @@ -46,9 +47,6 @@ import { normalizeRemixRequest } from './web-fetch'; let FUTURE_FLAGS: FutureConfig | undefined; let IS_REMIX_V2: boolean | undefined; -// Flag to track if the core request handler is instrumented. -export let isRequestHandlerWrapped = false; - const redirectStatusCodes = new Set([301, 302, 303, 307, 308]); function isRedirectResponse(response: Response): boolean { return redirectStatusCodes.has(response.status); @@ -222,8 +220,13 @@ function makeWrappedDataFunction( id: string, name: 'action' | 'loader', remixVersion: number, + manuallyInstrumented: boolean, ): DataFunction { return async function (this: unknown, args: DataFunctionArgs): Promise { + if (args.context.__sentry_express_wrapped__ && !manuallyInstrumented) { + return origFn.call(this, args); + } + let res: Response | AppData; const activeTransaction = getActiveTransaction(); const currentScope = getCurrentScope(); @@ -265,15 +268,15 @@ function makeWrappedDataFunction( } const makeWrappedAction = - (id: string, remixVersion: number) => + (id: string, remixVersion: number, manuallyInstrumented: boolean) => (origAction: DataFunction): DataFunction => { - return makeWrappedDataFunction(origAction, id, 'action', remixVersion); + return makeWrappedDataFunction(origAction, id, 'action', remixVersion, manuallyInstrumented); }; const makeWrappedLoader = - (id: string, remixVersion: number) => + (id: string, remixVersion: number, manuallyInstrumented: boolean) => (origLoader: DataFunction): DataFunction => { - return makeWrappedDataFunction(origLoader, id, 'loader', remixVersion); + return makeWrappedDataFunction(origLoader, id, 'loader', remixVersion, manuallyInstrumented); }; function getTraceAndBaggage(): { @@ -419,7 +422,13 @@ function wrapRequestHandler(origRequestHandler: RequestHandler, build: ServerBui const routes = createRoutes(build.routes); const pkg = loadModule('react-router-dom'); - return async function (this: unknown, request: RemixRequest, loadContext?: unknown): Promise { + return async function (this: unknown, request: RemixRequest, loadContext?: AppLoadContext): Promise { + // This means that the request handler of the adapter (ex: express) is already wrapped. + // So we don't want to double wrap it. + if (loadContext?.__sentry_express_wrapped__) { + return origRequestHandler.call(this, request, loadContext); + } + return runWithAsyncContext(async () => { const hub = getCurrentHub(); const options = getClient()?.getOptions(); @@ -473,7 +482,7 @@ function wrapRequestHandler(origRequestHandler: RequestHandler, build: ServerBui /** * Instruments `remix` ServerBuild for performance tracing and error tracking. */ -export function instrumentBuild(build: ServerBuild): ServerBuild { +export function instrumentBuild(build: ServerBuild, manuallyInstrumented: boolean = false): ServerBuild { const routes: ServerRouteManifest = {}; const remixVersion = getRemixVersionFromBuild(build); @@ -495,12 +504,12 @@ export function instrumentBuild(build: ServerBuild): ServerBuild { const routeAction = wrappedRoute.module.action as undefined | WrappedFunction; if (routeAction && !routeAction.__sentry_original__) { - fill(wrappedRoute.module, 'action', makeWrappedAction(id, remixVersion)); + fill(wrappedRoute.module, 'action', makeWrappedAction(id, remixVersion, manuallyInstrumented)); } const routeLoader = wrappedRoute.module.loader as undefined | WrappedFunction; if (routeLoader && !routeLoader.__sentry_original__) { - fill(wrappedRoute.module, 'loader', makeWrappedLoader(id, remixVersion)); + fill(wrappedRoute.module, 'loader', makeWrappedLoader(id, remixVersion, manuallyInstrumented)); } // Entry module should have a loader function to provide `sentry-trace` and `baggage` @@ -523,13 +532,9 @@ export function instrumentBuild(build: ServerBuild): ServerBuild { function makeWrappedCreateRequestHandler( origCreateRequestHandler: CreateRequestHandlerFunction, ): CreateRequestHandlerFunction { - // To track if this wrapper has been applied, before other wrappers. - // Can't track `__sentry_original__` because it's not the same function as the potentially manually wrapped one. - isRequestHandlerWrapped = true; - return function (this: unknown, build: ServerBuild, ...args: unknown[]): RequestHandler { FUTURE_FLAGS = getFutureFlagsServer(build); - const newBuild = instrumentBuild(build); + const newBuild = instrumentBuild(build, false); const requestHandler = origCreateRequestHandler.call(this, newBuild, ...args); return wrapRequestHandler(requestHandler, newBuild); diff --git a/packages/remix/src/utils/serverAdapters/express.ts b/packages/remix/src/utils/serverAdapters/express.ts index ea765d35a353..fd0af832c2f5 100644 --- a/packages/remix/src/utils/serverAdapters/express.ts +++ b/packages/remix/src/utils/serverAdapters/express.ts @@ -1,24 +1,20 @@ -import { getClient, getCurrentHub, getCurrentScope, hasTracingEnabled } from '@sentry/core'; +import { getClient, getCurrentHub, getCurrentScope, hasTracingEnabled, runWithAsyncContext } from '@sentry/core'; import { flush } from '@sentry/node'; import type { Transaction } from '@sentry/types'; -import { extractRequestData, isString, logger } from '@sentry/utils'; +import { extractRequestData, fill, isString, logger } from '@sentry/utils'; import { cwd } from 'process'; import { DEBUG_BUILD } from '../debug-build'; -import { - createRoutes, - getTransactionName, - instrumentBuild, - isRequestHandlerWrapped, - startRequestHandlerTransaction, -} from '../instrumentServer'; +import { createRoutes, getTransactionName, instrumentBuild, startRequestHandlerTransaction } from '../instrumentServer'; import type { + AppLoadContext, ExpressCreateRequestHandler, ExpressCreateRequestHandlerOptions, ExpressNextFunction, ExpressRequest, ExpressRequestHandler, ExpressResponse, + GetLoadContextFunction, ReactRouterDomPkg, ServerBuild, } from '../vendor/types'; @@ -31,11 +27,6 @@ function wrapExpressRequestHandler( ): ExpressRequestHandler { const routes = createRoutes(build.routes); - // If the core request handler is already wrapped, don't wrap Express handler which uses it. - if (isRequestHandlerWrapped) { - return origRequestHandler; - } - return async function ( this: unknown, req: ExpressRequest, @@ -54,33 +45,46 @@ function wrapExpressRequestHandler( } } - // eslint-disable-next-line @typescript-eslint/unbound-method - res.end = wrapEndMethod(res.end); + await runWithAsyncContext(async () => { + // eslint-disable-next-line @typescript-eslint/unbound-method + res.end = wrapEndMethod(res.end); - const request = extractRequestData(req); - const hub = getCurrentHub(); - const options = getClient()?.getOptions(); - const scope = getCurrentScope(); + const request = extractRequestData(req); + const hub = getCurrentHub(); + const options = getClient()?.getOptions(); + const scope = getCurrentScope(); - scope.setSDKProcessingMetadata({ request }); + scope.setSDKProcessingMetadata({ request }); - if (!options || !hasTracingEnabled(options) || !request.url || !request.method) { - return origRequestHandler.call(this, req, res, next); - } + if (!options || !hasTracingEnabled(options) || !request.url || !request.method) { + return origRequestHandler.call(this, req, res, next); + } - const url = new URL(request.url); - const [name, source] = getTransactionName(routes, url, pkg); - const transaction = startRequestHandlerTransaction(hub, name, source, { - headers: { - 'sentry-trace': (req.headers && isString(req.headers['sentry-trace']) && req.headers['sentry-trace']) || '', - baggage: (req.headers && isString(req.headers.baggage) && req.headers.baggage) || '', - }, - method: request.method, + const url = new URL(request.url); + + const [name, source] = getTransactionName(routes, url, pkg); + const transaction = startRequestHandlerTransaction(hub, name, source, { + headers: { + 'sentry-trace': (req.headers && isString(req.headers['sentry-trace']) && req.headers['sentry-trace']) || '', + baggage: (req.headers && isString(req.headers.baggage) && req.headers.baggage) || '', + }, + method: request.method, + }); + // save a link to the transaction on the response, so that even if there's an error (landing us outside of + // the domain), we can still finish it (albeit possibly missing some scope data) + (res as AugmentedExpressResponse).__sentryTransaction = transaction; + return origRequestHandler.call(this, req, res, next); }); - // save a link to the transaction on the response, so that even if there's an error (landing us outside of - // the domain), we can still finish it (albeit possibly missing some scope data) - (res as AugmentedExpressResponse).__sentryTransaction = transaction; - return origRequestHandler.call(this, req, res, next); + }; +} + +function wrapGetLoadContext(origGetLoadContext: () => AppLoadContext): GetLoadContextFunction { + return function (this: unknown, req: ExpressRequest, res: ExpressResponse): AppLoadContext { + const loadContext = (origGetLoadContext.call(this, req, res) || {}) as AppLoadContext; + + loadContext['__sentry_express_wrapped__'] = true; + + return loadContext; }; } @@ -92,9 +96,18 @@ export function wrapExpressCreateRequestHandler( // eslint-disable-next-line @typescript-eslint/no-explicit-any ): (options: any) => ExpressRequestHandler { // eslint-disable-next-line @typescript-eslint/no-explicit-any - return function (this: unknown, options: any): ExpressRequestHandler { - const newBuild = instrumentBuild((options as ExpressCreateRequestHandlerOptions).build); - const requestHandler = origCreateRequestHandler.call(this, { ...options, build: newBuild }); + return function (this: unknown, options: ExpressCreateRequestHandlerOptions): ExpressRequestHandler { + if (!('getLoadContext' in options)) { + options['getLoadContext'] = () => ({}); + } + + fill(options, 'getLoadContext', wrapGetLoadContext); + + const newBuild = instrumentBuild(options.build, true); + const requestHandler = origCreateRequestHandler.call(this, { + ...options, + build: newBuild, + }); return wrapExpressRequestHandler(requestHandler, newBuild); }; diff --git a/packages/remix/src/utils/vendor/types.ts b/packages/remix/src/utils/vendor/types.ts index de1a20fcbff1..c3041dd4805e 100644 --- a/packages/remix/src/utils/vendor/types.ts +++ b/packages/remix/src/utils/vendor/types.ts @@ -64,7 +64,7 @@ export type RemixRequest = Request & agent: Agent | ((parsedURL: URL) => Agent) | undefined; }; -export type AppLoadContext = any; +export type AppLoadContext = Record & { __sentry_express_wrapped__?: boolean }; export type AppData = any; export type RequestHandler = (request: RemixRequest, loadContext?: AppLoadContext) => Promise; export type CreateRequestHandlerFunction = (this: unknown, build: ServerBuild, ...args: any[]) => RequestHandler; @@ -246,4 +246,4 @@ export interface ExpressCreateRequestHandlerOptions { mode?: string; } -type GetLoadContextFunction = (req: any, res: any) => any; +export type GetLoadContextFunction = (req: any, res: any) => AppLoadContext; diff --git a/packages/remix/test/integration/test/server/loader.test.ts b/packages/remix/test/integration/test/server/loader.test.ts index 24d67422c3ca..a8a0d859e199 100644 --- a/packages/remix/test/integration/test/server/loader.test.ts +++ b/packages/remix/test/integration/test/server/loader.test.ts @@ -170,7 +170,9 @@ describe.each(['builtin', 'express'])('Remix API Loaders with adapter = %s', ada const val = key[key.length - 1]; expect(tags[key]).toEqual(val); }); - }); + // express tests tend to take slightly longer on node >= 20 + // TODO: check why this is happening + }, 10000); it('continues transaction from sentry-trace header and baggage', async () => { const env = await RemixTestEnv.init(adapter); diff --git a/packages/utils/src/requestdata.ts b/packages/utils/src/requestdata.ts index cfb9473f2595..5860932994d4 100644 --- a/packages/utils/src/requestdata.ts +++ b/packages/utils/src/requestdata.ts @@ -200,7 +200,10 @@ export function extractRequestData( // express: req.hostname in > 4 and req.host in < 4 // koa: req.host // node, nextjs: req.headers.host - const host = req.hostname || req.host || headers.host || ''; + // Express 4 mistakenly strips off port number from req.host / req.hostname so we can't rely on them + // See: https://github.com/expressjs/express/issues/3047#issuecomment-236653223 + // Also: https://github.com/getsentry/sentry-javascript/issues/1917 + const host = headers.host || req.hostname || req.host || ''; // protocol: // node, nextjs: // express, koa: req.protocol From 993044d12ae6088f8d8712e0a2c1411a185e101b Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 2 Jan 2024 11:24:15 +0100 Subject: [PATCH 11/51] feat(astro): Add `enabled` option to Astro integration options (#10007) Add a top level `enabled` option to the Astro integration options. This option can be used to globally enable/disable all Sentry features, either for client or server separately or for both sides simultaneously. * Disabeling either side will avoid the respective SDK code being injected into the bundles. * If both sides are disabled, source maps will not be generated and uploaded. * If both or just the server side is disabled, the Sentry middleware won't be added. * Obviously, this options defaults to `true` --- packages/astro/src/integration/index.ts | 53 ++++++++------ packages/astro/src/integration/types.ts | 23 +++++- packages/astro/test/integration/index.test.ts | 71 ++++++++++++++++++- 3 files changed, 122 insertions(+), 25 deletions(-) diff --git a/packages/astro/src/integration/index.ts b/packages/astro/src/integration/index.ts index 303251b9a933..34841a838983 100644 --- a/packages/astro/src/integration/index.ts +++ b/packages/astro/src/integration/index.ts @@ -24,9 +24,14 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => { // Will revisit this later. const env = process.env; - const uploadOptions = options.sourceMapsUploadOptions || {}; + const sdkEnabled = { + client: typeof options.enabled === 'boolean' ? options.enabled : options.enabled?.client ?? true, + server: typeof options.enabled === 'boolean' ? options.enabled : options.enabled?.server ?? true, + }; - const shouldUploadSourcemaps = uploadOptions?.enabled ?? true; + const sourceMapsNeeded = sdkEnabled.client || sdkEnabled.server; + const uploadOptions = options.sourceMapsUploadOptions || {}; + const shouldUploadSourcemaps = (sourceMapsNeeded && uploadOptions?.enabled) ?? true; // We don't need to check for AUTH_TOKEN here, because the plugin will pick it up from the env if (shouldUploadSourcemaps && command !== 'dev') { @@ -51,31 +56,35 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => { }); } - const pathToClientInit = options.clientInitPath - ? path.resolve(options.clientInitPath) - : findDefaultSdkInitFile('client'); - const pathToServerInit = options.serverInitPath - ? path.resolve(options.serverInitPath) - : findDefaultSdkInitFile('server'); - - if (pathToClientInit) { - options.debug && console.log(`[sentry-astro] Using ${pathToClientInit} for client init.`); - injectScript('page', buildSdkInitFileImportSnippet(pathToClientInit)); - } else { - options.debug && console.log('[sentry-astro] Using default client init.'); - injectScript('page', buildClientSnippet(options || {})); + if (sdkEnabled.client) { + const pathToClientInit = options.clientInitPath + ? path.resolve(options.clientInitPath) + : findDefaultSdkInitFile('client'); + + if (pathToClientInit) { + options.debug && console.log(`[sentry-astro] Using ${pathToClientInit} for client init.`); + injectScript('page', buildSdkInitFileImportSnippet(pathToClientInit)); + } else { + options.debug && console.log('[sentry-astro] Using default client init.'); + injectScript('page', buildClientSnippet(options || {})); + } } - if (pathToServerInit) { - options.debug && console.log(`[sentry-astro] Using ${pathToServerInit} for server init.`); - injectScript('page-ssr', buildSdkInitFileImportSnippet(pathToServerInit)); - } else { - options.debug && console.log('[sentry-astro] Using default server init.'); - injectScript('page-ssr', buildServerSnippet(options || {})); + if (sdkEnabled.server) { + const pathToServerInit = options.serverInitPath + ? path.resolve(options.serverInitPath) + : findDefaultSdkInitFile('server'); + if (pathToServerInit) { + options.debug && console.log(`[sentry-astro] Using ${pathToServerInit} for server init.`); + injectScript('page-ssr', buildSdkInitFileImportSnippet(pathToServerInit)); + } else { + options.debug && console.log('[sentry-astro] Using default server init.'); + injectScript('page-ssr', buildServerSnippet(options || {})); + } } const isSSR = config && (config.output === 'server' || config.output === 'hybrid'); - const shouldAddMiddleware = options.autoInstrumentation?.requestHandler !== false; + const shouldAddMiddleware = sdkEnabled.server && options.autoInstrumentation?.requestHandler !== false; // Guarding calling the addMiddleware function because it was only introduced in astro@3.5.0 // Users on older versions of astro will need to add the middleware manually. diff --git a/packages/astro/src/integration/types.ts b/packages/astro/src/integration/types.ts index 8c069a2516a7..6f182427ee47 100644 --- a/packages/astro/src/integration/types.ts +++ b/packages/astro/src/integration/types.ts @@ -106,6 +106,26 @@ type InstrumentationOptions = { }; }; +type SdkEnabledOptions = { + /** + * Controls if the Sentry SDK is enabled or not. + * + * You can either set a boolean value to enable/disable the SDK for both client and server, + * or pass an object with `client` and `server` properties to enable/disable the SDK. + * + * If the SDK is disabled, no data will be caught or sent to Sentry. In this case, also no + * Sentry code will be added to your bundle. + * + * @default true - the SDK is enabled by default for both, client and server. + */ + enabled?: + | boolean + | { + client?: boolean; + server?: boolean; + }; +}; + /** * A subset of Sentry SDK options that can be set via the `sentryAstro` integration. * Some options (e.g. integrations) are set by default and cannot be changed here. @@ -119,4 +139,5 @@ export type SentryOptions = SdkInitPaths & Pick & Pick & SourceMapsOptions & - InstrumentationOptions; + InstrumentationOptions & + SdkEnabledOptions; diff --git a/packages/astro/test/integration/index.test.ts b/packages/astro/test/integration/index.test.ts index 5b8be17496c0..3e95c0c932f0 100644 --- a/packages/astro/test/integration/index.test.ts +++ b/packages/astro/test/integration/index.test.ts @@ -168,8 +168,21 @@ describe('sentryAstro integration', () => { expect(sentryVitePluginSpy).toHaveBeenCalledTimes(0); }); - it('injects client and server init scripts', async () => { - const integration = sentryAstro({}); + it("doesn't add the plugin or enable source maps if the SDK is disabled", async () => { + const integration = sentryAstro({ + enabled: false, + }); + + expect(integration.hooks['astro:config:setup']).toBeDefined(); + // @ts-expect-error - the hook exists and we only need to pass what we actually use + await integration.hooks['astro:config:setup']({ updateConfig, injectScript, config }); + + expect(updateConfig).toHaveBeenCalledTimes(0); + expect(sentryVitePluginSpy).toHaveBeenCalledTimes(0); + }); + + it.each([{}, { enabled: true }])('injects client and server init scripts', async options => { + const integration = sentryAstro(options); expect(integration.hooks['astro:config:setup']).toBeDefined(); // @ts-expect-error - the hook exists and we only need to pass what we actually use @@ -180,6 +193,41 @@ describe('sentryAstro integration', () => { expect(injectScript).toHaveBeenCalledWith('page-ssr', expect.stringContaining('Sentry.init')); }); + it("doesn't inject client init script if `enabled.client` is `false`", async () => { + const integration = sentryAstro({ enabled: { client: false } }); + + expect(integration.hooks['astro:config:setup']).toBeDefined(); + // @ts-expect-error - the hook exists and we only need to pass what we actually use + await integration.hooks['astro:config:setup']({ updateConfig, injectScript, config }); + + expect(injectScript).toHaveBeenCalledTimes(1); + expect(injectScript).toHaveBeenCalledWith('page-ssr', expect.stringContaining('Sentry.init')); + }); + + it("doesn't inject server init script if `enabled.server` is `false`", async () => { + const integration = sentryAstro({ enabled: { server: false } }); + + expect(integration.hooks['astro:config:setup']).toBeDefined(); + // @ts-expect-error - the hook exists and we only need to pass what we actually use + await integration.hooks['astro:config:setup']({ updateConfig, injectScript, config }); + + expect(injectScript).toHaveBeenCalledTimes(1); + expect(injectScript).toHaveBeenCalledWith('page', expect.stringContaining('Sentry.init')); + }); + + it.each([false, { client: false, server: false }])( + "doesn't inject any init script if `enabled` is generally false (`%s`)", + async enabled => { + const integration = sentryAstro({ enabled }); + + expect(integration.hooks['astro:config:setup']).toBeDefined(); + // @ts-expect-error - the hook exists and we only need to pass what we actually use + await integration.hooks['astro:config:setup']({ updateConfig, injectScript, config }); + + expect(injectScript).toHaveBeenCalledTimes(0); + }, + ); + it('injects client and server init scripts from custom paths', async () => { const integration = sentryAstro({ clientInitPath: 'my-client-init-path.js', @@ -278,4 +326,23 @@ describe('sentryAstro integration', () => { expect(updateConfig).toHaveBeenCalledTimes(1); expect(injectScript).toHaveBeenCalledTimes(2); }); + + it("doesn't add middleware if the SDK is disabled", () => { + const integration = sentryAstro({ enabled: false }); + const addMiddleware = vi.fn(); + const updateConfig = vi.fn(); + const injectScript = vi.fn(); + + expect(integration.hooks['astro:config:setup']).toBeDefined(); + // @ts-expect-error - the hook exists and we only need to pass what we actually use + integration.hooks['astro:config:setup']({ + // @ts-expect-error - we only need to pass what we actually use + config: { output: 'server' }, + addMiddleware, + updateConfig, + injectScript, + }); + + expect(addMiddleware).toHaveBeenCalledTimes(0); + }); }); From 986641236bead5a12ff0913d138089634139c074 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 11:27:24 +0100 Subject: [PATCH 12/51] ci(deps): bump actions/upload-artifact from 3.1.3 to 4.0.0 (#10003) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.3 to 4.0.0.
Release notes

Sourced from actions/upload-artifact's releases.

v4.0.0

What's Changed

The release of upload-artifact@v4 and download-artifact@v4 are major changes to the backend architecture of Artifacts. They have numerous performance and behavioral improvements.

For more information, see the @​actions/artifact documentation.

New Contributors

Full Changelog: https://github.com/actions/upload-artifact/compare/v3...v4.0.0

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=3.1.3&new-version=4.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb2ace6e6e65..64ed24e0bf94 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -362,7 +362,7 @@ jobs: - name: Pack run: yarn build:tarball - name: Archive artifacts - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.0.0 with: name: ${{ github.sha }} path: | @@ -1008,7 +1008,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} - name: Upload results - uses: actions/upload-artifact@v3.1.3 + uses: actions/upload-artifact@v4.0.0 if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository with: name: ${{ steps.process.outputs.artifactName }} From ff95fd5367d0a9fffba129d753911cbe73255ea2 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 2 Jan 2024 13:15:02 +0100 Subject: [PATCH 13/51] build: Switch from npmignore to files field (#9991) --- .npmignore | 9 --------- packages/angular/.npmignore | 4 ---- packages/astro/.npmignore | 10 ---------- packages/astro/package.json | 6 ++++++ packages/browser/package.json | 6 ++++++ packages/bun/package.json | 6 ++++++ packages/core/package.json | 6 ++++++ packages/ember/.npmignore | 3 --- packages/eslint-config-sdk/.npmignore | 2 -- packages/eslint-config-sdk/package.json | 3 +++ packages/eslint-plugin-sdk/.npmignore | 2 -- packages/eslint-plugin-sdk/package.json | 1 + packages/feedback/package.json | 6 ++++++ packages/gatsby/.npmignore | 15 -------------- packages/gatsby/package.json | 10 ++++++++++ packages/hub/package.json | 6 ++++++ packages/integrations/package.json | 6 ++++++ packages/node-experimental/package.json | 6 ++++++ packages/node/package.json | 6 ++++++ packages/opentelemetry-node/package.json | 6 ++++++ packages/opentelemetry/package.json | 6 ++++++ packages/react/package.json | 6 ++++++ packages/remix/.npmignore | 4 ---- packages/remix/package.json | 7 +++++++ packages/replay-worker/package.json | 6 ++++++ packages/replay/package.json | 6 ++++++ packages/serverless/package.json | 6 ++++++ packages/svelte/package.json | 6 ++++++ packages/sveltekit/package.json | 6 ++++++ packages/tracing-internal/package.json | 6 ++++++ packages/tracing/package.json | 6 ++++++ packages/types/package.json | 6 ++++++ packages/typescript/.npmignore | 2 -- packages/typescript/package.json | 3 +++ packages/utils/package.json | 6 ++++++ packages/vercel-edge/package.json | 6 ++++++ packages/vue/package.json | 6 ++++++ packages/wasm/package.json | 6 ++++++ scripts/prepack.ts | 14 ++++++------- scripts/tarball-checksums.sh | 25 ------------------------ 40 files changed, 174 insertions(+), 84 deletions(-) delete mode 100644 .npmignore delete mode 100644 packages/angular/.npmignore delete mode 100644 packages/astro/.npmignore delete mode 100644 packages/eslint-config-sdk/.npmignore delete mode 100644 packages/eslint-plugin-sdk/.npmignore delete mode 100644 packages/gatsby/.npmignore delete mode 100644 packages/remix/.npmignore delete mode 100644 packages/typescript/.npmignore delete mode 100644 scripts/tarball-checksums.sh diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 6cf3cd53d7e6..000000000000 --- a/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -# The paths in this file are specified so that they align with the file structure in `./build` after this file is copied -# into it by the prepack script `scripts/prepack.ts`. - -* - -!/cjs/**/* -!/esm/**/* -!/types/**/* -!/types-ts3.8/**/* diff --git a/packages/angular/.npmignore b/packages/angular/.npmignore deleted file mode 100644 index 75ee79933841..000000000000 --- a/packages/angular/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -* -!/cjs/**/* -!/esm/**/* -!/build/types/**/* diff --git a/packages/astro/.npmignore b/packages/astro/.npmignore deleted file mode 100644 index ded80d725803..000000000000 --- a/packages/astro/.npmignore +++ /dev/null @@ -1,10 +0,0 @@ -# The paths in this file are specified so that they align with the file structure in `./build` after this file is copied -# into it by the prepack script `scripts/prepack.ts`. - -* - -!/cjs/**/* -!/esm/**/* -!/types/**/* -!/types-ts3.8/**/* -!/integration/**/* diff --git a/packages/astro/package.json b/packages/astro/package.json index a8b18e17611b..061b6bbdcac5 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -17,6 +17,12 @@ "node": ">=18.14.1" }, "type": "module", + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.client.js", "module": "build/esm/index.server.js", "browser": "build/esm/index.client.js", diff --git a/packages/browser/package.json b/packages/browser/package.json index 4acdb3713178..de646549de4d 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/npm/cjs/index.js", "module": "build/npm/esm/index.js", "types": "build/npm/types/index.d.ts", diff --git a/packages/bun/package.json b/packages/bun/package.json index 4ef078a0b26d..70a3ee56e4b8 100644 --- a/packages/bun/package.json +++ b/packages/bun/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/esm/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/core/package.json b/packages/core/package.json index 5462b3b1d301..14d7ab9f67fa 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/ember/.npmignore b/packages/ember/.npmignore index ff9862207d8e..a41abd750def 100644 --- a/packages/ember/.npmignore +++ b/packages/ember/.npmignore @@ -1,6 +1,3 @@ -# Disable rules of .npmignore in workspace root for this package -!* - # compiled output /dist/ /tmp/ diff --git a/packages/eslint-config-sdk/.npmignore b/packages/eslint-config-sdk/.npmignore deleted file mode 100644 index 8f4f62a06989..000000000000 --- a/packages/eslint-config-sdk/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!/src/**/* diff --git a/packages/eslint-config-sdk/package.json b/packages/eslint-config-sdk/package.json index 952da9e2db44..03c3ddcd2209 100644 --- a/packages/eslint-config-sdk/package.json +++ b/packages/eslint-config-sdk/package.json @@ -14,6 +14,9 @@ "engines": { "node": ">=8" }, + "files": [ + "src" + ], "main": "src/index.js", "publishConfig": { "access": "public" diff --git a/packages/eslint-plugin-sdk/.npmignore b/packages/eslint-plugin-sdk/.npmignore deleted file mode 100644 index 8f4f62a06989..000000000000 --- a/packages/eslint-plugin-sdk/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!/src/**/* diff --git a/packages/eslint-plugin-sdk/package.json b/packages/eslint-plugin-sdk/package.json index 155468970e33..cf3a96163edb 100644 --- a/packages/eslint-plugin-sdk/package.json +++ b/packages/eslint-plugin-sdk/package.json @@ -14,6 +14,7 @@ "engines": { "node": ">=8" }, + "files": ["src"], "main": "src/index.js", "publishConfig": { "access": "public" diff --git a/packages/feedback/package.json b/packages/feedback/package.json index 5e50194d340f..39e4fc7330ee 100644 --- a/packages/feedback/package.json +++ b/packages/feedback/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=12" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/npm/cjs/index.js", "module": "build/npm/esm/index.js", "types": "build/npm/types/index.d.ts", diff --git a/packages/gatsby/.npmignore b/packages/gatsby/.npmignore deleted file mode 100644 index 05a81b2542dd..000000000000 --- a/packages/gatsby/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -# The paths in this file are specified so that they align with the file structure in `./build` after this file is copied -# into it by the prepack script `scripts/prepack.ts`. - -* - -!/cjs/**/* -!/esm/**/* -!/types/**/* -!/types-ts3.8/**/* - -# Gatsby specific -!gatsby-browser.js -!gatsby-node.js -!gatsby-browser.d.ts -!gatsby-node.d.ts diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 33fdb7406da3..0e5c74d642bc 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -13,6 +13,16 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8", + "gatsby-browser.js", + "gatsby-node.js", + "gatsby-browser.d.ts", + "gatsby-node.d.ts" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/hub/package.json b/packages/hub/package.json index 1b75ff7ca666..faef7cda93f1 100644 --- a/packages/hub/package.json +++ b/packages/hub/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/integrations/package.json b/packages/integrations/package.json index 6505a33c08fc..5ffc239ac305 100644 --- a/packages/integrations/package.json +++ b/packages/integrations/package.json @@ -12,6 +12,12 @@ "publishConfig": { "access": "public" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/npm/cjs/index.js", "module": "build/npm/esm/index.js", "types": "build/npm/types/index.d.ts", diff --git a/packages/node-experimental/package.json b/packages/node-experimental/package.json index 0b9295e59943..a9e0b21aaba3 100644 --- a/packages/node-experimental/package.json +++ b/packages/node-experimental/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=14" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/node/package.json b/packages/node/package.json index 5c93f0d94bf1..071e0babec46 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/opentelemetry-node/package.json b/packages/opentelemetry-node/package.json index 893d8b618215..44f20306560e 100644 --- a/packages/opentelemetry-node/package.json +++ b/packages/opentelemetry-node/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/opentelemetry/package.json b/packages/opentelemetry/package.json index e7154a90edc1..7d9498996fca 100644 --- a/packages/opentelemetry/package.json +++ b/packages/opentelemetry/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=14" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/react/package.json b/packages/react/package.json index 7579b83bf9f8..5293414ead65 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/remix/.npmignore b/packages/remix/.npmignore deleted file mode 100644 index e1bb7e5136bd..000000000000 --- a/packages/remix/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -# The paths in this file are specified so that they align with the file structure in `./build` after this file is copied -# into it by the prepack script `scripts/prepack.ts`. - -!/scripts/**/* diff --git a/packages/remix/package.json b/packages/remix/package.json index 4a60ee77d61c..b206252c8fcb 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -12,6 +12,13 @@ "engines": { "node": ">=14" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8", + "scripts" + ], "main": "build/cjs/index.server.js", "module": "build/esm/index.server.js", "browser": "build/esm/index.client.js", diff --git a/packages/replay-worker/package.json b/packages/replay-worker/package.json index f8428075d677..23940f558472 100644 --- a/packages/replay-worker/package.json +++ b/packages/replay-worker/package.json @@ -12,6 +12,12 @@ ] } }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "sideEffects": false, "private": true, "scripts": { diff --git a/packages/replay/package.json b/packages/replay/package.json index 65089f1ed56f..665cb8b3210e 100644 --- a/packages/replay/package.json +++ b/packages/replay/package.json @@ -12,6 +12,12 @@ ] } }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "sideEffects": false, "scripts": { "build": "run-p build:transpile build:types build:bundle", diff --git a/packages/serverless/package.json b/packages/serverless/package.json index 7ce0f1b2f13e..591888375979 100644 --- a/packages/serverless/package.json +++ b/packages/serverless/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=10" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/npm/cjs/index.js", "module": "build/npm/esm/index.js", "types": "build/npm/types/index.d.ts", diff --git a/packages/svelte/package.json b/packages/svelte/package.json index b0d2f85c5b99..f77abf2a86e8 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/sveltekit/package.json b/packages/sveltekit/package.json index 391a45940e19..2037a2550836 100644 --- a/packages/sveltekit/package.json +++ b/packages/sveltekit/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=16" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.server.js", "module": "build/esm/index.server.js", "browser": "build/esm/index.client.js", diff --git a/packages/tracing-internal/package.json b/packages/tracing-internal/package.json index 7177ed989ac2..65a0431576df 100644 --- a/packages/tracing-internal/package.json +++ b/packages/tracing-internal/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/tracing/package.json b/packages/tracing/package.json index 8f5c58751592..a79725574494 100644 --- a/packages/tracing/package.json +++ b/packages/tracing/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/npm/cjs/index.js", "module": "build/npm/esm/index.js", "types": "build/npm/types/index.d.ts", diff --git a/packages/types/package.json b/packages/types/package.json index b21aaaee0e68..d148772ff61a 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/typescript/.npmignore b/packages/typescript/.npmignore deleted file mode 100644 index 457274275b7c..000000000000 --- a/packages/typescript/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!/tsconfig.json diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 4f527af3605f..2b6210de2a3d 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -10,6 +10,9 @@ "publishConfig": { "access": "public" }, + "files": [ + "tsconfig.json" + ], "peerDependencies": { "typescript": "4.9.5" }, diff --git a/packages/utils/package.json b/packages/utils/package.json index fe04f12a4cd8..9ca7925bab1d 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/vercel-edge/package.json b/packages/vercel-edge/package.json index 3d96c7f7d517..1e3f1c80d267 100644 --- a/packages/vercel-edge/package.json +++ b/packages/vercel-edge/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/vue/package.json b/packages/vue/package.json index a1189b8a87c7..c06a1ce83058 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/cjs/index.js", "module": "build/esm/index.js", "types": "build/types/index.d.ts", diff --git a/packages/wasm/package.json b/packages/wasm/package.json index 4bf7315760a9..32cb82d6a387 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -9,6 +9,12 @@ "engines": { "node": ">=8" }, + "files": [ + "cjs", + "esm", + "types", + "types-ts3.8" + ], "main": "build/npm/cjs/index.js", "module": "build/npm/esm/index.js", "types": "build/npm/types/index.d.ts", diff --git a/scripts/prepack.ts b/scripts/prepack.ts index 9118226f08e7..65cd9ddbf631 100644 --- a/scripts/prepack.ts +++ b/scripts/prepack.ts @@ -11,9 +11,9 @@ import * as path from 'path'; const NPM_BUILD_DIR = 'build/npm'; const BUILD_DIR = 'build'; -const NPM_IGNORE = fs.existsSync('.npmignore') ? '.npmignore' : '../../.npmignore'; -const ASSETS = ['README.md', 'LICENSE', 'package.json', NPM_IGNORE] as const; +const ASSETS = ['README.md', 'LICENSE', 'package.json', '.npmignore']; + const ENTRY_POINTS = ['main', 'module', 'types', 'browser'] as const; const CONDITIONAL_EXPORT_ENTRY_POINTS = ['import', 'require', ...ENTRY_POINTS] as const; const EXPORT_MAP_ENTRY_POINT = 'exports'; @@ -53,13 +53,11 @@ if (!fs.existsSync(path.resolve(buildDir))) { // copy non-code assets to build dir ASSETS.forEach(asset => { const assetPath = path.resolve(asset); - if (!fs.existsSync(assetPath)) { - console.error(`\nERROR: Asset '${asset}' does not exist.`); - process.exit(1); + if (fs.existsSync(assetPath)) { + const destinationPath = path.resolve(buildDir, path.basename(asset)); + console.log(`Copying ${path.basename(asset)} to ${path.relative('../..', destinationPath)}.`); + fs.copyFileSync(assetPath, destinationPath); } - const destinationPath = path.resolve(buildDir, path.basename(asset)); - console.log(`Copying ${path.basename(asset)} to ${path.relative('../..', destinationPath)}.`); - fs.copyFileSync(assetPath, destinationPath); }); // package.json modifications diff --git a/scripts/tarball-checksums.sh b/scripts/tarball-checksums.sh deleted file mode 100644 index 60487f9037d3..000000000000 --- a/scripts/tarball-checksums.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -# Get the directory of the script -script_dir=$(cd "$(dirname "$0")" && pwd) - -# Function to calculate SHA checksums for files -calculate_sha_checksum() { - file="$1" - # Strip the directory name from the file path - file_name=$(basename "$file") - sha_checksum=$(sha256sum "$file" | awk '{print $1}') - # Align the output - printf "%-48s: %s\n" "$file_name" "$sha_checksum" -} - -# Main function to process files recursively -process_files() { - # Find all ".tgz" files recursively - find "$script_dir/.." -type f -name "*.tgz" | while IFS= read -r file; do - calculate_sha_checksum "$file" - done -} - -# Call the main function to process files -process_files From 1953f2eaef1104d74e9fd632583acd7ebd0ba4f5 Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Tue, 2 Jan 2024 15:32:25 +0100 Subject: [PATCH 14/51] feat(node): Local variables via async inspector in node 19+ (#9962) This PR creates a new `LocalVariables` integration that uses the async inspector API. Rather than create a huge messy integration that supports both the sync (node 18) and async (node >= v19) APIs, I created a new integration and wrapped both the sync and async integrations with user facing integration that switches depending on node version. The async API doesn't require the stacking of callbacks that risks stack overflows and limits the number of frames we dare to evaluate. When we tried wrapping the sync API with promises, memory was leaked at an alarming rate! The inspector APIs are not available on all builds of Node so we have to lazily load it and catch any exceptions. I've had to use `dynamicRequire` because webpack picks up `import()` and reports missing dependency when bundling for older versions of node. --- .../LocalVariables/local-variables-caught.js | 12 +- .../LocalVariables/local-variables-caught.mjs | 12 +- .../LocalVariables/local-variables.js | 4 +- .../LocalVariables/no-local-variables.js | 4 +- packages/node/src/integrations/index.ts | 2 +- .../integrations/local-variables/common.ts | 119 +++++++ .../src/integrations/local-variables/index.ts | 21 ++ .../{ => local-variables}/inspector.d.ts | 28 ++ .../local-variables/local-variables-async.ts | 252 ++++++++++++++ .../local-variables-sync.ts} | 323 ++++++------------ .../test/integrations/localvariables.test.ts | 44 +-- packages/node/tsconfig.test.json | 2 +- 12 files changed, 565 insertions(+), 258 deletions(-) create mode 100644 packages/node/src/integrations/local-variables/common.ts create mode 100644 packages/node/src/integrations/local-variables/index.ts rename packages/node/src/integrations/{ => local-variables}/inspector.d.ts (99%) create mode 100644 packages/node/src/integrations/local-variables/local-variables-async.ts rename packages/node/src/integrations/{localvariables.ts => local-variables/local-variables-sync.ts} (59%) diff --git a/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js b/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js index e04783b9460a..08a8d81383a1 100644 --- a/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js +++ b/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js @@ -28,8 +28,10 @@ function one(name) { ty.two(name); } -try { - one('some name'); -} catch (e) { - Sentry.captureException(e); -} +setTimeout(() => { + try { + one('some name'); + } catch (e) { + Sentry.captureException(e); + } +}, 1000); diff --git a/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs b/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs index ea2c1eb2ff68..3fbf2ae69df7 100644 --- a/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs +++ b/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs @@ -30,8 +30,10 @@ function one(name) { ty.two(name); } -try { - one('some name'); -} catch (e) { - Sentry.captureException(e); -} +setTimeout(() => { + try { + one('some name'); + } catch (e) { + Sentry.captureException(e); + } +}, 1000); diff --git a/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js b/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js index 11eba49dbdba..a579a9cf5ff0 100644 --- a/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js +++ b/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js @@ -32,4 +32,6 @@ function one(name) { ty.two(name); } -one('some name'); +setTimeout(() => { + one('some name'); +}, 1000); diff --git a/packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js b/packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js index 03c9254efea8..e9f189647e1a 100644 --- a/packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js +++ b/packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js @@ -31,4 +31,6 @@ function one(name) { ty.two(name); } -one('some name'); +setTimeout(() => { + one('some name'); +}, 1000); diff --git a/packages/node/src/integrations/index.ts b/packages/node/src/integrations/index.ts index 63cf685d2bc5..92c58bbe5b8d 100644 --- a/packages/node/src/integrations/index.ts +++ b/packages/node/src/integrations/index.ts @@ -6,7 +6,7 @@ export { Modules } from './modules'; export { ContextLines } from './contextlines'; export { Context } from './context'; export { RequestData } from '@sentry/core'; -export { LocalVariables } from './localvariables'; +export { LocalVariables } from './local-variables'; export { Undici } from './undici'; export { Spotlight } from './spotlight'; export { Anr } from './anr'; diff --git a/packages/node/src/integrations/local-variables/common.ts b/packages/node/src/integrations/local-variables/common.ts new file mode 100644 index 000000000000..5e5a8170d52b --- /dev/null +++ b/packages/node/src/integrations/local-variables/common.ts @@ -0,0 +1,119 @@ +import type { StackFrame, StackParser } from '@sentry/types'; +import type { Debugger } from 'inspector'; + +export type Variables = Record; + +export type RateLimitIncrement = () => void; + +/** + * Creates a rate limiter that will call the disable callback when the rate limit is reached and the enable callback + * when a timeout has occurred. + * @param maxPerSecond Maximum number of calls per second + * @param enable Callback to enable capture + * @param disable Callback to disable capture + * @returns A function to call to increment the rate limiter count + */ +export function createRateLimiter( + maxPerSecond: number, + enable: () => void, + disable: (seconds: number) => void, +): RateLimitIncrement { + let count = 0; + let retrySeconds = 5; + let disabledTimeout = 0; + + setInterval(() => { + if (disabledTimeout === 0) { + if (count > maxPerSecond) { + retrySeconds *= 2; + disable(retrySeconds); + + // Cap at one day + if (retrySeconds > 86400) { + retrySeconds = 86400; + } + disabledTimeout = retrySeconds; + } + } else { + disabledTimeout -= 1; + + if (disabledTimeout === 0) { + enable(); + } + } + + count = 0; + }, 1_000).unref(); + + return () => { + count += 1; + }; +} + +// Add types for the exception event data +export type PausedExceptionEvent = Debugger.PausedEventDataType & { + data: { + // This contains error.stack + description: string; + }; +}; + +/** Could this be an anonymous function? */ +export function isAnonymous(name: string | undefined): boolean { + return name !== undefined && (name.length === 0 || name === '?' || name === ''); +} + +/** Do the function names appear to match? */ +export function functionNamesMatch(a: string | undefined, b: string | undefined): boolean { + return a === b || (isAnonymous(a) && isAnonymous(b)); +} + +/** Creates a unique hash from stack frames */ +export function hashFrames(frames: StackFrame[] | undefined): string | undefined { + if (frames === undefined) { + return; + } + + // Only hash the 10 most recent frames (ie. the last 10) + return frames.slice(-10).reduce((acc, frame) => `${acc},${frame.function},${frame.lineno},${frame.colno}`, ''); +} + +/** + * We use the stack parser to create a unique hash from the exception stack trace + * This is used to lookup vars when the exception passes through the event processor + */ +export function hashFromStack(stackParser: StackParser, stack: string | undefined): string | undefined { + if (stack === undefined) { + return undefined; + } + + return hashFrames(stackParser(stack, 1)); +} + +export interface FrameVariables { + function: string; + vars?: Variables; +} + +export interface Options { + /** + * Capture local variables for both caught and uncaught exceptions + * + * - When false, only uncaught exceptions will have local variables + * - When true, both caught and uncaught exceptions will have local variables. + * + * Defaults to `true`. + * + * Capturing local variables for all exceptions can be expensive since the debugger pauses for every throw to collect + * local variables. + * + * To reduce the likelihood of this feature impacting app performance or throughput, this feature is rate-limited. + * Once the rate limit is reached, local variables will only be captured for uncaught exceptions until a timeout has + * been reached. + */ + captureAllExceptions?: boolean; + /** + * Maximum number of exceptions to capture local variables for per second before rate limiting is triggered. + */ + maxExceptionsPerSecond?: number; +} diff --git a/packages/node/src/integrations/local-variables/index.ts b/packages/node/src/integrations/local-variables/index.ts new file mode 100644 index 000000000000..970eaea52719 --- /dev/null +++ b/packages/node/src/integrations/local-variables/index.ts @@ -0,0 +1,21 @@ +import { convertIntegrationFnToClass } from '@sentry/core'; +import type { IntegrationFn } from '@sentry/types'; +import { NODE_VERSION } from '../../nodeVersion'; +import type { Options } from './common'; +import { localVariablesAsync } from './local-variables-async'; +import { localVariablesSync } from './local-variables-sync'; + +const INTEGRATION_NAME = 'LocalVariables'; + +/** + * Adds local variables to exception frames + */ +const localVariables: IntegrationFn = (options: Options = {}) => { + return NODE_VERSION.major < 19 ? localVariablesSync(options) : localVariablesAsync(options); +}; + +/** + * Adds local variables to exception frames + */ +// eslint-disable-next-line deprecation/deprecation +export const LocalVariables = convertIntegrationFnToClass(INTEGRATION_NAME, localVariables); diff --git a/packages/node/src/integrations/inspector.d.ts b/packages/node/src/integrations/local-variables/inspector.d.ts similarity index 99% rename from packages/node/src/integrations/inspector.d.ts rename to packages/node/src/integrations/local-variables/inspector.d.ts index 527006910ee9..fca628d8405d 100644 --- a/packages/node/src/integrations/inspector.d.ts +++ b/packages/node/src/integrations/local-variables/inspector.d.ts @@ -3357,3 +3357,31 @@ declare module 'node:inspector' { import inspector = require('inspector'); export = inspector; } + +/** + * @types/node doesn't have a `node:inspector/promises` module, maybe because it's still experimental? + */ +declare module 'node:inspector/promises' { + /** + * Async Debugger session + */ + class Session { + constructor(); + + connect(): void; + + post(method: 'Debugger.pause' | 'Debugger.resume' | 'Debugger.enable' | 'Debugger.disable'): Promise; + post(method: 'Debugger.setPauseOnExceptions', params: Debugger.SetPauseOnExceptionsParameterType): Promise; + post( + method: 'Runtime.getProperties', + params: Runtime.GetPropertiesParameterType, + ): Promise; + + on( + event: 'Debugger.paused', + listener: (message: InspectorNotification) => void, + ): Session; + + on(event: 'Debugger.resumed', listener: () => void): Session; + } +} diff --git a/packages/node/src/integrations/local-variables/local-variables-async.ts b/packages/node/src/integrations/local-variables/local-variables-async.ts new file mode 100644 index 000000000000..c3072c6c3f11 --- /dev/null +++ b/packages/node/src/integrations/local-variables/local-variables-async.ts @@ -0,0 +1,252 @@ +import type { Session } from 'node:inspector/promises'; +import { convertIntegrationFnToClass } from '@sentry/core'; +import type { Event, Exception, IntegrationFn, StackParser } from '@sentry/types'; +import { LRUMap, dynamicRequire, logger } from '@sentry/utils'; +import type { Debugger, InspectorNotification, Runtime } from 'inspector'; + +import type { NodeClient } from '../../client'; +import type { NodeClientOptions } from '../../types'; +import type { FrameVariables, Options, PausedExceptionEvent, RateLimitIncrement, Variables } from './common'; +import { createRateLimiter, functionNamesMatch, hashFrames, hashFromStack } from './common'; + +async function unrollArray(session: Session, objectId: string, name: string, vars: Variables): Promise { + const properties: Runtime.GetPropertiesReturnType = await session.post('Runtime.getProperties', { + objectId, + ownProperties: true, + }); + + vars[name] = properties.result + .filter(v => v.name !== 'length' && !isNaN(parseInt(v.name, 10))) + .sort((a, b) => parseInt(a.name, 10) - parseInt(b.name, 10)) + .map(v => v.value?.value); +} + +async function unrollObject(session: Session, objectId: string, name: string, vars: Variables): Promise { + const properties: Runtime.GetPropertiesReturnType = await session.post('Runtime.getProperties', { + objectId, + ownProperties: true, + }); + + vars[name] = properties.result + .map<[string, unknown]>(v => [v.name, v.value?.value]) + .reduce((obj, [key, val]) => { + obj[key] = val; + return obj; + }, {} as Variables); +} + +function unrollOther(prop: Runtime.PropertyDescriptor, vars: Variables): void { + if (prop?.value?.value) { + vars[prop.name] = prop.value.value; + } else if (prop?.value?.description && prop?.value?.type !== 'function') { + vars[prop.name] = `<${prop.value.description}>`; + } +} + +async function getLocalVariables(session: Session, objectId: string): Promise { + const properties: Runtime.GetPropertiesReturnType = await session.post('Runtime.getProperties', { + objectId, + ownProperties: true, + }); + const variables = {}; + + for (const prop of properties.result) { + if (prop?.value?.objectId && prop?.value.className === 'Array') { + const id = prop.value.objectId; + await unrollArray(session, id, prop.name, variables); + } else if (prop?.value?.objectId && prop?.value?.className === 'Object') { + const id = prop.value.objectId; + await unrollObject(session, id, prop.name, variables); + } else if (prop?.value?.value || prop?.value?.description) { + unrollOther(prop, variables); + } + } + + return variables; +} + +const INTEGRATION_NAME = 'LocalVariablesAsync'; + +/** + * Adds local variables to exception frames + */ +export const localVariablesAsync: IntegrationFn = (options: Options = {}) => { + const cachedFrames: LRUMap = new LRUMap(20); + let rateLimiter: RateLimitIncrement | undefined; + let shouldProcessEvent = false; + + async function handlePaused( + session: Session, + stackParser: StackParser, + { reason, data, callFrames }: PausedExceptionEvent, + ): Promise { + if (reason !== 'exception' && reason !== 'promiseRejection') { + return; + } + + rateLimiter?.(); + + // data.description contains the original error.stack + const exceptionHash = hashFromStack(stackParser, data?.description); + + if (exceptionHash == undefined) { + return; + } + + const frames = []; + + for (let i = 0; i < callFrames.length; i++) { + const { scopeChain, functionName, this: obj } = callFrames[i]; + + const localScope = scopeChain.find(scope => scope.type === 'local'); + + // obj.className is undefined in ESM modules + const fn = obj.className === 'global' || !obj.className ? functionName : `${obj.className}.${functionName}`; + + if (localScope?.object.objectId === undefined) { + frames[i] = { function: fn }; + } else { + const vars = await getLocalVariables(session, localScope.object.objectId); + frames[i] = { function: fn, vars }; + } + } + + cachedFrames.set(exceptionHash, frames); + } + + async function startDebugger(session: Session, clientOptions: NodeClientOptions): Promise { + session.connect(); + + let isPaused = false; + + session.on('Debugger.resumed', () => { + isPaused = false; + }); + + session.on('Debugger.paused', (event: InspectorNotification) => { + isPaused = true; + + handlePaused(session, clientOptions.stackParser, event.params as PausedExceptionEvent).then( + () => { + // After the pause work is complete, resume execution! + return isPaused ? session.post('Debugger.resume') : Promise.resolve(); + }, + _ => { + // ignore + }, + ); + }); + + await session.post('Debugger.enable'); + + const captureAll = options.captureAllExceptions !== false; + await session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' }); + + if (captureAll) { + const max = options.maxExceptionsPerSecond || 50; + + rateLimiter = createRateLimiter( + max, + () => { + logger.log('Local variables rate-limit lifted.'); + return session.post('Debugger.setPauseOnExceptions', { state: 'all' }); + }, + seconds => { + logger.log( + `Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${seconds} seconds.`, + ); + return session.post('Debugger.setPauseOnExceptions', { state: 'uncaught' }); + }, + ); + } + + shouldProcessEvent = true; + } + + function addLocalVariablesToException(exception: Exception): void { + const hash = hashFrames(exception.stacktrace?.frames); + + if (hash === undefined) { + return; + } + + // Check if we have local variables for an exception that matches the hash + // remove is identical to get but also removes the entry from the cache + const cachedFrame = cachedFrames.remove(hash); + + if (cachedFrame === undefined) { + return; + } + + const frameCount = exception.stacktrace?.frames?.length || 0; + + for (let i = 0; i < frameCount; i++) { + // Sentry frames are in reverse order + const frameIndex = frameCount - i - 1; + + // Drop out if we run out of frames to match up + if (!exception.stacktrace?.frames?.[frameIndex] || !cachedFrame[i]) { + break; + } + + if ( + // We need to have vars to add + cachedFrame[i].vars === undefined || + // We're not interested in frames that are not in_app because the vars are not relevant + exception.stacktrace.frames[frameIndex].in_app === false || + // The function names need to match + !functionNamesMatch(exception.stacktrace.frames[frameIndex].function, cachedFrame[i].function) + ) { + continue; + } + + exception.stacktrace.frames[frameIndex].vars = cachedFrame[i].vars; + } + } + + function addLocalVariablesToEvent(event: Event): Event { + for (const exception of event.exception?.values || []) { + addLocalVariablesToException(exception); + } + + return event; + } + + return { + name: INTEGRATION_NAME, + setup(client: NodeClient) { + const clientOptions = client.getOptions(); + + if (!clientOptions.includeLocalVariables) { + return; + } + + try { + // TODO: Use import()... + // It would be nice to use import() here, but this built-in library is not in Node <19 so webpack will pick it + // up and report it as a missing dependency + const { Session } = dynamicRequire(module, 'node:inspector/promises'); + + startDebugger(new Session(), clientOptions).catch(e => { + logger.error('Failed to start inspector session', e); + }); + } catch (e) { + logger.error('Failed to load inspector API', e); + return; + } + }, + processEvent(event: Event): Event { + if (shouldProcessEvent) { + return addLocalVariablesToEvent(event); + } + + return event; + }, + }; +}; + +/** + * Adds local variables to exception frames + */ +// eslint-disable-next-line deprecation/deprecation +export const LocalVariablesAsync = convertIntegrationFnToClass(INTEGRATION_NAME, localVariablesAsync); diff --git a/packages/node/src/integrations/localvariables.ts b/packages/node/src/integrations/local-variables/local-variables-sync.ts similarity index 59% rename from packages/node/src/integrations/localvariables.ts rename to packages/node/src/integrations/local-variables/local-variables-sync.ts index f1a410501b4e..d2b988cca1e9 100644 --- a/packages/node/src/integrations/localvariables.ts +++ b/packages/node/src/integrations/local-variables/local-variables-sync.ts @@ -1,12 +1,14 @@ /* eslint-disable max-lines */ -import type { Event, EventProcessor, Exception, Hub, Integration, StackFrame, StackParser } from '@sentry/types'; +import { convertIntegrationFnToClass } from '@sentry/core'; +import type { Event, Exception, IntegrationFn, StackParser } from '@sentry/types'; import { LRUMap, logger } from '@sentry/utils'; import type { Debugger, InspectorNotification, Runtime, Session } from 'inspector'; -import type { NodeClient } from '../client'; +import type { NodeClient } from '../../client'; -import { NODE_VERSION } from '../nodeVersion'; +import { NODE_VERSION } from '../../nodeVersion'; +import type { FrameVariables, Options, PausedExceptionEvent, RateLimitIncrement, Variables } from './common'; +import { createRateLimiter, functionNamesMatch, hashFrames, hashFromStack } from './common'; -type Variables = Record; type OnPauseEvent = InspectorNotification; export interface DebugSession { /** Configures and connects to the debug session */ @@ -21,52 +23,6 @@ type Next = (result: T) => void; type Add = (fn: Next) => void; type CallbackWrapper = { add: Add; next: Next }; -type RateLimitIncrement = () => void; - -/** - * Creates a rate limiter - * @param maxPerSecond Maximum number of calls per second - * @param enable Callback to enable capture - * @param disable Callback to disable capture - * @returns A function to call to increment the rate limiter count - */ -export function createRateLimiter( - maxPerSecond: number, - enable: () => void, - disable: (seconds: number) => void, -): RateLimitIncrement { - let count = 0; - let retrySeconds = 5; - let disabledTimeout = 0; - - setInterval(() => { - if (disabledTimeout === 0) { - if (count > maxPerSecond) { - retrySeconds *= 2; - disable(retrySeconds); - - // Cap at one day - if (retrySeconds > 86400) { - retrySeconds = 86400; - } - disabledTimeout = retrySeconds; - } - } else { - disabledTimeout -= 1; - - if (disabledTimeout === 0) { - enable(); - } - } - - count = 0; - }, 1_000).unref(); - - return () => { - count += 1; - }; -} - /** Creates a container for callbacks to be called sequentially */ export function createCallbackList(complete: Next): CallbackWrapper { // A collection of callbacks to be executed last to first @@ -252,157 +208,20 @@ function tryNewAsyncSession(): AsyncSession | undefined { } } -// Add types for the exception event data -type PausedExceptionEvent = Debugger.PausedEventDataType & { - data: { - // This contains error.stack - description: string; - }; -}; - -/** Could this be an anonymous function? */ -function isAnonymous(name: string | undefined): boolean { - return name !== undefined && ['', '?', ''].includes(name); -} - -/** Do the function names appear to match? */ -function functionNamesMatch(a: string | undefined, b: string | undefined): boolean { - return a === b || (isAnonymous(a) && isAnonymous(b)); -} - -/** Creates a unique hash from stack frames */ -function hashFrames(frames: StackFrame[] | undefined): string | undefined { - if (frames === undefined) { - return; - } - - // Only hash the 10 most recent frames (ie. the last 10) - return frames.slice(-10).reduce((acc, frame) => `${acc},${frame.function},${frame.lineno},${frame.colno}`, ''); -} - -/** - * We use the stack parser to create a unique hash from the exception stack trace - * This is used to lookup vars when the exception passes through the event processor - */ -function hashFromStack(stackParser: StackParser, stack: string | undefined): string | undefined { - if (stack === undefined) { - return undefined; - } - - return hashFrames(stackParser(stack, 1)); -} - -export interface FrameVariables { - function: string; - vars?: Variables; -} - -interface Options { - /** - * Capture local variables for both caught and uncaught exceptions - * - * - When false, only uncaught exceptions will have local variables - * - When true, both caught and uncaught exceptions will have local variables. - * - * Defaults to `true`. - * - * Capturing local variables for all exceptions can be expensive since the debugger pauses for every throw to collect - * local variables. - * - * To reduce the likelihood of this feature impacting app performance or throughput, this feature is rate-limited. - * Once the rate limit is reached, local variables will only be captured for uncaught exceptions until a timeout has - * been reached. - */ - captureAllExceptions?: boolean; - /** - * Maximum number of exceptions to capture local variables for per second before rate limiting is triggered. - */ - maxExceptionsPerSecond?: number; -} +const INTEGRATION_NAME = 'LocalVariablesSync'; /** * Adds local variables to exception frames - * - * Default: 50 */ -export class LocalVariables implements Integration { - public static id: string = 'LocalVariables'; - - public readonly name: string = LocalVariables.id; - - private readonly _cachedFrames: LRUMap = new LRUMap(20); - private _rateLimiter: RateLimitIncrement | undefined; - private _shouldProcessEvent = false; - - public constructor( - private readonly _options: Options = {}, - private readonly _session: DebugSession | undefined = tryNewAsyncSession(), - ) {} - - /** - * @inheritDoc - */ - public setupOnce(_addGlobalEventProcessor: (callback: EventProcessor) => void, _getCurrentHub: () => Hub): void { - // noop - } - - /** @inheritdoc */ - public setup(client: NodeClient): void { - const clientOptions = client.getOptions(); - - if (this._session && clientOptions.includeLocalVariables) { - // Only setup this integration if the Node version is >= v18 - // https://github.com/getsentry/sentry-javascript/issues/7697 - const unsupportedNodeVersion = NODE_VERSION.major < 18; - - if (unsupportedNodeVersion) { - logger.log('The `LocalVariables` integration is only supported on Node >= v18.'); - return; - } - - const captureAll = this._options.captureAllExceptions !== false; - - this._session.configureAndConnect( - (ev, complete) => - this._handlePaused(clientOptions.stackParser, ev as InspectorNotification, complete), - captureAll, - ); - - if (captureAll) { - const max = this._options.maxExceptionsPerSecond || 50; - - this._rateLimiter = createRateLimiter( - max, - () => { - logger.log('Local variables rate-limit lifted.'); - this._session?.setPauseOnExceptions(true); - }, - seconds => { - logger.log( - `Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${seconds} seconds.`, - ); - this._session?.setPauseOnExceptions(false); - }, - ); - } - - this._shouldProcessEvent = true; - } - } - - /** @inheritdoc */ - public processEvent(event: Event): Event { - if (this._shouldProcessEvent) { - return this._addLocalVariables(event); - } - - return event; - } - - /** - * Handle the pause event - */ - private _handlePaused( +export const localVariablesSync: IntegrationFn = ( + options: Options = {}, + session: DebugSession | undefined = tryNewAsyncSession(), +) => { + const cachedFrames: LRUMap = new LRUMap(20); + let rateLimiter: RateLimitIncrement | undefined; + let shouldProcessEvent = false; + + function handlePaused( stackParser: StackParser, { params: { reason, data, callFrames } }: InspectorNotification, complete: () => void, @@ -412,7 +231,7 @@ export class LocalVariables implements Integration { return; } - this._rateLimiter?.(); + rateLimiter?.(); // data.description contains the original error.stack const exceptionHash = hashFromStack(stackParser, data?.description); @@ -423,7 +242,7 @@ export class LocalVariables implements Integration { } const { add, next } = createCallbackList(frames => { - this._cachedFrames.set(exceptionHash, frames); + cachedFrames.set(exceptionHash, frames); complete(); }); @@ -445,7 +264,7 @@ export class LocalVariables implements Integration { } else { const id = localScope.object.objectId; add(frames => - this._session?.getLocalVariables(id, vars => { + session?.getLocalVariables(id, vars => { frames[i] = { function: fn, vars }; next(frames); }), @@ -456,21 +275,7 @@ export class LocalVariables implements Integration { next([]); } - /** - * Adds local variables event stack frames. - */ - private _addLocalVariables(event: Event): Event { - for (const exception of event?.exception?.values || []) { - this._addLocalVariablesToException(exception); - } - - return event; - } - - /** - * Adds local variables to the exception stack frames. - */ - private _addLocalVariablesToException(exception: Exception): void { + function addLocalVariablesToException(exception: Exception): void { const hash = hashFrames(exception?.stacktrace?.frames); if (hash === undefined) { @@ -479,9 +284,9 @@ export class LocalVariables implements Integration { // Check if we have local variables for an exception that matches the hash // remove is identical to get but also removes the entry from the cache - const cachedFrames = this._cachedFrames.remove(hash); + const cachedFrame = cachedFrames.remove(hash); - if (cachedFrames === undefined) { + if (cachedFrame === undefined) { return; } @@ -492,22 +297,96 @@ export class LocalVariables implements Integration { const frameIndex = frameCount - i - 1; // Drop out if we run out of frames to match up - if (!exception?.stacktrace?.frames?.[frameIndex] || !cachedFrames[i]) { + if (!exception?.stacktrace?.frames?.[frameIndex] || !cachedFrame[i]) { break; } if ( // We need to have vars to add - cachedFrames[i].vars === undefined || + cachedFrame[i].vars === undefined || // We're not interested in frames that are not in_app because the vars are not relevant exception.stacktrace.frames[frameIndex].in_app === false || // The function names need to match - !functionNamesMatch(exception.stacktrace.frames[frameIndex].function, cachedFrames[i].function) + !functionNamesMatch(exception.stacktrace.frames[frameIndex].function, cachedFrame[i].function) ) { continue; } - exception.stacktrace.frames[frameIndex].vars = cachedFrames[i].vars; + exception.stacktrace.frames[frameIndex].vars = cachedFrame[i].vars; } } -} + + function addLocalVariablesToEvent(event: Event): Event { + for (const exception of event?.exception?.values || []) { + addLocalVariablesToException(exception); + } + + return event; + } + + return { + name: INTEGRATION_NAME, + setup(client: NodeClient) { + const clientOptions = client.getOptions(); + + if (session && clientOptions.includeLocalVariables) { + // Only setup this integration if the Node version is >= v18 + // https://github.com/getsentry/sentry-javascript/issues/7697 + const unsupportedNodeVersion = NODE_VERSION.major < 18; + + if (unsupportedNodeVersion) { + logger.log('The `LocalVariables` integration is only supported on Node >= v18.'); + return; + } + + const captureAll = options.captureAllExceptions !== false; + + session.configureAndConnect( + (ev, complete) => + handlePaused(clientOptions.stackParser, ev as InspectorNotification, complete), + captureAll, + ); + + if (captureAll) { + const max = options.maxExceptionsPerSecond || 50; + + rateLimiter = createRateLimiter( + max, + () => { + logger.log('Local variables rate-limit lifted.'); + session?.setPauseOnExceptions(true); + }, + seconds => { + logger.log( + `Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${seconds} seconds.`, + ); + session?.setPauseOnExceptions(false); + }, + ); + } + + shouldProcessEvent = true; + } + }, + processEvent(event: Event): Event { + if (shouldProcessEvent) { + return addLocalVariablesToEvent(event); + } + + return event; + }, + // These are entirely for testing + _getCachedFramesCount(): number { + return cachedFrames.size; + }, + _getFirstCachedFrame(): FrameVariables[] | undefined { + return cachedFrames.values()[0]; + }, + }; +}; + +/** + * Adds local variables to exception frames + */ +// eslint-disable-next-line deprecation/deprecation +export const LocalVariablesSync = convertIntegrationFnToClass(INTEGRATION_NAME, localVariablesSync); diff --git a/packages/node/test/integrations/localvariables.test.ts b/packages/node/test/integrations/localvariables.test.ts index b5fcc051c411..94e3ecaea20a 100644 --- a/packages/node/test/integrations/localvariables.test.ts +++ b/packages/node/test/integrations/localvariables.test.ts @@ -1,9 +1,10 @@ -import type { LRUMap } from '@sentry/utils'; import type { Debugger, InspectorNotification } from 'inspector'; import { NodeClient, defaultStackParser } from '../../src'; -import type { DebugSession, FrameVariables } from '../../src/integrations/localvariables'; -import { LocalVariables, createCallbackList, createRateLimiter } from '../../src/integrations/localvariables'; +import { createRateLimiter } from '../../src/integrations/local-variables/common'; +import type { FrameVariables } from '../../src/integrations/local-variables/common'; +import type { DebugSession } from '../../src/integrations/local-variables/local-variables-sync'; +import { LocalVariablesSync, createCallbackList } from '../../src/integrations/local-variables/local-variables-sync'; import { NODE_VERSION } from '../../src/nodeVersion'; import { getDefaultNodeClientOptions } from '../../test/helper/node-client-options'; @@ -50,7 +51,8 @@ class MockDebugSession implements DebugSession { } interface LocalVariablesPrivate { - _cachedFrames: LRUMap; + _getCachedFramesCount(): number; + _getFirstCachedFrame(): FrameVariables[] | undefined; } const exceptionEvent = { @@ -156,7 +158,7 @@ describeIf(NODE_VERSION.major >= 18)('LocalVariables', () => { '-6224981551105448869.1.2': { name: 'tim' }, '-6224981551105448869.1.6': { arr: [1, 2, 3] }, }); - const localVariables = new LocalVariables({}, session); + const localVariables = new LocalVariablesSync({}, session); const options = getDefaultNodeClientOptions({ stackParser: defaultStackParser, includeLocalVariables: true, @@ -167,15 +169,15 @@ describeIf(NODE_VERSION.major >= 18)('LocalVariables', () => { client.setupIntegrations(true); const eventProcessors = client['_eventProcessors']; - const eventProcessor = eventProcessors.find(processor => processor.id === 'LocalVariables'); + const eventProcessor = eventProcessors.find(processor => processor.id === 'LocalVariablesSync'); expect(eventProcessor).toBeDefined(); await session.runPause(exceptionEvent); - expect((localVariables as unknown as LocalVariablesPrivate)._cachedFrames.size).toBe(1); + expect((localVariables as unknown as LocalVariablesPrivate)._getCachedFramesCount()).toBe(1); - const frames: FrameVariables[] = (localVariables as unknown as LocalVariablesPrivate)._cachedFrames.values()[0]; + const frames = (localVariables as unknown as LocalVariablesPrivate)._getFirstCachedFrame(); expect(frames).toBeDefined(); @@ -242,12 +244,12 @@ describeIf(NODE_VERSION.major >= 18)('LocalVariables', () => { expect(event?.exception?.values?.[0].stacktrace?.frames?.[3]?.vars).toEqual({ arr: [1, 2, 3] }); expect(event?.exception?.values?.[0].stacktrace?.frames?.[4]?.vars).toEqual({ name: 'tim' }); - expect((localVariables as unknown as LocalVariablesPrivate)._cachedFrames.size).toBe(0); + expect((localVariables as unknown as LocalVariablesPrivate)._getCachedFramesCount()).toBe(0); }); it('Only considers the first 5 frames', async () => { const session = new MockDebugSession({}); - const localVariables = new LocalVariables({}, session); + const localVariables = new LocalVariablesSync({}, session); const options = getDefaultNodeClientOptions({ stackParser: defaultStackParser, includeLocalVariables: true, @@ -259,9 +261,9 @@ describeIf(NODE_VERSION.major >= 18)('LocalVariables', () => { await session.runPause(exceptionEvent100Frames); - expect((localVariables as unknown as LocalVariablesPrivate)._cachedFrames.size).toBe(1); + expect((localVariables as unknown as LocalVariablesPrivate)._getCachedFramesCount()).toBe(1); - const frames: FrameVariables[] = (localVariables as unknown as LocalVariablesPrivate)._cachedFrames.values()[0]; + const frames = (localVariables as unknown as LocalVariablesPrivate)._getFirstCachedFrame(); expect(frames).toBeDefined(); @@ -272,7 +274,7 @@ describeIf(NODE_VERSION.major >= 18)('LocalVariables', () => { it('Should not lookup variables for non-exception reasons', async () => { const session = new MockDebugSession({}, { getLocalVariables: true }); - const localVariables = new LocalVariables({}, session); + const localVariables = new LocalVariablesSync({}, session); const options = getDefaultNodeClientOptions({ stackParser: defaultStackParser, includeLocalVariables: true, @@ -289,12 +291,12 @@ describeIf(NODE_VERSION.major >= 18)('LocalVariables', () => { await session.runPause(nonExceptionEvent); - expect((localVariables as unknown as LocalVariablesPrivate)._cachedFrames.size).toBe(0); + expect((localVariables as unknown as LocalVariablesPrivate)._getCachedFramesCount()).toBe(0); }); it('Should not initialize when disabled', async () => { const session = new MockDebugSession({}, { configureAndConnect: true }); - const localVariables = new LocalVariables({}, session); + const localVariables = new LocalVariablesSync({}, session); const options = getDefaultNodeClientOptions({ stackParser: defaultStackParser, integrations: [localVariables], @@ -304,14 +306,13 @@ describeIf(NODE_VERSION.major >= 18)('LocalVariables', () => { client.setupIntegrations(true); const eventProcessors = client['_eventProcessors']; - const eventProcessor = eventProcessors.find(processor => processor.id === 'LocalVariables'); + const eventProcessor = eventProcessors.find(processor => processor.id === 'LocalVariablesSync'); expect(eventProcessor).toBeDefined(); - expect(localVariables['_shouldProcessEvent']).toBe(false); }); it('Should not initialize when inspector not loaded', async () => { - const localVariables = new LocalVariables({}, undefined); + const localVariables = new LocalVariablesSync({}, undefined); const options = getDefaultNodeClientOptions({ stackParser: defaultStackParser, integrations: [localVariables], @@ -321,10 +322,9 @@ describeIf(NODE_VERSION.major >= 18)('LocalVariables', () => { client.setupIntegrations(true); const eventProcessors = client['_eventProcessors']; - const eventProcessor = eventProcessors.find(processor => processor.id === 'LocalVariables'); + const eventProcessor = eventProcessors.find(processor => processor.id === 'LocalVariablesSync'); expect(eventProcessor).toBeDefined(); - expect(localVariables['_shouldProcessEvent']).toBe(false); }); it('Should cache identical uncaught exception events', async () => { @@ -332,7 +332,7 @@ describeIf(NODE_VERSION.major >= 18)('LocalVariables', () => { '-6224981551105448869.1.2': { name: 'tim' }, '-6224981551105448869.1.6': { arr: [1, 2, 3] }, }); - const localVariables = new LocalVariables({}, session); + const localVariables = new LocalVariablesSync({}, session); const options = getDefaultNodeClientOptions({ stackParser: defaultStackParser, includeLocalVariables: true, @@ -348,7 +348,7 @@ describeIf(NODE_VERSION.major >= 18)('LocalVariables', () => { await session.runPause(exceptionEvent); await session.runPause(exceptionEvent); - expect((localVariables as unknown as LocalVariablesPrivate)._cachedFrames.size).toBe(1); + expect((localVariables as unknown as LocalVariablesPrivate)._getCachedFramesCount()).toBe(1); }); describe('createCallbackList', () => { diff --git a/packages/node/tsconfig.test.json b/packages/node/tsconfig.test.json index 87f6afa06b86..52333183eb70 100644 --- a/packages/node/tsconfig.test.json +++ b/packages/node/tsconfig.test.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", - "include": ["test/**/*"], + "include": ["test/**/*", "src/**/*.d.ts"], "compilerOptions": { // should include all types from `./tsconfig.json` plus types for all test frameworks used From bf9f2e6c361ce8055dc2c18a36cad2c9c2c29943 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 2 Jan 2024 15:51:04 +0100 Subject: [PATCH 15/51] chore(eslint): Add eslint rule to flag `new RegExp()` usage (#10009) Add a new eslint rule that flags the usage of `new RegExp()` constructor calls. The purpose of this rule is to make us aware of the potential danger of creating a regular expression from (end) user input. This has led to security incidents in the past. To be clear, it is perfectly okay to ignore this rule in cases where we're sure that there's no danger or where input is already escaped. --- packages/astro/src/server/meta.ts | 1 + packages/eslint-config-sdk/src/base.js | 5 ++++ packages/eslint-plugin-sdk/src/index.js | 1 + .../src/rules/no-regexp-constructor.js | 29 +++++++++++++++++++ .../pagesRouterRoutingInstrumentation.ts | 1 + .../nextjs/src/config/loaders/prefixLoader.ts | 1 + .../src/config/loaders/wrappingLoader.ts | 1 + packages/nextjs/src/config/webpack.ts | 2 +- packages/nextjs/src/edge/index.ts | 1 + packages/nextjs/src/server/index.ts | 1 + packages/sveltekit/src/server/utils.ts | 1 + packages/sveltekit/src/vite/sourceMaps.ts | 2 ++ .../src/node/integrations/express.ts | 1 + packages/utils/src/tracing.ts | 1 + 14 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 packages/eslint-plugin-sdk/src/rules/no-regexp-constructor.js diff --git a/packages/astro/src/server/meta.ts b/packages/astro/src/server/meta.ts index 7f1f544a19e6..643565e7afaa 100644 --- a/packages/astro/src/server/meta.ts +++ b/packages/astro/src/server/meta.ts @@ -73,6 +73,7 @@ export function isValidBaggageString(baggage?: string): boolean { const keyRegex = "[-!#$%&'*+.^_`|~A-Za-z0-9]+"; const valueRegex = '[!#-+-./0-9:<=>?@A-Z\\[\\]a-z{-}]+'; const spaces = '\\s*'; + // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- RegExp for readability, no user input const baggageRegex = new RegExp( `^${keyRegex}${spaces}=${spaces}${valueRegex}(${spaces},${spaces}${keyRegex}${spaces}=${spaces}${valueRegex})*$`, ); diff --git a/packages/eslint-config-sdk/src/base.js b/packages/eslint-config-sdk/src/base.js index 70f54626fbc7..2b98cb6038dd 100644 --- a/packages/eslint-config-sdk/src/base.js +++ b/packages/eslint-config-sdk/src/base.js @@ -135,6 +135,11 @@ module.exports = { '@sentry-internal/sdk/no-optional-chaining': 'error', '@sentry-internal/sdk/no-nullish-coalescing': 'error', + // We want to avoid using the RegExp constructor as it can lead to invalid or dangerous regular expressions + // if end user input is used in the constructor. It's fine to ignore this rule if it is safe to use the RegExp. + // However, we want to flag each use case so that we're aware of the potential danger. + '@sentry-internal/sdk/no-regexp-constructor': 'error', + // JSDOC comments are required for classes and methods. As we have a public facing codebase, documentation, // even if it may seems excessive at times, is important to emphasize. Turned off in tests. 'jsdoc/require-jsdoc': [ diff --git a/packages/eslint-plugin-sdk/src/index.js b/packages/eslint-plugin-sdk/src/index.js index 2798a005c277..c03a042ca836 100644 --- a/packages/eslint-plugin-sdk/src/index.js +++ b/packages/eslint-plugin-sdk/src/index.js @@ -15,5 +15,6 @@ module.exports = { 'no-eq-empty': require('./rules/no-eq-empty'), 'no-unsupported-es6-methods': require('./rules/no-unsupported-es6-methods'), 'no-class-field-initializers': require('./rules/no-class-field-initializers'), + 'no-regexp-constructor': require('./rules/no-regexp-constructor'), }, }; diff --git a/packages/eslint-plugin-sdk/src/rules/no-regexp-constructor.js b/packages/eslint-plugin-sdk/src/rules/no-regexp-constructor.js new file mode 100644 index 000000000000..f08cb68504ef --- /dev/null +++ b/packages/eslint-plugin-sdk/src/rules/no-regexp-constructor.js @@ -0,0 +1,29 @@ +'use strict'; + +/** + * This rule was created to flag usages of the RegExp constructor. + * It is fine to use `new RegExp` if it is necessary and safe to do so. + * "safe" means, that the regular expression is NOT created from unchecked or unescaped user input. + * Avoid creating regular expressions from user input, because it can lead to invalid expressions or vulnerabilities. + */ +module.exports = { + meta: { + docs: { + description: + "Avoid using `new RegExp` constructor to ensure we don't accidentally create invalid or dangerous regular expressions from user input.", + }, + schema: [], + }, + create: function (context) { + return { + NewExpression(node) { + if (node.callee.type === 'Identifier' && node.callee.name === 'RegExp') { + context.report({ + node, + message: 'Avoid using the RegExp() constructor with unsafe user input.', + }); + } + }, + }; + }, +}; diff --git a/packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts b/packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts index fae0624e7005..1e31ffaaef0c 100644 --- a/packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts +++ b/packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts @@ -252,6 +252,7 @@ function convertNextRouteToRegExp(route: string): RegExp { ) .join('/'); + // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- routeParts are from the build manifest, so no raw user input return new RegExp( `^${rejoinedRouteParts}${optionalCatchallWildcardRegex}(?:/)?$`, // optional slash at the end ); diff --git a/packages/nextjs/src/config/loaders/prefixLoader.ts b/packages/nextjs/src/config/loaders/prefixLoader.ts index 3077b3f70db0..a9ca78667b53 100644 --- a/packages/nextjs/src/config/loaders/prefixLoader.ts +++ b/packages/nextjs/src/config/loaders/prefixLoader.ts @@ -30,6 +30,7 @@ export default function prefixLoader(this: LoaderThis, userCode: // Fill in placeholders let templateCode = fs.readFileSync(templatePath).toString(); replacements.forEach(([placeholder, value]) => { + // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- user input is escaped const placeholderRegex = new RegExp(escapeStringForRegex(placeholder), 'g'); templateCode = templateCode.replace(placeholderRegex, value); }); diff --git a/packages/nextjs/src/config/loaders/wrappingLoader.ts b/packages/nextjs/src/config/loaders/wrappingLoader.ts index 3d2fd7c80bb4..dab8c767c54f 100644 --- a/packages/nextjs/src/config/loaders/wrappingLoader.ts +++ b/packages/nextjs/src/config/loaders/wrappingLoader.ts @@ -115,6 +115,7 @@ export default function wrappingLoader( // Add a slash at the beginning .replace(/(.*)/, '/$1') // Pull off the file extension + // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- not end user input .replace(new RegExp(`\\.(${pageExtensionRegex})`), '') // Any page file named `index` corresponds to root of the directory its in, URL-wise, so turn `/xyz/index` into // just `/xyz` diff --git a/packages/nextjs/src/config/webpack.ts b/packages/nextjs/src/config/webpack.ts index 0abe309c7406..75f27bb9e649 100644 --- a/packages/nextjs/src/config/webpack.ts +++ b/packages/nextjs/src/config/webpack.ts @@ -462,7 +462,7 @@ function isMatchingRule(rule: WebpackModuleRule, projectDir: string): boolean { // // The next 11 option is ugly, but thankfully 'next', 'babel', and 'loader' do appear in it in the same order as in // 'next-babel-loader', so we can use the same regex to test for both. - if (!useEntries.some(entry => entry?.loader && new RegExp('next.*(babel|swc).*loader').test(entry.loader))) { + if (!useEntries.some(entry => entry?.loader && /next.*(babel|swc).*loader/.test(entry.loader))) { return false; } diff --git a/packages/nextjs/src/edge/index.ts b/packages/nextjs/src/edge/index.ts index 5c4d39c3bdc7..310d308837d2 100644 --- a/packages/nextjs/src/edge/index.ts +++ b/packages/nextjs/src/edge/index.ts @@ -48,6 +48,7 @@ export function init(options: VercelEdgeOptions = {}): void { // Normally we would use `path.resolve` to obtain the absolute path we will strip from the stack frame to align with // the uploaded artifacts, however we don't have access to that API in edge so we need to be a bit more lax. + // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- user input is escaped const SOURCEMAP_FILENAME_REGEX = new RegExp(`.*${escapeStringForRegex(distDirAbsPath)}`); const defaultRewriteFramesIntegration = new RewriteFrames({ diff --git a/packages/nextjs/src/server/index.ts b/packages/nextjs/src/server/index.ts index f380f949ef6b..6aa9d1a0cb0e 100644 --- a/packages/nextjs/src/server/index.ts +++ b/packages/nextjs/src/server/index.ts @@ -131,6 +131,7 @@ function addServerIntegrations(options: NodeOptions): void { // nextjs always puts the build directory at the project root level, which is also where you run `next start` from, so // we can read in the project directory from the currently running process const distDirAbsPath = path.resolve(distDirName).replace(/(\/|\\)$/, ''); // We strip trailing slashes because "app:///_next" also doesn't have one + // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- user input is escaped const SOURCEMAP_FILENAME_REGEX = new RegExp(escapeStringForRegex(distDirAbsPath)); const defaultRewriteFramesIntegration = new RewriteFrames({ diff --git a/packages/sveltekit/src/server/utils.ts b/packages/sveltekit/src/server/utils.ts index 96aa53e1f9f4..de4444f28992 100644 --- a/packages/sveltekit/src/server/utils.ts +++ b/packages/sveltekit/src/server/utils.ts @@ -51,6 +51,7 @@ export function rewriteFramesIteratee(frame: StackFrame): StackFrame { let strippedFilename; if (svelteKitBuildOutDir) { strippedFilename = filename.replace( + // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- not end user input + escaped anyway new RegExp(`^.*${escapeStringForRegex(join(svelteKitBuildOutDir, 'server'))}/`), '', ); diff --git a/packages/sveltekit/src/vite/sourceMaps.ts b/packages/sveltekit/src/vite/sourceMaps.ts index a418dd0dcaa0..eea862e9d901 100644 --- a/packages/sveltekit/src/vite/sourceMaps.ts +++ b/packages/sveltekit/src/vite/sourceMaps.ts @@ -139,6 +139,7 @@ export async function makeCustomSentryVitePlugin(options?: CustomSentryVitePlugi transform: async (code, id) => { let modifiedCode = code; + // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- not end user input + escaped anyway const isServerHooksFile = new RegExp(`/${escapeStringForRegex(serverHooksFile)}(.(js|ts|mjs|mts))?`).test(id); if (isServerHooksFile) { @@ -195,6 +196,7 @@ export async function makeCustomSentryVitePlugin(options?: CustomSentryVitePlugi if (fs.existsSync(mapFile)) { const mapContent = (await fs.promises.readFile(mapFile, 'utf-8')).toString(); const cleanedMapContent = mapContent.replace( + // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- no user input + escaped anyway new RegExp(escapeStringForRegex(WRAPPED_MODULE_SUFFIX), 'gm'), '', ); diff --git a/packages/tracing-internal/src/node/integrations/express.ts b/packages/tracing-internal/src/node/integrations/express.ts index ab6451f1ec1c..d1f609bd658d 100644 --- a/packages/tracing-internal/src/node/integrations/express.ts +++ b/packages/tracing-internal/src/node/integrations/express.ts @@ -412,6 +412,7 @@ export const extractOriginalRoute = ( const orderedKeys = keys.sort((a, b) => a.offset - b.offset); // add d flag for getting indices from regexp result + // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- regexp comes from express.js const pathRegex = new RegExp(regexp, `${regexp.flags}d`); /** * use custom type cause of TS error with missing indices in RegExpExecArray diff --git a/packages/utils/src/tracing.ts b/packages/utils/src/tracing.ts index 6ad839f2b920..438af21ac744 100644 --- a/packages/utils/src/tracing.ts +++ b/packages/utils/src/tracing.ts @@ -3,6 +3,7 @@ import type { DynamicSamplingContext, PropagationContext, TraceparentData } from import { baggageHeaderToDynamicSamplingContext } from './baggage'; import { uuid4 } from './misc'; +// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- RegExp is used for readability here export const TRACEPARENT_REGEXP = new RegExp( '^[ \\t]*' + // whitespace '([0-9a-f]{32})?' + // trace_id From 2824f0865c1c19eb8af662eed71f18259d88d363 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Tue, 2 Jan 2024 16:23:49 +0100 Subject: [PATCH 16/51] build: Fix prettier lint command (#10013) It used to output all the files it processed, which lead to a very verbose console output. By using `--check` we only get files that do not match. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f33d3c17e14f..7a654c2ca2c2 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "lint": "run-p lint:lerna lint:biome lint:prettier", "lint:lerna": "lerna run lint", "lint:biome": "biome check .", - "lint:prettier": "prettier **/*.md **/*.css", + "lint:prettier": "prettier **/*.md **/*.css --check", "validate:es5": "lerna run validate:es5", "postpublish": "lerna run --stream --concurrency 1 postpublish", "test": "lerna run --ignore \"@sentry-internal/{browser-integration-tests,e2e-tests,integration-shims,node-integration-tests,overhead-metrics}\" test", From e8e6ab842c2b4ec7c674f36aeeac2fcbc87b046b Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Tue, 2 Jan 2024 16:39:35 +0100 Subject: [PATCH 17/51] fix(node): Correctly resolve module name (#10001) --- packages/node/src/module.ts | 41 +++++++++++++--------- packages/node/test/module.test.ts | 56 +++++++++++++++---------------- 2 files changed, 52 insertions(+), 45 deletions(-) diff --git a/packages/node/src/module.ts b/packages/node/src/module.ts index 6085813e6035..73364493ddb2 100644 --- a/packages/node/src/module.ts +++ b/packages/node/src/module.ts @@ -1,6 +1,5 @@ import { posix, sep } from 'path'; - -const isWindowsPlatform = sep === '\\'; +import { dirname } from '@sentry/utils'; /** normalizes Windows paths */ function normalizeWindowsPath(path: string): string { @@ -9,52 +8,62 @@ function normalizeWindowsPath(path: string): string { .replace(/\\/g, '/'); // replace all `\` instances with `/` } +// We cache this so we don't have to recompute it +let basePath: string | undefined; + +function getBasePath(): string { + if (!basePath) { + const baseDir = + require && require.main && require.main.filename ? dirname(require.main.filename) : global.process.cwd(); + basePath = `${baseDir}/`; + } + + return basePath; +} + /** Gets the module from a filename */ export function getModuleFromFilename( filename: string | undefined, - normalizeWindowsPathSeparator: boolean = isWindowsPlatform, + basePath: string = getBasePath(), + isWindows: boolean = sep === '\\', ): string | undefined { if (!filename) { return; } - const normalizedFilename = normalizeWindowsPathSeparator ? normalizeWindowsPath(filename) : filename; + const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath; + const normalizedFilename = isWindows ? normalizeWindowsPath(filename) : filename; // eslint-disable-next-line prefer-const - let { root, dir, base: basename, ext } = posix.parse(normalizedFilename); - - const base = (require && require.main && require.main.filename && dir) || global.process.cwd(); - - const normalizedBase = `${base}/`; - - // It's specifically a module - let file = basename; + let { dir, base: file, ext } = posix.parse(normalizedFilename); if (ext === '.js' || ext === '.mjs' || ext === '.cjs') { file = file.slice(0, ext.length * -1); } - if (!root && !dir) { + if (!dir) { // No dirname whatsoever dir = '.'; } - let n = dir.lastIndexOf('/node_modules/'); + let n = dir.lastIndexOf('/node_modules'); if (n > -1) { - // /node_modules/ is 14 chars return `${dir.slice(n + 14).replace(/\//g, '.')}:${file}`; } + // Let's see if it's a part of the main module // To be a part of main module, it has to share the same base n = `${dir}/`.lastIndexOf(normalizedBase, 0); - if (n === 0) { let moduleName = dir.slice(normalizedBase.length).replace(/\//g, '.'); + if (moduleName) { moduleName += ':'; } moduleName += file; + return moduleName; } + return file; } diff --git a/packages/node/test/module.test.ts b/packages/node/test/module.test.ts index 89c8878a433e..04a6a95a7888 100644 --- a/packages/node/test/module.test.ts +++ b/packages/node/test/module.test.ts @@ -1,42 +1,40 @@ import { getModuleFromFilename } from '../src/module'; -function withFilename(fn: () => void, filename: string) { - const prevFilename = require.main?.filename; - if (require.main?.filename) { - require.main.filename = filename; - } - - try { - fn(); - } finally { - if (require.main && prevFilename) { - require.main.filename = prevFilename; - } - } -} - describe('getModuleFromFilename', () => { test('Windows', () => { - withFilename(() => { - expect(getModuleFromFilename('C:\\Users\\users\\Tim\\Desktop\\node_modules\\module.js', true)).toEqual('module'); - }, 'C:\\Users\\Tim\\app.js'); + expect( + getModuleFromFilename('C:\\Users\\Tim\\node_modules\\some-dep\\module.js', 'C:\\Users\\Tim\\', true), + ).toEqual('some-dep:module'); + + expect(getModuleFromFilename('C:\\Users\\Tim\\some\\more\\feature.js', 'C:\\Users\\Tim\\', true)).toEqual( + 'some.more:feature', + ); }); test('POSIX', () => { - withFilename(() => { - expect(getModuleFromFilename('/Users/users/Tim/Desktop/node_modules/module.js')).toEqual('module'); - }, '/Users/Tim/app.js'); + expect(getModuleFromFilename('/Users/Tim/node_modules/some-dep/module.js', '/Users/Tim/')).toEqual( + 'some-dep:module', + ); + + expect(getModuleFromFilename('/Users/Tim/some/more/feature.js', '/Users/Tim/')).toEqual('some.more:feature'); + expect(getModuleFromFilename('/Users/Tim/main.js', '/Users/Tim/')).toEqual('main'); + }); + + test('.mjs', () => { + expect(getModuleFromFilename('/Users/Tim/node_modules/some-dep/module.mjs', '/Users/Tim/')).toEqual( + 'some-dep:module', + ); }); - test('POSIX .mjs', () => { - withFilename(() => { - expect(getModuleFromFilename('/Users/users/Tim/Desktop/node_modules/module.mjs')).toEqual('module'); - }, '/Users/Tim/app.js'); + test('.cjs', () => { + expect(getModuleFromFilename('/Users/Tim/node_modules/some-dep/module.cjs', '/Users/Tim/')).toEqual( + 'some-dep:module', + ); }); - test('POSIX .cjs', () => { - withFilename(() => { - expect(getModuleFromFilename('/Users/users/Tim/Desktop/node_modules/module.cjs')).toEqual('module'); - }, '/Users/Tim/app.js'); + test('node internal', () => { + expect(getModuleFromFilename('node.js', '/Users/Tim/')).toEqual('node'); + expect(getModuleFromFilename('node:internal/process/task_queues', '/Users/Tim/')).toEqual('task_queues'); + expect(getModuleFromFilename('node:internal/timers', '/Users/Tim/')).toEqual('timers'); }); }); From aeea4490a49ed2f62c383318fdd7ed913663043a Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 2 Jan 2024 16:43:52 +0100 Subject: [PATCH 18/51] meta: Remove example in browser package (#10014) --- biome.json | 1 - packages/browser/examples/README.md | 5 - packages/browser/examples/app.js | 179 --------------------------- packages/browser/examples/bundle.js | 1 - packages/browser/examples/index.html | 36 ------ 5 files changed, 222 deletions(-) delete mode 100644 packages/browser/examples/README.md delete mode 100644 packages/browser/examples/app.js delete mode 120000 packages/browser/examples/bundle.js delete mode 100644 packages/browser/examples/index.html diff --git a/biome.json b/biome.json index 52f6d6728bf4..b9faf9b2bef8 100644 --- a/biome.json +++ b/biome.json @@ -42,7 +42,6 @@ "packages/browser-integration-tests/loader-suites/**/*.js", "packages/browser-integration-tests/suites/stacktraces/**/*.js", "**/fixtures/*/*.json", - "packages/browser/examples/bundle.js", "**/*.min.js" ] }, diff --git a/packages/browser/examples/README.md b/packages/browser/examples/README.md deleted file mode 100644 index c582e5f5a371..000000000000 --- a/packages/browser/examples/README.md +++ /dev/null @@ -1,5 +0,0 @@ -Assuming `npm@>=5.2.0` is installed and `@sentry/browser` package is built locally: - -```sh -$ npx serve -S examples -``` diff --git a/packages/browser/examples/app.js b/packages/browser/examples/app.js deleted file mode 100644 index e081cc4aec14..000000000000 --- a/packages/browser/examples/app.js +++ /dev/null @@ -1,179 +0,0 @@ -// Very happy integration that'll prepend and append very happy stick figure to the message -class HappyIntegration { - constructor() { - this.name = 'HappyIntegration'; - } - - setupOnce() { - Sentry.addGlobalEventProcessor(event => { - const self = Sentry.getCurrentHub().getIntegration(HappyIntegration); - // Run the integration ONLY when it was installed on the current Hub - if (self) { - if (event.message === 'Happy Message') { - event.message = `\\o/ ${event.message} \\o/`; - } - } - return event; - }); - } -} - -function makeHappyTransport(options) { - function makeRequest(request) { - console.log( - `This is the place to implement your own sending logic. It'd get url: ${options.url} and a raw envelope:`, - request.body, - ); - - // this is where your sending logic goes - const myCustomRequest = { - body: request.body, - method: 'POST', - referrerPolicy: 'origin', - headers: options.headers, - ...options.fetchOptions, - }; - - // you define how `sendMyCustomRequest` works - const sendMyCustomRequest = r => fetch(options.url, r); - return sendMyCustomRequest(myCustomRequest).then(response => ({ - statusCode: response.status, - headers: { - 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'), - 'retry-after': response.headers.get('Retry-After'), - }, - })); - } - - // `createTransport` takes care of rate limiting and flushing - return Sentry.createTransport(options, makeRequest); -} - -Sentry.init({ - // Client's DSN. - dsn: 'https://363a337c11a64611be4845ad6e24f3ac@sentry.io/297378', - // An array of strings or regexps that'll be used to ignore specific errors based on their type/message - ignoreErrors: [/PickleRick_\d\d/, 'RangeError'], - // An array of strings or regexps that'll be used to ignore specific errors based on their origin url - denyUrls: ['external-lib.js'], - // An array of strings or regexps that'll be used to allow specific errors based on their origin url - allowUrls: ['http://localhost:3000', 'https://browser.sentry-cdn'], - // Debug mode with valuable initialization/lifecycle informations. - debug: true, - // Whether SDK should be enabled or not. - enabled: true, - // Custom integrations callback - integrations(integrations) { - return [new HappyIntegration(), ...integrations]; - }, - // A release identifier. - release: '1537345109360', - // An environment identifier. - environment: 'staging', - // Custom event transport that will be used to send things to Sentry - transport: makeHappyTransport, - // Method called for every captured event - async beforeSend(event, hint) { - // Because beforeSend and beforeBreadcrumb are async, user can fetch some data - // return a promise, or whatever he wants - // Our CustomError defined in errors.js has `someMethodAttachedToOurCustomError` - // which can mimick something like a network request to grab more detailed error info or something. - // hint is original exception that was triggered, so we check for our CustomError name - if (hint.originalException.name === 'CustomError') { - const serverData = await hint.originalException.someMethodAttachedToOurCustomError(); - event.extra = { - ...event.extra, - serverData, - }; - } - console.log(event); - return event; - }, - // Method called for every captured breadcrumb - beforeBreadcrumb(breadcrumb, hint) { - // We ignore our own logger and rest of the buttons just for presentation purposes - if (breadcrumb.message.startsWith('Sentry Logger')) return null; - if (breadcrumb.category !== 'ui.click' || hint.event.target.id !== 'breadcrumb-hint') return null; - - // If we have a `ui.click` type of breadcrumb, eg. clicking on a button we defined in index.html - // We will extract a `data-label` attribute from it and use it as a part of the message - if (breadcrumb.category === 'ui.click') { - const label = hint.event.target.dataset.label; - if (label) { - breadcrumb.message = `User clicked on a button with label "${label}"`; - } - } - console.log(breadcrumb); - return breadcrumb; - }, -}); - -// Testing code, irrelevant vvvvv - -document.addEventListener('DOMContentLoaded', () => { - document.querySelector('#deny-url').addEventListener('click', () => { - const script = document.createElement('script'); - script.crossOrigin = 'anonymous'; - script.src = - 'https://rawgit.com/kamilogorek/cfbe9f92196c6c61053b28b2d42e2f5d/raw/3aef6ff5e2fd2ad4a84205cd71e2496a445ebe1d/external-lib.js'; - document.body.appendChild(script); - }); - - document.querySelector('#allow-url').addEventListener('click', () => { - const script = document.createElement('script'); - script.crossOrigin = 'anonymous'; - script.src = - 'https://rawgit.com/kamilogorek/cb67dafbd0e12b782bdcc1fbcaed2b87/raw/3aef6ff5e2fd2ad4a84205cd71e2496a445ebe1d/lib.js'; - document.body.appendChild(script); - }); - - document.querySelector('#ignore-message').addEventListener('click', () => { - throw new Error('Exception that will be ignored because of this keyword => PickleRick_42 <='); - }); - - document.querySelector('#ignore-type').addEventListener('click', () => { - throw new RangeError("Exception that will be ignored because of it's type"); - }); - - document.querySelector('#regular-exception').addEventListener('click', () => { - throw new Error(`Regular exception no. ${Date.now()}`); - }); - - document.querySelector('#capture-exception').addEventListener('click', () => { - Sentry.captureException(new Error(`captureException call no. ${Date.now()}`)); - }); - - document.querySelector('#capture-message').addEventListener('click', () => { - Sentry.captureMessage(`captureMessage call no. ${Date.now()}`); - }); - - document.querySelector('#duplicate-exception').addEventListener('click', () => { - Sentry.captureException(new Error('duplicated exception')); - }); - - document.querySelector('#duplicate-message').addEventListener('click', () => { - Sentry.captureMessage('duplicate captureMessage'); - }); - - document.querySelector('#integration-example').addEventListener('click', () => { - Sentry.captureMessage('Happy Message'); - }); - - document.querySelector('#exception-hint').addEventListener('click', () => { - class CustomError extends Error { - constructor(...args) { - super(...args); - this.name = 'CustomError'; - } - someMethodAttachedToOurCustomError() { - return new Promise(resolve => { - resolve('some data, who knows what exactly'); - }); - } - } - - throw new CustomError('Hey there'); - }); - - document.querySelector('#breadcrumb-hint').addEventListener('click', () => {}); -}); diff --git a/packages/browser/examples/bundle.js b/packages/browser/examples/bundle.js deleted file mode 120000 index d552ceb5ed2f..000000000000 --- a/packages/browser/examples/bundle.js +++ /dev/null @@ -1 +0,0 @@ -../build/bundles/bundle.js \ No newline at end of file diff --git a/packages/browser/examples/index.html b/packages/browser/examples/index.html deleted file mode 100644 index 20d9529b5d2f..000000000000 --- a/packages/browser/examples/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - @sentry/browser SDK examples - - - - - - - - - - - - - - - - - - - From 2272c288dd6e6d53cb81d962823ed0d73444d0cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 16:31:44 +0000 Subject: [PATCH 19/51] feat(deps): bump @sentry/cli from 2.23.0 to 2.23.2 (#10015) --- yarn.lock | 207 +++++++++++++++--------------------------------------- 1 file changed, 57 insertions(+), 150 deletions(-) diff --git a/yarn.lock b/yarn.lock index 57ae0e9f2357..48857bd5a97d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5292,55 +5292,42 @@ magic-string "0.27.0" unplugin "1.0.1" -"@sentry/cli-darwin@2.23.0": - version "2.23.0" - resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.23.0.tgz#1a4f149071a77f2e767a9cd7997b0b9257eae59f" - integrity sha512-tWuTxvb6P5pA0E+O1/7jKQ6AP45DOOW+BAd7mwBMHZ+5xG3nsvvrRS9hOIzBNPTeB2RyIEXgpQ2Mb6NdD21DBQ== - -"@sentry/cli-linux-arm64@2.23.0": - version "2.23.0" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.23.0.tgz#f3f154dc9ee68b4c3e6386ececb7c4b7dbe6cdbe" - integrity sha512-KsOckP+b0xAzrRuoP4eiqJ6ASD6SqIplL8BCHOAODQfvWn9rgNwsJWOgKlWwfrJnkJYkpWVYvYeyx0oeUx3N0g== - -"@sentry/cli-linux-arm@2.23.0": - version "2.23.0" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.23.0.tgz#93afbf73c21b69c0e7b605d7508ee8002f90bba0" - integrity sha512-1R8ngBDKtPw++Km6VnVTx76ndrBL9BuBBNpF9TUCGftK3ArdaifqoIx8cZ8aKu8sWXLAKO7lHzxL4BNPZvlDiw== - -"@sentry/cli-linux-i686@2.23.0": - version "2.23.0" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.23.0.tgz#4a2db236f94474aea127abcb73402c5aa5a48f89" - integrity sha512-KRqB98KstBkKh33ZqUq+q8O0U4c01aTWCNPpVrqAX7zikSk0AAJTG8eAtqwDSx949IkKUl8xa6PFLfz+Nb2EMQ== - -"@sentry/cli-linux-x64@2.23.0": - version "2.23.0" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.23.0.tgz#fd0a1ac2fe4841247dcf89e43f3df9a416719259" - integrity sha512-USHZ0zzg9qujGYAyRjLeUfLDZOMgNjCr82m0BSBMmlFs4oKwHmO6bSvdi9UzNNcpmkOavNAdUM4jnZWk11i46Q== - -"@sentry/cli-win32-i686@2.23.0": - version "2.23.0" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.23.0.tgz#0201030d2128a2fba79e3fd7e644052151bb21ed" - integrity sha512-lS/B3pONDl18IEu/I//3vcMnosThobyXpqfAm4WYUtFTiw/wwDHgwGgaIjZWm5wMRkPFzYoRFpZfPlUrJd/4cQ== - -"@sentry/cli-win32-x64@2.23.0": - version "2.23.0" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.23.0.tgz#648b99be78af130dbb0a53506d5c55bbe0d46472" - integrity sha512-7LP6wA3w93ViYKQR8tMN2i/SfpQzaXqM2SAHI3yfJ3bdREHOV3+/N0mNiWVRvgL0TKNQJS42v2IILLhiDxufHQ== - -"@sentry/cli@^1.74.4": - version "1.74.6" - resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.74.6.tgz#c4f276e52c6f5e8c8d692845a965988068ebc6f5" - integrity sha512-pJ7JJgozyjKZSTjOGi86chIngZMLUlYt2HOog+OJn+WGvqEkVymu8m462j1DiXAnex9NspB4zLLNuZ/R6rTQHg== - dependencies: - https-proxy-agent "^5.0.0" - mkdirp "^0.5.5" - node-fetch "^2.6.7" - npmlog "^4.1.2" - progress "^2.0.3" - proxy-from-env "^1.1.0" - which "^2.0.2" - -"@sentry/cli@^1.77.1": +"@sentry/cli-darwin@2.23.2": + version "2.23.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.23.2.tgz#d1fed31063e19bfbdf5d5ab0bb9938f407eb9e33" + integrity sha512-7Jw1yEmJxiNan5WJyiAKXascxoe8uccKVaTvEo0JwzgWhPzS71j3eUlthuQuy0xv5Pqw4d89khAP79X/pzW/dw== + +"@sentry/cli-linux-arm64@2.23.2": + version "2.23.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.23.2.tgz#a4171da7de22fd31a359fdd5671b9e445316778c" + integrity sha512-Hs2PbK2++r6Lbss44HIDXJwBSIyw1naLdIpOBi9NVLBGZxO2VLt8sQYDhVDv2ZIUijw1aGc5sg8R7R0/6qqr8Q== + +"@sentry/cli-linux-arm@2.23.2": + version "2.23.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.23.2.tgz#3a101ffcc37128eeebd9abdbe033cf9fcbf093ad" + integrity sha512-fQZNHsGO6kRPT7nuv/GZ048rA2aEGHcrTZEN6UhgHoowPGGmfSpOqlpdXLME6WYWzWeSBt5Sy5RcxMvPzuDnRQ== + +"@sentry/cli-linux-i686@2.23.2": + version "2.23.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.23.2.tgz#fcbaa045aa8ab2d646d6c27274f88ccc29bb417c" + integrity sha512-emogfai7xCySsTAaixjnh0hgzcb2nhEqz7MRYxGA+rSI8IgP1ZMBfdWHA/4fUap0wLNA6vVgvbHlFcBVQcGchA== + +"@sentry/cli-linux-x64@2.23.2": + version "2.23.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.23.2.tgz#30404f32d8f32e33a24fed67f11f11ac84da0a6c" + integrity sha512-VewJmJRUFvKR3YiPp1pZOZJxrFGLgBHLGEP/9wBkkp3cY+rKrzQ3b7Dlh9v+YOkz1qjF1R1FsAzvsYd9/05dLg== + +"@sentry/cli-win32-i686@2.23.2": + version "2.23.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.23.2.tgz#6f77749aad856dceaa9b206c6bd51fbc8caca704" + integrity sha512-R8olErQICIV+AdjINxLQYKVGRi49PdSykjs94gfTvJBxb2hvqCpS+LIVS5SFu2UDvT3/9Elq6hXMKxEgYNy0pQ== + +"@sentry/cli-win32-x64@2.23.2": + version "2.23.2" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.23.2.tgz#d68ac046568ca951d5bfe7216ae5c52a07a65ecc" + integrity sha512-GK9xburDBnpBmjtbWrMK+9I7DRKbEhmjfWLdoTQK593xOHPOzy8lhDZ1u9Lp1mUKUcG1xba4BOFZgNppMYG2cA== + +"@sentry/cli@^1.74.4", "@sentry/cli@^1.77.1": version "1.77.1" resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.77.1.tgz#ebcf884712ef6c3c75443f491ec16f6a22148aec" integrity sha512-OtJ7U9LeuPUAY/xow9wwcjM9w42IJIpDtClTKI/RliE685vd/OJUIpiAvebHNthDYpQynvwb/0iuF4fonh+CKw== @@ -5352,32 +5339,10 @@ proxy-from-env "^1.1.0" which "^2.0.2" -"@sentry/cli@^2.17.0": - version "2.17.0" - resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.17.0.tgz#fc809ecd721eb5323502625fa904b786af28ad89" - integrity sha512-CHIMEg8+YNCpEBDgUctu+DvG3S8+g8Zn9jTE5MMGINNmGkQTMG179LuDE04B/inaCYixLVNpFPTe6Iow3tXjnQ== - dependencies: - https-proxy-agent "^5.0.0" - node-fetch "^2.6.7" - progress "^2.0.3" - proxy-from-env "^1.1.0" - which "^2.0.2" - -"@sentry/cli@^2.21.2": - version "2.21.2" - resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.21.2.tgz#89e5633ff48a83d078c76c6997fffd4b68b2da1c" - integrity sha512-X1nye89zl+QV3FSuQDGItfM51tW9PQ7ce0TtV/12DgGgTVEgnVp5uvO3wX5XauHvulQzRPzwUL3ZK+yS5bAwCw== - dependencies: - https-proxy-agent "^5.0.0" - node-fetch "^2.6.7" - progress "^2.0.3" - proxy-from-env "^1.1.0" - which "^2.0.2" - -"@sentry/cli@^2.23.0": - version "2.23.0" - resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.23.0.tgz#d8fa6a514aedfe316a8afc046435b96746e7099f" - integrity sha512-xFTv7YOaKWMCSPgN8A1jZpxJQhwdES89pqMTWjJOgjmkwFvziuaTM7O7kazps/cACDhJp2lK2j6AT6imhr4t9w== +"@sentry/cli@^2.17.0", "@sentry/cli@^2.21.2", "@sentry/cli@^2.23.0": + version "2.23.2" + resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.23.2.tgz#5b8edd4e6e8fdea05f5d6bb6c84b55d52897c250" + integrity sha512-coQoJnts6E/yN21uQyI7sqa89kixXQuIRodOPnIymQtYJZG3DAwqxcCBLMS3NZyVQ3HemeuhhDnE/KFd1mS53Q== dependencies: https-proxy-agent "^5.0.0" node-fetch "^2.6.7" @@ -5385,13 +5350,13 @@ proxy-from-env "^1.1.0" which "^2.0.2" optionalDependencies: - "@sentry/cli-darwin" "2.23.0" - "@sentry/cli-linux-arm" "2.23.0" - "@sentry/cli-linux-arm64" "2.23.0" - "@sentry/cli-linux-i686" "2.23.0" - "@sentry/cli-linux-x64" "2.23.0" - "@sentry/cli-win32-i686" "2.23.0" - "@sentry/cli-win32-x64" "2.23.0" + "@sentry/cli-darwin" "2.23.2" + "@sentry/cli-linux-arm" "2.23.2" + "@sentry/cli-linux-arm64" "2.23.2" + "@sentry/cli-linux-i686" "2.23.2" + "@sentry/cli-linux-x64" "2.23.2" + "@sentry/cli-win32-i686" "2.23.2" + "@sentry/cli-win32-x64" "2.23.2" "@sentry/vite-plugin@^0.6.1": version "0.6.1" @@ -8051,16 +8016,16 @@ app-module-path@^2.2.0: resolved "https://registry.yarnpkg.com/app-module-path/-/app-module-path-2.2.0.tgz#641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5" integrity sha1-ZBqlXft9am8KgUHEucCqULbCTdU= -aproba@^1.0.3, aproba@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - "aproba@^1.0.3 || ^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== +aproba@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + are-we-there-yet@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-3.0.0.tgz#ba20bd6b553e31d62fc8c31bd23d22b95734390d" @@ -8069,14 +8034,6 @@ are-we-there-yet@^3.0.0: delegates "^1.0.0" readable-stream "^3.6.0" -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" @@ -11276,11 +11233,6 @@ coa@^2.0.2: chalk "^2.4.1" q "^1.1.2" -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - code-red@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/code-red/-/code-red-1.0.4.tgz#59ba5c9d1d320a4ef795bc10a28bd42bfebe3e35" @@ -11602,7 +11554,7 @@ console-browserify@^1.1.0: resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== -console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: +console-control-strings@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= @@ -16121,20 +16073,6 @@ gauge@^4.0.3: strip-ansi "^6.0.1" wide-align "^1.1.5" -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - gaxios@^4.0.0: version "4.2.0" resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-4.2.0.tgz#33bdc4fc241fc33b8915a4b8c07cfb368b932e46" @@ -16907,7 +16845,7 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" -has-unicode@2.0.1, has-unicode@^2.0.0, has-unicode@^2.0.1: +has-unicode@2.0.1, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= @@ -18240,13 +18178,6 @@ is-finite@^1.0.0: resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" @@ -23221,16 +23152,6 @@ npm-run-path@^5.1.0: dependencies: path-key "^4.0.0" -npmlog@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - npmlog@^6.0.0, npmlog@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" @@ -23265,11 +23186,6 @@ num2fraction@^1.2.2: resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4= -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - nwsapi@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" @@ -26475,7 +26391,7 @@ read@^2.0.0: dependencies: mute-stream "~1.0.0" -"readable-stream@1 || 2", readable-stream@2.3.7, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@2.3.7, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -27954,7 +27870,7 @@ server-destroy@^1.0.1: resolved "https://registry.yarnpkg.com/server-destroy/-/server-destroy-1.0.1.tgz#f13bf928e42b9c3e79383e61cc3998b5d14e6cdd" integrity sha512-rb+9B5YBIEzYcD6x2VKidaa+cqYBJQKnU4oe4E3ANwRRN56yk/ua1YCJT1n21NTS8w6CcOclAKNP3PhdCXKYtQ== -set-blocking@^2.0.0, set-blocking@~2.0.0: +set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= @@ -29010,15 +28926,6 @@ string-template@~0.2.1: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - "string-width@^1.0.2 || 2", string-width@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" @@ -32070,7 +31977,7 @@ wide-align@1.1.3: dependencies: string-width "^1.0.2 || 2" -wide-align@^1.1.0, wide-align@^1.1.5: +wide-align@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== From 82d8fdb12057cf05ee002058ffdc8001d09fa45d Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Tue, 2 Jan 2024 13:02:59 -0500 Subject: [PATCH 20/51] perf: enable `noAccumulatingSpread` lint rule (#9996) Co-authored-by: Abhijeet Prasad --- biome.json | 3 +++ packages/integrations/scripts/buildBundles.ts | 5 ++++- packages/utils/src/baggage.ts | 8 ++++---- scripts/prepack.ts | 15 ++++++++------- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/biome.json b/biome.json index b9faf9b2bef8..4ca244f90d3c 100644 --- a/biome.json +++ b/biome.json @@ -23,6 +23,9 @@ }, "nursery": { "noUnusedImports": "error" + }, + "performance": { + "noAccumulatingSpread": "error" } }, "ignore": [".vscode/*", "**/*.json"] diff --git a/packages/integrations/scripts/buildBundles.ts b/packages/integrations/scripts/buildBundles.ts index d056d5a523e2..b5eb77730d40 100644 --- a/packages/integrations/scripts/buildBundles.ts +++ b/packages/integrations/scripts/buildBundles.ts @@ -33,7 +33,10 @@ async function buildBundle(integration: string, jsVersion: string): Promise [...tasks, buildBundle(integration, 'es5'), buildBundle(integration, 'es6')], + (tasks, integration) => { + tasks.push(buildBundle(integration, 'es5'), buildBundle(integration, 'es6')); + return tasks; + }, [] as Promise[], ); diff --git a/packages/utils/src/baggage.ts b/packages/utils/src/baggage.ts index 0202f0ec00f5..25210d02bbc4 100644 --- a/packages/utils/src/baggage.ts +++ b/packages/utils/src/baggage.ts @@ -40,10 +40,10 @@ export function baggageHeaderToDynamicSamplingContext( // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it baggageObject = baggageHeader.reduce>((acc, curr) => { const currBaggageObject = baggageHeaderToObject(curr); - return { - ...acc, - ...currBaggageObject, - }; + for (const key of Object.keys(currBaggageObject)) { + acc[key] = currBaggageObject[key]; + } + return acc; }, {}); } else { // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but diff --git a/scripts/prepack.ts b/scripts/prepack.ts index 65cd9ddbf631..43febdcde4ee 100644 --- a/scripts/prepack.ts +++ b/scripts/prepack.ts @@ -95,13 +95,14 @@ if (newPkgJson[EXPORT_MAP_ENTRY_POINT]) { if (newPkgJson[TYPES_VERSIONS_ENTRY_POINT]) { Object.entries(newPkgJson[TYPES_VERSIONS_ENTRY_POINT]).forEach(([key, val]) => { - newPkgJson[TYPES_VERSIONS_ENTRY_POINT][key] = Object.entries(val).reduce((acc, [key, val]) => { - const newKey = key.replace(`${buildDir}/`, ''); - return { - ...acc, - [newKey]: val.map(v => v.replace(`${buildDir}/`, '')), - }; - }, {}); + newPkgJson[TYPES_VERSIONS_ENTRY_POINT][key] = Object.entries(val).reduce( + (acc, [key, val]) => { + const newKey = key.replace(`${buildDir}/`, ''); + acc[newKey] = val.map(v => v.replace(`${buildDir}/`, '')); + return acc; + }, + {} as Record, + ); }); } From e1da7d3eb6eac89871b8252b217c4778d354754a Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Tue, 2 Jan 2024 17:32:07 -0500 Subject: [PATCH 21/51] perf(astro): reduce unnecessary path resolutions (#10021) - No need to call `process.cwd()` on every iteration. - No need to create paths on memory --- packages/astro/src/integration/index.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/astro/src/integration/index.ts b/packages/astro/src/integration/index.ts index 34841a838983..0f52cdeed17a 100644 --- a/packages/astro/src/integration/index.ts +++ b/packages/astro/src/integration/index.ts @@ -101,11 +101,14 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => { }; }; +const possibleFileExtensions = ['ts', 'js', 'tsx', 'jsx', 'mjs', 'cjs', 'mts']; + function findDefaultSdkInitFile(type: 'server' | 'client'): string | undefined { - const fileExtensions = ['ts', 'js', 'tsx', 'jsx', 'mjs', 'cjs', 'mts']; - return fileExtensions - .map(ext => path.resolve(path.join(process.cwd(), `sentry.${type}.config.${ext}`))) - .find(filename => fs.existsSync(filename)); + const cwd = process.cwd(); + return possibleFileExtensions.find(extension => { + const filename = path.resolve(path.join(cwd, `sentry.${type}.config.${extension}`)); + return fs.existsSync(filename); + }); } function getSourcemapsAssetsGlob(config: AstroConfig): string { From a8e2b616766fe7b81c28884aa14db27891098dac Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Tue, 2 Jan 2024 17:34:40 -0500 Subject: [PATCH 22/51] Use astro logger instead of console (#9995) We can simply use `AstroIntegrationLogger` instead of console. This might improve DX. https://docs.astro.build/en/reference/integrations-reference/#astrointegrationlogger --- packages/astro/src/integration/index.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/astro/src/integration/index.ts b/packages/astro/src/integration/index.ts index 0f52cdeed17a..bdf2cf8f0ede 100644 --- a/packages/astro/src/integration/index.ts +++ b/packages/astro/src/integration/index.ts @@ -1,6 +1,5 @@ import * as fs from 'fs'; import * as path from 'path'; -/* eslint-disable no-console */ import { sentryVitePlugin } from '@sentry/vite-plugin'; import type { AstroConfig, AstroIntegration } from 'astro'; @@ -14,7 +13,7 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => { name: PKG_NAME, hooks: { // eslint-disable-next-line complexity - 'astro:config:setup': async ({ updateConfig, injectScript, addMiddleware, config, command }) => { + 'astro:config:setup': async ({ updateConfig, injectScript, addMiddleware, config, command, logger }) => { // The third param here enables loading of all env vars, regardless of prefix // see: https://main.vitejs.dev/config/#using-environment-variables-in-config @@ -62,10 +61,10 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => { : findDefaultSdkInitFile('client'); if (pathToClientInit) { - options.debug && console.log(`[sentry-astro] Using ${pathToClientInit} for client init.`); + options.debug && logger.info(`Using ${pathToClientInit} for client init.`); injectScript('page', buildSdkInitFileImportSnippet(pathToClientInit)); } else { - options.debug && console.log('[sentry-astro] Using default client init.'); + options.debug && logger.info('Using default client init.'); injectScript('page', buildClientSnippet(options || {})); } } @@ -75,10 +74,10 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => { ? path.resolve(options.serverInitPath) : findDefaultSdkInitFile('server'); if (pathToServerInit) { - options.debug && console.log(`[sentry-astro] Using ${pathToServerInit} for server init.`); + options.debug && logger.info(`Using ${pathToServerInit} for server init.`); injectScript('page-ssr', buildSdkInitFileImportSnippet(pathToServerInit)); } else { - options.debug && console.log('[sentry-astro] Using default server init.'); + options.debug && logger.info('Using default server init.'); injectScript('page-ssr', buildServerSnippet(options || {})); } } From d2e0465563fd870ef146b9d3255151bd28b89405 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Tue, 2 Jan 2024 17:34:56 -0500 Subject: [PATCH 23/51] fix(astro): prevent sentry from externalized (#9994) Fixes https://github.com/getsentry/sentry-javascript/issues/9777 --- packages/astro/src/integration/index.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/astro/src/integration/index.ts b/packages/astro/src/integration/index.ts index bdf2cf8f0ede..0ee4b3676590 100644 --- a/packages/astro/src/integration/index.ts +++ b/packages/astro/src/integration/index.ts @@ -80,6 +80,19 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => { options.debug && logger.info('Using default server init.'); injectScript('page-ssr', buildServerSnippet(options || {})); } + + // Prevent Sentry from being externalized for SSR. + // Cloudflare like environments have Node.js APIs are available under `node:` prefix. + // Ref: https://developers.cloudflare.com/workers/runtime-apis/nodejs/ + if (config?.adapter?.name.startsWith('@astro/cloudflare')) { + updateConfig({ + vite: { + ssr: { + noExternal: ['@sentry/astro', '@sentry/node'], + }, + }, + }); + } } const isSSR = config && (config.output === 'server' || config.output === 'hybrid'); From 1cd771af9a826c0b9c4a22575490ff265367f801 Mon Sep 17 00:00:00 2001 From: Josh Kelley Date: Tue, 2 Jan 2024 18:36:11 -0500 Subject: [PATCH 24/51] fix(node): Handle inspector already open (#10025) If the inspector is already running, then ANR should be able to (re)use that, instead of opening it itself. --- .../node-integration-tests/suites/anr/test.ts | 20 +++++++++++++++++++ packages/node/src/integrations/anr/index.ts | 4 +++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/node-integration-tests/suites/anr/test.ts b/packages/node-integration-tests/suites/anr/test.ts index a070f611a0ab..011a0371a5d9 100644 --- a/packages/node-integration-tests/suites/anr/test.ts +++ b/packages/node-integration-tests/suites/anr/test.ts @@ -95,6 +95,26 @@ conditionalTest({ min: 16 })('should report ANR when event loop blocked', () => }); }); + test('With --inspect', done => { + expect.assertions(7); + + const testScriptPath = path.resolve(__dirname, 'basic.js'); + + childProcess.exec(`node --inspect ${testScriptPath}`, { encoding: 'utf8' }, (_, stdout) => { + const [event] = parseJsonLines<[Event]>(stdout, 1); + + expect(event.exception?.values?.[0].mechanism).toEqual({ type: 'ANR' }); + expect(event.exception?.values?.[0].type).toEqual('ApplicationNotResponding'); + expect(event.exception?.values?.[0].value).toEqual('Application Not Responding for at least 200 ms'); + expect(event.exception?.values?.[0].stacktrace?.frames?.length).toBeGreaterThan(4); + + expect(event.exception?.values?.[0].stacktrace?.frames?.[2].function).toEqual('?'); + expect(event.exception?.values?.[0].stacktrace?.frames?.[3].function).toEqual('longWork'); + + done(); + }); + }); + test('With session', done => { expect.assertions(9); diff --git a/packages/node/src/integrations/anr/index.ts b/packages/node/src/integrations/anr/index.ts index cf1f1cd6cab7..70c20962fca2 100644 --- a/packages/node/src/integrations/anr/index.ts +++ b/packages/node/src/integrations/anr/index.ts @@ -111,7 +111,9 @@ export class Anr implements Integration { if (options.captureStackTrace) { // eslint-disable-next-line @typescript-eslint/no-var-requires const inspector: InspectorApi = require('inspector'); - inspector.open(0); + if (!inspector.url()) { + inspector.open(0); + } } const { Worker } = getWorkerThreads(); From 4bd1af1c02f14ffe52275772cef54036b124b1db Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Tue, 2 Jan 2024 19:52:38 -0500 Subject: [PATCH 25/51] build: enable biome performance rules (#10027) Disabled `noDelete` to avoid a huge change log. We can enable it gradually. --- biome.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/biome.json b/biome.json index 4ca244f90d3c..e4601d14da3c 100644 --- a/biome.json +++ b/biome.json @@ -25,7 +25,9 @@ "noUnusedImports": "error" }, "performance": { - "noAccumulatingSpread": "error" + "all": true, + "noAccumulatingSpread": "error", + "noDelete": "off" } }, "ignore": [".vscode/*", "**/*.json"] From 84ca84ff8e9366a5f6e88756415025abb960addb Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 3 Jan 2024 09:33:27 +0100 Subject: [PATCH 26/51] feat(node-experimental): Allow to pass base span options to trace methods (#10006) This was brought up in Slack, currently you cannot pass other span properties directly to otel `startSpan()`. This now adds `attributes`, `kind` and `startTime` to better align with OTEL. Note that I chose to omit `root` and `links` options, not sure if we want to support those in none-OTEL environments, and this API should (~~) be the same for node & non-node in v8. --- packages/core/src/tracing/trace.ts | 2 +- packages/node-experimental/src/index.ts | 2 +- packages/opentelemetry/src/index.ts | 2 +- packages/opentelemetry/src/trace.ts | 44 +++++++- packages/opentelemetry/src/types.ts | 7 +- packages/opentelemetry/test/trace.test.ts | 123 +++++++++++++++++++++- 6 files changed, 173 insertions(+), 7 deletions(-) diff --git a/packages/core/src/tracing/trace.ts b/packages/core/src/tracing/trace.ts index 1b01ee20490c..ceb59e1434dd 100644 --- a/packages/core/src/tracing/trace.ts +++ b/packages/core/src/tracing/trace.ts @@ -138,7 +138,7 @@ export const startActiveSpan = startSpan; /** * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span - * after the function is done automatically. + * after the function is done automatically. You'll have to call `span.end()` manually. * * The created span is the active span and will be used as parent by other spans created inside the function * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active. diff --git a/packages/node-experimental/src/index.ts b/packages/node-experimental/src/index.ts index e45616b2e65a..c6771601c16f 100644 --- a/packages/node-experimental/src/index.ts +++ b/packages/node-experimental/src/index.ts @@ -13,7 +13,7 @@ export { getAutoPerformanceIntegrations } from './integrations/getAutoPerformanc export * as Handlers from './sdk/handlers'; export type { Span } from './types'; -export { startSpan, startInactiveSpan, getActiveSpan } from '@sentry/opentelemetry'; +export { startSpan, startSpanManual, startInactiveSpan, getActiveSpan } from '@sentry/opentelemetry'; export { getClient, addBreadcrumb, diff --git a/packages/opentelemetry/src/index.ts b/packages/opentelemetry/src/index.ts index f379b4216da5..534c99c95fb4 100644 --- a/packages/opentelemetry/src/index.ts +++ b/packages/opentelemetry/src/index.ts @@ -29,7 +29,7 @@ export { export { isSentryRequestSpan } from './utils/isSentryRequest'; export { getActiveSpan, getRootSpan } from './utils/getActiveSpan'; -export { startSpan, startInactiveSpan } from './trace'; +export { startSpan, startSpanManual, startInactiveSpan } from './trace'; export { getCurrentHub, setupGlobalHub, getClient } from './custom/hub'; export { OpenTelemetryScope } from './custom/scope'; diff --git a/packages/opentelemetry/src/trace.ts b/packages/opentelemetry/src/trace.ts index 3bd635a953df..b5b1e48a8e4b 100644 --- a/packages/opentelemetry/src/trace.ts +++ b/packages/opentelemetry/src/trace.ts @@ -23,7 +23,7 @@ export function startSpan(spanContext: OpenTelemetrySpanContext, callback: (s const { name } = spanContext; - return tracer.startActiveSpan(name, span => { + return tracer.startActiveSpan(name, spanContext, span => { function finishSpan(): void { span.end(); } @@ -57,6 +57,46 @@ export function startSpan(spanContext: OpenTelemetrySpanContext, callback: (s }); } +/** + * Similar to `Sentry.startSpan`. Wraps a function with a span, but does not finish the span + * after the function is done automatically. You'll have to call `span.end()` manually. + * + * The created span is the active span and will be used as parent by other spans created inside the function + * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active. + * + * Note that you'll always get a span passed to the callback, it may just be a NonRecordingSpan if the span is not sampled. + */ +export function startSpanManual(spanContext: OpenTelemetrySpanContext, callback: (span: Span) => T): T { + const tracer = getTracer(); + + const { name } = spanContext; + + // @ts-expect-error - isThenable returns the wrong type + return tracer.startActiveSpan(name, spanContext, span => { + _applySentryAttributesToSpan(span, spanContext); + + let maybePromiseResult: T; + try { + maybePromiseResult = callback(span); + } catch (e) { + span.setStatus({ code: SpanStatusCode.ERROR }); + throw e; + } + + if (isThenable(maybePromiseResult)) { + return maybePromiseResult.then( + res => res, + e => { + span.setStatus({ code: SpanStatusCode.ERROR }); + throw e; + }, + ); + } + + return maybePromiseResult; + }); +} + /** * @deprecated Use {@link startSpan} instead. */ @@ -77,7 +117,7 @@ export function startInactiveSpan(spanContext: OpenTelemetrySpanContext): Span { const { name } = spanContext; - const span = tracer.startSpan(name); + const span = tracer.startSpan(name, spanContext); _applySentryAttributesToSpan(span, spanContext); diff --git a/packages/opentelemetry/src/types.ts b/packages/opentelemetry/src/types.ts index 0cb5342a3ac8..fdab000a6e09 100644 --- a/packages/opentelemetry/src/types.ts +++ b/packages/opentelemetry/src/types.ts @@ -1,4 +1,4 @@ -import type { Span as WriteableSpan, Tracer } from '@opentelemetry/api'; +import type { Attributes, Span as WriteableSpan, SpanKind, TimeInput, Tracer } from '@opentelemetry/api'; import type { BasicTracerProvider, ReadableSpan, Span } from '@opentelemetry/sdk-trace-base'; import type { SpanOrigin, TransactionMetadata, TransactionSource } from '@sentry/types'; @@ -13,6 +13,11 @@ export interface OpenTelemetrySpanContext { metadata?: Partial; origin?: SpanOrigin; source?: TransactionSource; + + // Base SpanOptions we support + attributes?: Attributes; + kind?: SpanKind; + startTime?: TimeInput; } /** diff --git a/packages/opentelemetry/test/trace.test.ts b/packages/opentelemetry/test/trace.test.ts index 4075eef1e4de..54a1082830ae 100644 --- a/packages/opentelemetry/test/trace.test.ts +++ b/packages/opentelemetry/test/trace.test.ts @@ -1,14 +1,16 @@ import type { Span } from '@opentelemetry/api'; +import { SpanKind } from '@opentelemetry/api'; import { TraceFlags, context, trace } from '@opentelemetry/api'; import type { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import type { PropagationContext } from '@sentry/types'; import { getCurrentHub } from '../src/custom/hub'; import { InternalSentrySemanticAttributes } from '../src/semanticAttributes'; -import { startInactiveSpan, startSpan } from '../src/trace'; +import { startInactiveSpan, startSpan, startSpanManual } from '../src/trace'; import type { AbstractSpan } from '../src/types'; import { setPropagationContextOnContext } from '../src/utils/contextData'; import { getActiveSpan, getRootSpan } from '../src/utils/getActiveSpan'; +import { getSpanKind } from '../src/utils/getSpanKind'; import { getSpanMetadata } from '../src/utils/spanData'; import { spanHasAttributes, spanHasName } from '../src/utils/spanTypes'; import { cleanupOtel, mockSdkInit } from './helpers/mockSdkInit'; @@ -231,6 +233,33 @@ describe('trace', () => { }, ); }); + + it('allows to pass base SpanOptions', () => { + const date = Date.now() - 1000; + + startSpan( + { + name: 'outer', + kind: SpanKind.CLIENT, + attributes: { + test1: 'test 1', + test2: 2, + }, + + startTime: date, + }, + span => { + expect(span).toBeDefined(); + expect(getSpanName(span)).toEqual('outer'); + expect(getSpanAttributes(span)).toEqual({ + [InternalSentrySemanticAttributes.SAMPLE_RATE]: 1, + test1: 'test 1', + test2: 2, + }); + expect(getSpanKind(span)).toEqual(SpanKind.CLIENT); + }, + ); + }); }); describe('startInactiveSpan', () => { @@ -297,6 +326,98 @@ describe('trace', () => { expect(getSpanMetadata(span2)).toEqual({ requestPath: 'test-path' }); }); + + it('allows to pass base SpanOptions', () => { + const date = Date.now() - 1000; + + const span = startInactiveSpan({ + name: 'outer', + kind: SpanKind.CLIENT, + attributes: { + test1: 'test 1', + test2: 2, + }, + startTime: date, + }); + + expect(span).toBeDefined(); + expect(getSpanName(span)).toEqual('outer'); + expect(getSpanAttributes(span)).toEqual({ + [InternalSentrySemanticAttributes.SAMPLE_RATE]: 1, + test1: 'test 1', + test2: 2, + }); + expect(getSpanKind(span)).toEqual(SpanKind.CLIENT); + }); + }); + + describe('startSpanManual', () => { + it('does not automatically finish the span', () => { + expect(getActiveSpan()).toEqual(undefined); + + let _outerSpan: Span | undefined; + let _innerSpan: Span | undefined; + + const res = startSpanManual({ name: 'outer' }, outerSpan => { + expect(outerSpan).toBeDefined(); + _outerSpan = outerSpan; + + expect(getSpanName(outerSpan)).toEqual('outer'); + expect(getActiveSpan()).toEqual(outerSpan); + + startSpanManual({ name: 'inner' }, innerSpan => { + expect(innerSpan).toBeDefined(); + _innerSpan = innerSpan; + + expect(getSpanName(innerSpan)).toEqual('inner'); + expect(getActiveSpan()).toEqual(innerSpan); + }); + + expect(getSpanEndTime(_innerSpan!)).toEqual([0, 0]); + + _innerSpan!.end(); + + expect(getSpanEndTime(_innerSpan!)).not.toEqual([0, 0]); + + return 'test value'; + }); + + expect(getSpanEndTime(_outerSpan!)).toEqual([0, 0]); + + _outerSpan!.end(); + + expect(getSpanEndTime(_outerSpan!)).not.toEqual([0, 0]); + + expect(res).toEqual('test value'); + + expect(getActiveSpan()).toEqual(undefined); + }); + + it('allows to pass base SpanOptions', () => { + const date = Date.now() - 1000; + + startSpanManual( + { + name: 'outer', + kind: SpanKind.CLIENT, + attributes: { + test1: 'test 1', + test2: 2, + }, + startTime: date, + }, + span => { + expect(span).toBeDefined(); + expect(getSpanName(span)).toEqual('outer'); + expect(getSpanAttributes(span)).toEqual({ + [InternalSentrySemanticAttributes.SAMPLE_RATE]: 1, + test1: 'test 1', + test2: 2, + }); + expect(getSpanKind(span)).toEqual(SpanKind.CLIENT); + }, + ); + }); }); }); From b7480d7a395dbf1ce52f4151df1e5a5486c7aa53 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 3 Jan 2024 09:53:36 +0100 Subject: [PATCH 27/51] feat(core): Add `attributes` to `Span` (#10008) Together with `setAttribute()` and `setAttributes()` APIs, mirroring the OpenTelemetry API for their spans. For now, these are stored as `data` on spans/transactions, until we "directly" support them. --- packages/core/src/tracing/span.ts | 61 ++++++- packages/core/src/tracing/trace.ts | 3 +- packages/core/test/lib/tracing/span.test.ts | 158 ++++++++++++++++++ .../node/src/integrations/undici/types.ts | 2 +- packages/sveltekit/src/server/handle.ts | 4 +- packages/tracing/test/span.test.ts | 1 - packages/types/src/index.ts | 2 +- packages/types/src/span.ts | 33 ++++ packages/types/src/transaction.ts | 7 +- 9 files changed, 259 insertions(+), 12 deletions(-) diff --git a/packages/core/src/tracing/span.ts b/packages/core/src/tracing/span.ts index 80704d44c9a7..6e484ec92ddc 100644 --- a/packages/core/src/tracing/span.ts +++ b/packages/core/src/tracing/span.ts @@ -3,6 +3,8 @@ import type { Instrumenter, Primitive, Span as SpanInterface, + SpanAttributeValue, + SpanAttributes, SpanContext, SpanOrigin, TraceContext, @@ -104,6 +106,11 @@ export class Span implements SpanInterface { // eslint-disable-next-line @typescript-eslint/no-explicit-any public data: { [key: string]: any }; + /** + * @inheritDoc + */ + public attributes: SpanAttributes; + /** * List of spans that were finalized */ @@ -137,6 +144,7 @@ export class Span implements SpanInterface { this.startTimestamp = spanContext.startTimestamp || timestampInSeconds(); this.tags = spanContext.tags || {}; this.data = spanContext.data || {}; + this.attributes = spanContext.attributes || {}; this.instrumenter = spanContext.instrumenter || 'sentry'; this.origin = spanContext.origin || 'manual'; @@ -217,12 +225,27 @@ export class Span implements SpanInterface { /** * @inheritDoc */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types + // eslint-disable-next-line @typescript-eslint/no-explicit-any public setData(key: string, value: any): this { this.data = { ...this.data, [key]: value }; return this; } + /** @inheritdoc */ + public setAttribute(key: string, value: SpanAttributeValue | undefined): void { + if (value === undefined) { + // eslint-disable-next-line @typescript-eslint/no-dynamic-delete + delete this.attributes[key]; + } else { + this.attributes[key] = value; + } + } + + /** @inheritdoc */ + public setAttributes(attributes: SpanAttributes): void { + Object.keys(attributes).forEach(key => this.setAttribute(key, attributes[key])); + } + /** * @inheritDoc */ @@ -297,7 +320,7 @@ export class Span implements SpanInterface { */ public toContext(): SpanContext { return dropUndefinedKeys({ - data: this.data, + data: this._getData(), description: this.description, endTimestamp: this.endTimestamp, op: this.op, @@ -335,7 +358,7 @@ export class Span implements SpanInterface { */ public getTraceContext(): TraceContext { return dropUndefinedKeys({ - data: Object.keys(this.data).length > 0 ? this.data : undefined, + data: this._getData(), description: this.description, op: this.op, parent_span_id: this.parentSpanId, @@ -365,7 +388,7 @@ export class Span implements SpanInterface { origin?: SpanOrigin; } { return dropUndefinedKeys({ - data: Object.keys(this.data).length > 0 ? this.data : undefined, + data: this._getData(), description: this.description, op: this.op, parent_span_id: this.parentSpanId, @@ -378,6 +401,36 @@ export class Span implements SpanInterface { origin: this.origin, }); } + + /** + * Get the merged data for this span. + * For now, this combines `data` and `attributes` together, + * until eventually we can ingest `attributes` directly. + */ + private _getData(): + | { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [key: string]: any; + } + | undefined { + const { data, attributes } = this; + + const hasData = Object.keys(data).length > 0; + const hasAttributes = Object.keys(attributes).length > 0; + + if (!hasData && !hasAttributes) { + return undefined; + } + + if (hasData && hasAttributes) { + return { + ...data, + ...attributes, + }; + } + + return hasData ? data : attributes; + } } export type SpanStatusType = diff --git a/packages/core/src/tracing/trace.ts b/packages/core/src/tracing/trace.ts index ceb59e1434dd..6ff670c8cf7f 100644 --- a/packages/core/src/tracing/trace.ts +++ b/packages/core/src/tracing/trace.ts @@ -1,4 +1,4 @@ -import type { TransactionContext } from '@sentry/types'; +import type { Span, TransactionContext } from '@sentry/types'; import { dropUndefinedKeys, isThenable, logger, tracingContextFromHeaders } from '@sentry/utils'; import { DEBUG_BUILD } from '../debug-build'; @@ -6,7 +6,6 @@ import { getCurrentScope, withScope } from '../exports'; import type { Hub } from '../hub'; import { getCurrentHub } from '../hub'; import { hasTracingEnabled } from '../utils/hasTracingEnabled'; -import type { Span } from './span'; /** * Wraps a function with a transaction/span and finishes the span after the function is done. diff --git a/packages/core/test/lib/tracing/span.test.ts b/packages/core/test/lib/tracing/span.test.ts index c54085704022..512141358dd4 100644 --- a/packages/core/test/lib/tracing/span.test.ts +++ b/packages/core/test/lib/tracing/span.test.ts @@ -29,4 +29,162 @@ describe('span', () => { expect(span.name).toEqual('new name'); expect(span.description).toEqual('new name'); }); + + describe('setAttribute', () => { + it('allows to set attributes', () => { + const span = new Span(); + + span.setAttribute('str', 'bar'); + span.setAttribute('num', 1); + span.setAttribute('zero', 0); + span.setAttribute('bool', true); + span.setAttribute('false', false); + span.setAttribute('undefined', undefined); + span.setAttribute('numArray', [1, 2]); + span.setAttribute('strArray', ['aa', 'bb']); + span.setAttribute('boolArray', [true, false]); + span.setAttribute('arrayWithUndefined', [1, undefined, 2]); + + expect(span.attributes).toEqual({ + str: 'bar', + num: 1, + zero: 0, + bool: true, + false: false, + numArray: [1, 2], + strArray: ['aa', 'bb'], + boolArray: [true, false], + arrayWithUndefined: [1, undefined, 2], + }); + }); + + it('deletes attributes when setting to `undefined`', () => { + const span = new Span(); + + span.setAttribute('str', 'bar'); + + expect(Object.keys(span.attributes).length).toEqual(1); + + span.setAttribute('str', undefined); + + expect(Object.keys(span.attributes).length).toEqual(0); + }); + + it('disallows invalid attribute types', () => { + const span = new Span(); + + /** @ts-expect-error this is invalid */ + span.setAttribute('str', {}); + + /** @ts-expect-error this is invalid */ + span.setAttribute('str', null); + + /** @ts-expect-error this is invalid */ + span.setAttribute('str', [1, 'a']); + }); + }); + + describe('setAttributes', () => { + it('allows to set attributes', () => { + const span = new Span(); + + const initialAttributes = span.attributes; + + expect(initialAttributes).toEqual({}); + + const newAttributes = { + str: 'bar', + num: 1, + zero: 0, + bool: true, + false: false, + undefined: undefined, + numArray: [1, 2], + strArray: ['aa', 'bb'], + boolArray: [true, false], + arrayWithUndefined: [1, undefined, 2], + }; + span.setAttributes(newAttributes); + + expect(span.attributes).toEqual({ + str: 'bar', + num: 1, + zero: 0, + bool: true, + false: false, + numArray: [1, 2], + strArray: ['aa', 'bb'], + boolArray: [true, false], + arrayWithUndefined: [1, undefined, 2], + }); + + expect(span.attributes).not.toBe(newAttributes); + + span.setAttributes({ + num: 2, + numArray: [3, 4], + }); + + expect(span.attributes).toEqual({ + str: 'bar', + num: 2, + zero: 0, + bool: true, + false: false, + numArray: [3, 4], + strArray: ['aa', 'bb'], + boolArray: [true, false], + arrayWithUndefined: [1, undefined, 2], + }); + }); + + it('deletes attributes when setting to `undefined`', () => { + const span = new Span(); + + span.setAttribute('str', 'bar'); + + expect(Object.keys(span.attributes).length).toEqual(1); + + span.setAttributes({ str: undefined }); + + expect(Object.keys(span.attributes).length).toEqual(0); + }); + }); + + // Ensure that attributes & data are merged together + describe('_getData', () => { + it('works without data & attributes', () => { + const span = new Span(); + + expect(span['_getData']()).toEqual(undefined); + }); + + it('works with data only', () => { + const span = new Span(); + span.setData('foo', 'bar'); + + expect(span['_getData']()).toEqual({ foo: 'bar' }); + expect(span['_getData']()).toBe(span.data); + }); + + it('works with attributes only', () => { + const span = new Span(); + span.setAttribute('foo', 'bar'); + + expect(span['_getData']()).toEqual({ foo: 'bar' }); + expect(span['_getData']()).toBe(span.attributes); + }); + + it('merges data & attributes', () => { + const span = new Span(); + span.setAttribute('foo', 'foo'); + span.setAttribute('bar', 'bar'); + span.setData('foo', 'foo2'); + span.setData('baz', 'baz'); + + expect(span['_getData']()).toEqual({ foo: 'foo', bar: 'bar', baz: 'baz' }); + expect(span['_getData']()).not.toBe(span.attributes); + expect(span['_getData']()).not.toBe(span.data); + }); + }); }); diff --git a/packages/node/src/integrations/undici/types.ts b/packages/node/src/integrations/undici/types.ts index 225760d7bd7c..b51da3da2d34 100644 --- a/packages/node/src/integrations/undici/types.ts +++ b/packages/node/src/integrations/undici/types.ts @@ -1,7 +1,7 @@ // Vendored from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/5a94716c6788f654aea7999a5fc28f4f1e7c48ad/types/node/diagnostics_channel.d.ts import type { URL } from 'url'; -import type { Span } from '@sentry/core'; +import type { Span } from '@sentry/types'; // License: // This project is licensed under the MIT license. diff --git a/packages/sveltekit/src/server/handle.ts b/packages/sveltekit/src/server/handle.ts index beff32affc19..c999e7ad6fe9 100644 --- a/packages/sveltekit/src/server/handle.ts +++ b/packages/sveltekit/src/server/handle.ts @@ -1,8 +1,8 @@ -/* eslint-disable @sentry-internal/sdk/no-optional-chaining */ -import type { Span } from '@sentry/core'; import { getCurrentScope } from '@sentry/core'; import { getActiveTransaction, runWithAsyncContext, startSpan } from '@sentry/core'; import { captureException } from '@sentry/node'; +/* eslint-disable @sentry-internal/sdk/no-optional-chaining */ +import type { Span } from '@sentry/types'; import { dynamicSamplingContextToSentryBaggageHeader, objectify } from '@sentry/utils'; import type { Handle, ResolveOptions } from '@sveltejs/kit'; diff --git a/packages/tracing/test/span.test.ts b/packages/tracing/test/span.test.ts index c5a3c602952e..7920420dbfbe 100644 --- a/packages/tracing/test/span.test.ts +++ b/packages/tracing/test/span.test.ts @@ -480,7 +480,6 @@ describe('Span', () => { expect(newContext).toStrictEqual({ ...originalContext, - data: {}, spanId: expect.any(String), startTimestamp: expect.any(Number), tags: {}, diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 34e4cd40a741..c74715d0041e 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -89,7 +89,7 @@ export type { // eslint-disable-next-line deprecation/deprecation export type { Severity, SeverityLevel } from './severity'; -export type { Span, SpanContext, SpanOrigin } from './span'; +export type { Span, SpanContext, SpanOrigin, SpanAttributeValue, SpanAttributes } from './span'; export type { StackFrame } from './stackframe'; export type { Stacktrace, StackParser, StackLineParser, StackLineParserFn } from './stacktrace'; export type { TextEncoderInternal } from './textencoder'; diff --git a/packages/types/src/span.ts b/packages/types/src/span.ts index 1877d7a25524..e8dcc92d9d4a 100644 --- a/packages/types/src/span.ts +++ b/packages/types/src/span.ts @@ -12,6 +12,17 @@ export type SpanOrigin = | `${SpanOriginType}.${SpanOriginCategory}.${SpanOriginIntegrationName}` | `${SpanOriginType}.${SpanOriginCategory}.${SpanOriginIntegrationName}.${SpanOriginIntegrationPart}`; +// These types are aligned with OpenTelemetry Span Attributes +export type SpanAttributeValue = + | string + | number + | boolean + | Array + | Array + | Array; + +export type SpanAttributes = Record; + /** Interface holding all properties that can be set on a Span on creation. */ export interface SpanContext { /** @@ -65,6 +76,11 @@ export interface SpanContext { */ data?: { [key: string]: any }; + /** + * Attributes of the Span. + */ + attributes?: SpanAttributes; + /** * Timestamp in seconds (epoch time) indicating when the span started. */ @@ -118,6 +134,11 @@ export interface Span extends SpanContext { */ data: { [key: string]: any }; + /** + * @inheritDoc + */ + attributes: SpanAttributes; + /** * The transaction containing this span */ @@ -156,6 +177,18 @@ export interface Span extends SpanContext { */ setData(key: string, value: any): this; + /** + * Set a single attribute on the span. + * Set it to `undefined` to remove the attribute. + */ + setAttribute(key: string, value: SpanAttributeValue | undefined): void; + + /** + * Set multiple attributes on the span. + * Any attribute set to `undefined` will be removed. + */ + setAttributes(attributes: SpanAttributes): void; + /** * Sets the status attribute on the current span * See: {@sentry/tracing SpanStatus} for possible values diff --git a/packages/types/src/transaction.ts b/packages/types/src/transaction.ts index 3e1ad24d4669..fc682dc0b16a 100644 --- a/packages/types/src/transaction.ts +++ b/packages/types/src/transaction.ts @@ -4,7 +4,7 @@ import type { Instrumenter } from './instrumenter'; import type { MeasurementUnit } from './measurement'; import type { ExtractedNodeRequestData, Primitive, WorkerLocation } from './misc'; import type { PolymorphicRequest } from './polymorphics'; -import type { Span, SpanContext } from './span'; +import type { Span, SpanAttributes, SpanContext } from './span'; /** * Interface holding Transaction-specific properties @@ -68,6 +68,11 @@ export interface Transaction extends TransactionContext, Omit Date: Wed, 3 Jan 2024 10:09:56 +0100 Subject: [PATCH 28/51] chore: Create `dev-packages` folder (#9997) --- .eslintrc.js | 2 +- .github/workflows/build.yml | 27 +++++++++--------- .github/workflows/canary.yml | 8 +++--- .github/workflows/flaky-test-detector.yml | 6 ++-- .gitignore | 1 + CODEOWNERS | 2 +- biome.json | 8 +++--- .../browser-integration-tests/.eslintrc.js | 0 .../browser-integration-tests/.gitignore | 0 .../browser-integration-tests/README.md | 0 .../fixtures/loader.js | 0 .../noOnLoad/captureException/subject.js | 0 .../loader/noOnLoad/captureException/test.ts | 0 .../noOnLoad/customOnErrorHandler/subject.js | 0 .../noOnLoad/customOnErrorHandler/test.ts | 0 .../loader/noOnLoad/errorHandler/subject.js | 0 .../loader/noOnLoad/errorHandler/test.ts | 0 .../noOnLoad/errorHandlerLater/subject.js | 0 .../loader/noOnLoad/errorHandlerLater/test.ts | 0 .../loader-suites/loader/noOnLoad/init.js | 0 .../noOnLoad/pageloadTransaction/init.js | 0 .../noOnLoad/pageloadTransaction/test.ts | 0 .../loader/noOnLoad/replay/init.js | 0 .../loader/noOnLoad/replay/test.ts | 0 .../noOnLoad/sdkLoadedInMeanwhile/subject.js | 0 .../noOnLoad/sdkLoadedInMeanwhile/test.ts | 0 .../subject.js | 0 .../unhandeledPromiseRejectionHandler/test.ts | 0 .../loader/onLoad/captureException/subject.js | 0 .../loader/onLoad/captureException/test.ts | 0 .../onLoad/captureExceptionInOnLoad/init.js | 0 .../captureExceptionInOnLoad/subject.js | 0 .../onLoad/captureExceptionInOnLoad/test.ts | 0 .../onLoad/customBrowserTracing/init.js | 0 .../onLoad/customBrowserTracing/test.ts | 0 .../loader/onLoad/customInit/init.js | 0 .../loader/onLoad/customInit/test.ts | 0 .../loader/onLoad/customIntegrations/init.js | 0 .../onLoad/customIntegrations/subject.js | 0 .../loader/onLoad/customIntegrations/test.ts | 0 .../onLoad/customIntegrationsFunction/init.js | 0 .../customIntegrationsFunction/subject.js | 0 .../onLoad/customIntegrationsFunction/test.ts | 0 .../loader/onLoad/customReplay/init.js | 0 .../loader/onLoad/customReplay/test.ts | 0 .../loader/onLoad/errorHandler/subject.js | 0 .../loader/onLoad/errorHandler/test.ts | 0 .../onLoad/errorHandlerLater/subject.js | 0 .../loader/onLoad/errorHandlerLater/test.ts | 0 .../loader-suites/loader/onLoad/init.js | 0 .../loader/onLoad/onLoadLate/init.js | 0 .../loader/onLoad/onLoadLate/subject.js | 0 .../loader/onLoad/onLoadLate/test.ts | 0 .../loader/onLoad/pageloadTransaction/init.js | 0 .../loader/onLoad/pageloadTransaction/test.ts | 0 .../loader/onLoad/replay/init.js | 0 .../loader/onLoad/replay/test.ts | 0 .../loader/onLoad/sentryOnLoad/init.js | 0 .../loader/onLoad/sentryOnLoad/subject.js | 0 .../loader/onLoad/sentryOnLoad/template.html | 0 .../loader/onLoad/sentryOnLoad/test.ts | 0 .../onLoad/sentryOnLoadAndOnLoad/init.js | 0 .../onLoad/sentryOnLoadAndOnLoad/subject.js | 0 .../sentryOnLoadAndOnLoad/template.html | 0 .../onLoad/sentryOnLoadAndOnLoad/test.ts | 0 .../browser-integration-tests/package.json | 0 .../playwright.config.ts | 0 .../playwright.setup.ts | 0 .../scripts/detectFlakyTests.ts | 0 .../suites/feedback/captureFeedback/init.js | 0 .../feedback/captureFeedback/template.html | 0 .../suites/feedback/captureFeedback/test.ts | 0 .../feedback/captureFeedbackAndReplay/init.js | 0 .../captureFeedbackAndReplay/template.html | 0 .../feedback/captureFeedbackAndReplay/test.ts | 0 .../Breadcrumbs/dom/click/template.html | 0 .../Breadcrumbs/dom/click/test.ts | 0 .../integrations/Breadcrumbs/dom/init.js | 0 .../Breadcrumbs/dom/textInput/template.html | 0 .../Breadcrumbs/dom/textInput/test.ts | 0 .../Breadcrumbs/fetch/get/subject.js | 0 .../Breadcrumbs/fetch/get/test.ts | 0 .../integrations/Breadcrumbs/fetch/init.js | 0 .../Breadcrumbs/fetch/post/subject.js | 0 .../Breadcrumbs/fetch/post/test.ts | 0 .../Breadcrumbs/xhr/get/subject.js | 0 .../integrations/Breadcrumbs/xhr/get/test.ts | 0 .../integrations/Breadcrumbs/xhr/init.js | 0 .../Breadcrumbs/xhr/post/subject.js | 0 .../integrations/Breadcrumbs/xhr/post/test.ts | 0 .../suites/integrations/ContextLines/init.js | 0 .../ContextLines/inline/template.html | 0 .../integrations/ContextLines/inline/test.ts | 0 .../ContextLines/noAddedLines/subject.js | 0 .../ContextLines/noAddedLines/template.html | 0 .../ContextLines/noAddedLines/test.ts | 0 .../ContextLines/scriptTag/template.html | 0 .../ContextLines/scriptTag/test.ts | 0 .../integrations/httpclient/axios/subject.js | 0 .../integrations/httpclient/axios/test.ts | 0 .../integrations/httpclient/fetch/init.js | 0 .../httpclient/fetch/simple/subject.js | 0 .../httpclient/fetch/simple/test.ts | 0 .../httpclient/fetch/withRequest/subject.js | 0 .../httpclient/fetch/withRequest/test.ts | 0 .../withRequestAndBodyAndOptions/subject.js | 0 .../withRequestAndBodyAndOptions/test.ts | 0 .../fetch/withRequestAndOptions/subject.js | 0 .../fetch/withRequestAndOptions/test.ts | 0 .../suites/integrations/httpclient/init.js | 0 .../integrations/httpclient/xhr/subject.js | 0 .../integrations/httpclient/xhr/test.ts | 0 .../manual-client/browser-context/init.js | 0 .../manual-client/browser-context/test.ts | 0 .../addBreadcrumb/empty_obj/subject.js | 0 .../addBreadcrumb/empty_obj/test.ts | 0 .../suites/public-api/addBreadcrumb/init.js | 0 .../multiple_breadcrumbs/subject.js | 0 .../multiple_breadcrumbs/test.ts | 0 .../simple_breadcrumb/subject.js | 0 .../addBreadcrumb/simple_breadcrumb/test.ts | 0 .../addBreadcrumb/undefined_arg/subject.js | 0 .../addBreadcrumb/undefined_arg/test.ts | 0 .../captureException/classInstance/subject.js | 0 .../captureException/classInstance/test.ts | 0 .../captureException/emptyObj/subject.js | 0 .../captureException/emptyObj/test.ts | 0 .../captureException/errorEvent/init.js | 0 .../captureException/errorEvent/subject.js | 0 .../captureException/errorEvent/test.ts | 0 .../captureException/event/subject.js | 0 .../public-api/captureException/event/test.ts | 0 .../public-api/captureException/init.js | 0 .../captureException/linkedErrrors/subject.js | 0 .../captureException/linkedErrrors/test.ts | 0 .../captureException/plainObject/subject.js | 0 .../captureException/plainObject/test.ts | 0 .../captureException/simpleError/subject.js | 0 .../captureException/simpleError/test.ts | 0 .../captureException/undefinedArg/subject.js | 0 .../captureException/undefinedArg/test.ts | 0 .../suites/public-api/captureMessage/init.js | 0 .../captureMessage/simple_message/subject.js | 0 .../captureMessage/simple_message/test.ts | 0 .../captureMessage/with_level/subject.js | 0 .../captureMessage/with_level/test.ts | 0 .../public-api/captureUserFeedback/init.js | 0 .../simple_feedback/subject.js | 0 .../simple_feedback/test.ts | 0 .../configureScope/clear_scope/subject.js | 0 .../configureScope/clear_scope/test.ts | 0 .../suites/public-api/configureScope/init.js | 0 .../configureScope/set_properties/subject.js | 0 .../configureScope/set_properties/test.ts | 0 .../suites/public-api/debug/init.js | 0 .../suites/public-api/debug/test.ts | 0 .../suites/public-api/init/console/test.ts | 0 .../suites/public-api/init/init.js | 0 .../subject.js | 0 .../test.ts | 0 .../subject.js | 0 .../eventListener-this-preservation/test.ts | 0 .../eventListener-wrapping/subject.js | 0 .../eventListener-wrapping/test.ts | 0 .../instrumentation/eventListener/subject.js | 0 .../instrumentation/eventListener/test.ts | 0 .../suites/public-api/instrumentation/init.js | 0 .../instrumentation/setTimeout/subject.js | 0 .../instrumentation/setTimeout/test.ts | 0 .../instrumentation/setTimeoutFrozen/init.js | 0 .../setTimeoutFrozen/subject.js | 0 .../instrumentation/setTimeoutFrozen/test.ts | 0 .../suites/public-api/setContext/init.js | 0 .../setContext/multiple_contexts/subject.js | 0 .../setContext/multiple_contexts/test.ts | 0 .../non_serializable_context/subject.js | 0 .../non_serializable_context/test.ts | 0 .../setContext/simple_context/subject.js | 0 .../setContext/simple_context/test.ts | 0 .../suites/public-api/setExtra/init.js | 0 .../setExtra/multiple_extras/subject.js | 0 .../setExtra/multiple_extras/test.ts | 0 .../non_serializable_extra/subject.js | 0 .../setExtra/non_serializable_extra/test.ts | 0 .../setExtra/simple_extra/subject.js | 0 .../public-api/setExtra/simple_extra/test.ts | 0 .../setExtras/consecutive_calls/subject.js | 0 .../setExtras/consecutive_calls/test.ts | 0 .../suites/public-api/setExtras/init.js | 0 .../setExtras/multiple_extras/subject.js | 0 .../setExtras/multiple_extras/test.ts | 0 .../suites/public-api/setTag/init.js | 0 .../setTag/with_non_primitives/subject.js | 0 .../setTag/with_non_primitives/test.ts | 0 .../setTag/with_primitives/subject.js | 0 .../public-api/setTag/with_primitives/test.ts | 0 .../suites/public-api/setTags/init.js | 0 .../setTags/with_non_primitives/subject.js | 0 .../setTags/with_non_primitives/test.ts | 0 .../setTags/with_primitives/subject.js | 0 .../setTags/with_primitives/test.ts | 0 .../suites/public-api/setUser/init.js | 0 .../public-api/setUser/unset_user/subject.js | 0 .../public-api/setUser/unset_user/test.ts | 0 .../public-api/setUser/update_user/subject.js | 0 .../public-api/setUser/update_user/test.ts | 0 .../public-api/showReportDialog/init.js | 0 .../showReportDialog/inject-script/subject.js | 0 .../showReportDialog/inject-script/test.ts | 0 .../public-api/startSpan/basic/subject.js | 0 .../suites/public-api/startSpan/basic/test.ts | 0 .../error-async-reject/template.html | 0 .../startSpan/error-async-reject/test.ts | 0 .../template.html | 0 .../error-async-throw-not-awaited/test.ts | 0 .../startSpan/error-async-throw/template.html | 0 .../startSpan/error-async-throw/test.ts | 0 .../startSpan/error-sync/subject.js | 0 .../public-api/startSpan/error-sync/test.ts | 0 .../suites/public-api/startSpan/init.js | 0 .../startTransaction/basic_usage/subject.js | 0 .../startTransaction/basic_usage/test.ts | 0 .../startTransaction/circular_data/subject.js | 0 .../startTransaction/circular_data/test.ts | 0 .../public-api/startTransaction/init.js | 0 .../setMeasurement/subject.js | 0 .../startTransaction/setMeasurement/test.ts | 0 .../suites/public-api/withScope/init.js | 0 .../withScope/nested_scopes/subject.js | 0 .../withScope/nested_scopes/test.ts | 0 .../suites/replay/bufferMode/init.js | 0 .../suites/replay/bufferMode/subject.js | 0 .../suites/replay/bufferMode/template.html | 0 .../suites/replay/bufferMode/test.ts | 0 .../suites/replay/bufferModeReload/init.js | 0 .../replay/bufferModeReload/template.html | 0 .../suites/replay/bufferModeReload/test.ts | 0 .../replay/captureComponentName/init.js | 0 .../replay/captureComponentName/template.html | 0 .../replay/captureComponentName/test.ts | 0 .../replay/captureConsoleLog/template.html | 0 .../suites/replay/captureConsoleLog/test.ts | 0 .../suites/replay/captureReplay/template.html | 0 .../suites/replay/captureReplay/test.ts | 0 .../captureReplayFromReplayPackage/init.js | 0 .../template.html | 0 .../captureReplayFromReplayPackage/test.ts | 0 .../suites/replay/compressionDisabled/init.js | 0 .../replay/compressionDisabled/template.html | 0 .../suites/replay/compressionDisabled/test.ts | 0 .../suites/replay/compressionEnabled/init.js | 0 .../replay/compressionEnabled/template.html | 0 .../suites/replay/compressionEnabled/test.ts | 0 .../replay/compressionWorkerUrl/init.js | 0 .../replay/compressionWorkerUrl/template.html | 0 .../replay/compressionWorkerUrl/test.ts | 2 +- .../suites/replay/customEvents/init.js | 0 .../suites/replay/customEvents/subject.js | 0 .../suites/replay/customEvents/template.html | 0 .../suites/replay/customEvents/test.ts | 0 .../suites/replay/dsc/init.js | 0 .../suites/replay/dsc/test.ts | 0 .../suites/replay/errorResponse/template.html | 0 .../suites/replay/errorResponse/test.ts | 0 .../replay/errors/beforeErrorSampling/init.js | 0 .../replay/errors/beforeErrorSampling/test.ts | 0 .../suites/replay/errors/droppedError/init.js | 0 .../suites/replay/errors/droppedError/test.ts | 0 .../suites/replay/errors/errorMode/test.ts | 0 .../errors/errorModeCustomTransport/init.js | 0 .../errors/errorModeCustomTransport/test.ts | 0 .../suites/replay/errors/errorNotSent/init.js | 0 .../suites/replay/errors/errorNotSent/test.ts | 0 .../replay/errors/errorsInSession/init.js | 0 .../replay/errors/errorsInSession/test.ts | 0 .../suites/replay/errors/init.js | 0 .../suites/replay/errors/subject.js | 0 .../suites/replay/errors/template.html | 0 .../replay/eventBufferError/template.html | 0 .../suites/replay/eventBufferError/test.ts | 0 .../suites/replay/exceptions/template.html | 0 .../suites/replay/exceptions/test.ts | 0 .../fetch/captureRequestBody/init.js | 0 .../fetch/captureRequestBody/test.ts | 0 .../fetch/captureRequestHeaders/init.js | 0 .../fetch/captureRequestHeaders/test.ts | 0 .../fetch/captureRequestSize/test.ts | 0 .../fetch/captureResponseBody/init.js | 0 .../fetch/captureResponseBody/test.ts | 0 .../fetch/captureResponseHeaders/init.js | 0 .../fetch/captureResponseHeaders/test.ts | 0 .../fetch/captureResponseSize/test.ts | 0 .../fetch/captureTimestamps/init.js | 0 .../fetch/captureTimestamps/test.ts | 0 .../extendNetworkBreadcrumbs/fetch/init.js | 0 .../xhr/captureRequestBody/init.js | 0 .../xhr/captureRequestBody/test.ts | 0 .../xhr/captureRequestHeaders/init.js | 0 .../xhr/captureRequestHeaders/test.ts | 0 .../xhr/captureRequestSize/test.ts | 0 .../xhr/captureResponseBody/init.js | 0 .../xhr/captureResponseBody/test.ts | 0 .../xhr/captureResponseHeaders/init.js | 0 .../xhr/captureResponseHeaders/test.ts | 0 .../xhr/captureResponseSize/test.ts | 0 .../xhr/captureTimestamps/init.js | 0 .../xhr/captureTimestamps/test.ts | 0 .../extendNetworkBreadcrumbs/xhr/init.js | 0 .../suites/replay/fileInput/init.js | 0 .../suites/replay/fileInput/template.html | 0 .../suites/replay/fileInput/test.ts | 0 .../suites/replay/flushing/init.js | 0 .../suites/replay/flushing/subject.js | 0 .../suites/replay/flushing/template.html | 0 .../suites/replay/flushing/test.ts | 0 .../suites/replay/init.js | 0 .../suites/replay/keyboardEvents/init.js | 0 .../replay/keyboardEvents/template.html | 0 .../suites/replay/keyboardEvents/test.ts | 0 .../largeMutations/defaultOptions/init.js | 0 .../defaultOptions/template.html | 0 .../largeMutations/defaultOptions/test.ts | 0 .../largeMutations/mutationLimit/init.js | 0 .../mutationLimit/template.html | 0 .../largeMutations/mutationLimit/test.ts | 0 .../suites/replay/maxReplayDuration/init.js | 0 .../replay/maxReplayDuration/template.html | 0 .../suites/replay/maxReplayDuration/test.ts | 0 .../suites/replay/minReplayDuration/init.js | 0 .../replay/minReplayDuration/template.html | 0 .../suites/replay/minReplayDuration/test.ts | 0 .../suites/replay/multiple-pages/init.js | 0 .../suites/replay/multiple-pages/page-0.html | 0 .../suites/replay/multiple-pages/subject.js | 0 .../replay/multiple-pages/template.html | 0 .../suites/replay/multiple-pages/test.ts | 0 .../test.ts-snapshots/seg-0-snap-full | 0 .../seg-0-snap-full-chromium | 0 .../test.ts-snapshots/seg-1-snap-incremental | 0 .../seg-1-snap-incremental-chromium | 0 .../test.ts-snapshots/seg-2-snap-full | 0 .../seg-2-snap-full-chromium | 0 .../test.ts-snapshots/seg-3-snap-incremental | 0 .../seg-3-snap-incremental-chromium | 0 .../test.ts-snapshots/seg-4-snap-full | 0 .../seg-4-snap-full-chromium | 0 .../test.ts-snapshots/seg-5-snap-incremental | 0 .../seg-5-snap-incremental-chromium | 0 .../test.ts-snapshots/seg-6-snap-incremental | 0 .../seg-6-snap-incremental-chromium | 0 .../test.ts-snapshots/seg-7-snap-incremental | 0 .../seg-7-snap-incremental-chromium | 0 .../test.ts-snapshots/seg-8-snap-full | 0 .../seg-8-snap-full-chromium | 0 .../test.ts-snapshots/seg-9-snap-incremental | 0 .../seg-9-snap-incremental-chromium | 0 .../suites/replay/privacyBlock/init.js | 0 .../suites/replay/privacyBlock/template.html | 0 .../suites/replay/privacyBlock/test.ts | 0 .../test.ts-snapshots/privacy-chromium.json | 0 .../test.ts-snapshots/privacy-firefox.json | 0 .../test.ts-snapshots/privacy-webkit.json | 0 .../test.ts-snapshots/privacy.json | 0 .../suites/replay/privacyDefault/init.js | 0 .../replay/privacyDefault/template.html | 0 .../suites/replay/privacyDefault/test.ts | 0 .../test.ts-snapshots/privacy-chromium.json | 0 .../test.ts-snapshots/privacy-firefox.json | 0 .../test.ts-snapshots/privacy-webkit.json | 0 .../test.ts-snapshots/privacy.json | 0 .../suites/replay/privacyInput/init.js | 0 .../suites/replay/privacyInput/template.html | 0 .../suites/replay/privacyInput/test.ts | 0 .../suites/replay/privacyInputMaskAll/init.js | 0 .../replay/privacyInputMaskAll/template.html | 0 .../suites/replay/privacyInputMaskAll/test.ts | 0 .../suites/replay/replayShim/init.js | 0 .../suites/replay/replayShim/template.html | 0 .../suites/replay/replayShim/test.ts | 0 .../suites/replay/requests/init.js | 0 .../suites/replay/requests/subject.js | 0 .../suites/replay/requests/template.html | 0 .../suites/replay/requests/test.ts | 0 .../suites/replay/sampling/init.js | 0 .../suites/replay/sampling/template.html | 0 .../suites/replay/sampling/test.ts | 0 .../suites/replay/sessionExpiry/init.js | 0 .../suites/replay/sessionExpiry/template.html | 0 .../suites/replay/sessionExpiry/test.ts | 0 .../snapshot-0-chromium.json | 0 .../test.ts-snapshots/snapshot-0-webkit.json | 0 .../snapshot-2-chromium.json | 0 .../test.ts-snapshots/snapshot-2-webkit.json | 0 .../suites/replay/sessionInactive/init.js | 0 .../replay/sessionInactive/template.html | 0 .../suites/replay/sessionInactive/test.ts | 0 .../snapshot-0-chromium.json | 0 .../test.ts-snapshots/snapshot-0-webkit.json | 0 .../snapshot-1-chromium.json | 0 .../test.ts-snapshots/snapshot-1-webkit.json | 0 .../suites/replay/sessionMaxAge/init.js | 0 .../suites/replay/sessionMaxAge/template.html | 0 .../suites/replay/sessionMaxAge/test.ts | 0 .../snapshot-0-chromium.json | 0 .../test.ts-snapshots/snapshot-0-webkit.json | 0 .../snapshot-2-chromium.json | 0 .../test.ts-snapshots/snapshot-2-webkit.json | 0 .../replay/slowClick/clickTargets/test.ts | 0 .../suites/replay/slowClick/disable/init.js | 0 .../suites/replay/slowClick/disable/test.ts | 0 .../suites/replay/slowClick/error/init.js | 0 .../replay/slowClick/error/template.html | 0 .../suites/replay/slowClick/error/test.ts | 0 .../suites/replay/slowClick/ignore/test.ts | 0 .../suites/replay/slowClick/init.js | 0 .../replay/slowClick/multiClick/test.ts | 0 .../suites/replay/slowClick/mutation/test.ts | 0 .../suites/replay/slowClick/scroll/test.ts | 0 .../suites/replay/slowClick/template.html | 0 .../suites/replay/slowClick/timeout/test.ts | 0 .../replay/slowClick/windowOpen/test.ts | 0 .../suites/replay/throttleBreadcrumbs/init.js | 0 .../replay/throttleBreadcrumbs/subject.js | 0 .../replay/throttleBreadcrumbs/template.html | 0 .../suites/replay/throttleBreadcrumbs/test.ts | 0 .../suites/replay/unicode/compressed/init.js | 0 .../suites/replay/unicode/compressed/test.ts | 0 .../unicode-compressed-chromium.json | 0 .../unicode-compressed-firefox.json | 0 .../unicode-compressed-webkit.json | 0 .../test.ts-snapshots/unicode-compressed.json | 0 .../suites/replay/unicode/subject.js | 0 .../suites/replay/unicode/template.html | 0 .../replay/unicode/uncompressed/init.js | 0 .../replay/unicode/uncompressed/test.ts | 0 .../unicode-uncompressed-chromium.json | 0 .../unicode-uncompressed-firefox.json | 0 .../unicode-uncompressed-webkit.json | 0 .../unicode-uncompressed.json | 0 .../suites/sessions/init.js | 0 .../sessions/start-session/template.html | 0 .../suites/sessions/start-session/test.ts | 0 .../suites/sessions/update-session/subject.js | 0 .../sessions/update-session/template.html | 0 .../suites/sessions/update-session/test.ts | 0 .../suites/stacktraces/init.js | 0 .../subject.js | 0 .../test.ts | 0 .../protocol_fn_identifiers/subject.js | 0 .../protocol_fn_identifiers/test.ts | 0 .../regular_fn_identifiers/subject.js | 0 .../regular_fn_identifiers/test.ts | 0 .../suites/stacktraces/template.html | 0 .../browserTracingIntegrationShim/init.js | 0 .../template.html | 0 .../browserTracingIntegrationShim/test.ts | 0 .../suites/tracing/browserTracingShim/init.js | 0 .../tracing/browserTracingShim/template.html | 0 .../suites/tracing/browserTracingShim/test.ts | 0 .../backgroundtab-custom/init.js | 0 .../backgroundtab-custom/subject.js | 0 .../backgroundtab-custom/template.html | 0 .../backgroundtab-custom/test.ts | 0 .../backgroundtab-pageload/subject.js | 0 .../backgroundtab-pageload/template.html | 0 .../backgroundtab-pageload/test.ts | 0 .../browsertracing/http-timings/init.js | 0 .../browsertracing/http-timings/subject.js | 0 .../browsertracing/http-timings/test.ts | 0 .../suites/tracing/browsertracing/init.js | 0 .../interactions/assets/script.js | 0 .../browsertracing/interactions/init.js | 0 .../browsertracing/interactions/template.html | 0 .../browsertracing/interactions/test.ts | 0 .../long-tasks-disabled/assets/script.js | 0 .../long-tasks-disabled/init.js | 0 .../long-tasks-disabled/template.html | 0 .../long-tasks-disabled/test.ts | 0 .../long-tasks-enabled/assets/script.js | 0 .../browsertracing/long-tasks-enabled/init.js | 0 .../long-tasks-enabled/template.html | 0 .../browsertracing/long-tasks-enabled/test.ts | 0 .../tracing/browsertracing/meta/init.js | 0 .../tracing/browsertracing/meta/template.html | 0 .../tracing/browsertracing/meta/test.ts | 0 .../tracing/browsertracing/navigation/test.ts | 0 .../tracing/browsertracing/pageload/init.js | 0 .../tracing/browsertracing/pageload/test.ts | 0 .../browsertracing/pageloadDelayed/init.js | 0 .../browsertracing/pageloadDelayed/test.ts | 0 .../customTargets/init.js | 0 .../customTargets/subject.js | 0 .../customTargets/test.ts | 0 .../customTargetsAndOrigins/init.js | 0 .../customTargetsAndOrigins/subject.js | 0 .../customTargetsAndOrigins/test.ts | 0 .../customTracingOrigins/init.js | 0 .../customTracingOrigins/subject.js | 0 .../customTracingOrigins/test.ts | 0 .../defaultTargetsMatch/init.js | 0 .../defaultTargetsMatch/subject.js | 0 .../defaultTargetsMatch/test.ts | 0 .../defaultTargetsNoMatch/init.js | 0 .../defaultTargetsNoMatch/subject.js | 0 .../defaultTargetsNoMatch/test.ts | 0 .../envelope-header-transaction-name/init.js | 0 .../envelope-header-transaction-name/test.ts | 0 .../suites/tracing/envelope-header/init.js | 0 .../suites/tracing/envelope-header/test.ts | 0 .../metrics/connection-rtt/template.html | 0 .../tracing/metrics/connection-rtt/test.ts | 0 .../suites/tracing/metrics/init.js | 0 .../metrics/pageload-browser-spans/test.ts | 0 .../pageload-resource-spans/assets/image.svg | 0 .../pageload-resource-spans/assets/script.js | 0 .../pageload-resource-spans/assets/style.css | 0 .../pageload-resource-spans/template.html | 0 .../metrics/pageload-resource-spans/test.ts | 0 .../tracing/metrics/web-vitals-cls/subject.js | 0 .../metrics/web-vitals-cls/template.html | 0 .../tracing/metrics/web-vitals-cls/test.ts | 0 .../metrics/web-vitals-fid/template.html | 0 .../tracing/metrics/web-vitals-fid/test.ts | 0 .../metrics/web-vitals-fp-fcp/template.html | 0 .../tracing/metrics/web-vitals-fp-fcp/test.ts | 0 .../assets/sentry-logo-600x179.png | Bin .../metrics/web-vitals-lcp/template.html | 0 .../tracing/metrics/web-vitals-lcp/test.ts | 0 .../metrics/web-vitals-ttfb/template.html | 0 .../tracing/metrics/web-vitals-ttfb/test.ts | 0 .../suites/tracing/request/fetch/subject.js | 0 .../suites/tracing/request/fetch/test.ts | 0 .../suites/tracing/request/init.js | 0 .../suites/tracing/request/xhr/subject.js | 0 .../suites/tracing/request/xhr/test.ts | 0 .../suites/transport/offline/init.js | 0 .../transport/offline/queued/subject.js | 0 .../suites/transport/offline/queued/test.ts | 0 .../suites/wasm/init.js | 0 .../suites/wasm/simple.wasm | Bin .../suites/wasm/subject.js | 0 .../suites/wasm/test.ts | 0 .../browser-integration-tests/tsconfig.json | 0 .../utils/defaults/template.html | 0 .../utils/fixtures.ts | 0 .../utils/generatePage.ts | 0 .../utils/generatePlugin.ts | 10 ++++--- .../utils/helpers.ts | 0 .../utils/replayEventTemplates.ts | 0 .../utils/replayHelpers.ts | 0 .../utils/staticAssets.ts | 0 .../utils/wasmHelpers.ts | 0 .../utils/web-vitals/cls.ts | 0 .../webpack.config.ts | 0 .../e2e-tests/.env.example | 0 .../e2e-tests/.eslintrc.js | 0 .../e2e-tests/.gitignore | 0 .../e2e-tests/Dockerfile.publish-packages | 2 +- {packages => dev-packages}/e2e-tests/LICENSE | 0 .../e2e-tests/README.md | 0 .../e2e-tests/lib/constants.ts | 0 .../e2e-tests/lib/validate.ts | 0 .../e2e-tests/package.json | 0 .../e2e-tests/prepare.ts | 0 .../e2e-tests/publish-packages.ts | 0 .../e2e-tests/registrySetup.ts | 0 {packages => dev-packages}/e2e-tests/run.ts | 0 .../create-next-app/.gitignore | 0 .../test-applications/create-next-app/.npmrc | 0 .../create-next-app/globals.d.ts | 0 .../create-next-app/next-env.d.ts | 0 .../create-next-app/next.config.js | 0 .../create-next-app/package.json | 0 .../create-next-app/pages/_app.tsx | 0 .../create-next-app/pages/_document.tsx | 0 .../create-next-app/pages/_error.tsx | 0 .../create-next-app/pages/api/error.ts | 0 .../create-next-app/pages/api/success.ts | 0 .../create-next-app/pages/index.tsx | 0 .../create-next-app/pages/user/[id].tsx | 0 .../create-next-app/playwright.config.ts | 0 .../create-next-app/sentry.client.config.ts | 0 .../create-next-app/sentry.server.config.ts | 0 .../tests/behaviour-client.test.ts | 0 .../tests/behaviour-server.test.ts | 0 .../create-next-app/tsconfig.json | 0 .../create-react-app/.gitignore | 0 .../test-applications/create-react-app/.npmrc | 0 .../create-react-app/package.json | 0 .../create-react-app/public/favicon.ico | Bin .../create-react-app/public/index.html | 0 .../create-react-app/public/logo192.png | Bin .../create-react-app/public/logo512.png | Bin .../create-react-app/public/manifest.json | 0 .../create-react-app/public/robots.txt | 0 .../create-react-app/src/App.css | 0 .../create-react-app/src/App.tsx | 0 .../create-react-app/src/index.css | 0 .../create-react-app/src/index.tsx | 0 .../create-react-app/src/logo.svg | 0 .../create-react-app/src/react-app-env.d.ts | 0 .../create-react-app/src/reportWebVitals.ts | 0 .../create-react-app/src/setupTests.ts | 0 .../create-react-app/tsconfig.json | 0 .../create-remix-app-v2/.eslintrc.js | 0 .../create-remix-app-v2/.gitignore | 0 .../create-remix-app-v2/.npmrc | 0 .../create-remix-app-v2/README.md | 0 .../create-remix-app-v2/app/entry.client.tsx | 0 .../create-remix-app-v2/app/entry.server.tsx | 0 .../create-remix-app-v2/app/root.tsx | 0 .../create-remix-app-v2/app/routes/_index.tsx | 0 .../app/routes/client-error.tsx | 0 .../app/routes/navigate.tsx | 0 .../app/routes/user.$id.tsx | 0 .../create-remix-app-v2/globals.d.ts | 0 .../create-remix-app-v2/package.json | 0 .../create-remix-app-v2/playwright.config.ts | 0 .../create-remix-app-v2/remix.config.js | 0 .../create-remix-app-v2/remix.env.d.ts | 0 .../tests/behaviour-client.test.ts | 0 .../create-remix-app-v2/tsconfig.json | 0 .../create-remix-app/.eslintrc.js | 0 .../create-remix-app/.gitignore | 0 .../test-applications/create-remix-app/.npmrc | 0 .../create-remix-app/app/entry.client.tsx | 0 .../create-remix-app/app/entry.server.tsx | 0 .../create-remix-app/app/root.tsx | 0 .../create-remix-app/app/routes/_index.tsx | 0 .../app/routes/client-error.tsx | 0 .../create-remix-app/app/routes/navigate.tsx | 0 .../create-remix-app/app/routes/user.$id.tsx | 0 .../create-remix-app/globals.d.ts | 0 .../create-remix-app/package.json | 0 .../create-remix-app/playwright.config.ts | 0 .../create-remix-app/remix.config.js | 0 .../tests/behaviour-client.test.ts | 0 .../create-remix-app/tsconfig.json | 0 .../create-remix-app/upload-sourcemaps.sh | 0 .../debug-id-sourcemaps/.gitignore | 0 .../debug-id-sourcemaps/.npmrc | 0 .../debug-id-sourcemaps/package.json | 0 .../debug-id-sourcemaps/rollup.config.mjs | 0 .../debug-id-sourcemaps/src/app.js | 0 .../tests/__snapshots__/server.test.ts.snap | 0 .../debug-id-sourcemaps/tests/server.test.ts | 0 .../test-applications/generic-ts3.8/.npmrc | 0 .../test-applications/generic-ts3.8/index.ts | 0 .../generic-ts3.8/package.json | 0 .../generic-ts3.8/tsconfig.json | 0 .../test-applications/nextjs-14/.gitignore | 0 .../test-applications/nextjs-14/.npmrc | 0 .../app/generation-functions/page.tsx | 0 .../nextjs-14/app/layout.tsx | 0 .../nextjs-14/event-proxy-server.ts | 0 .../test-applications/nextjs-14/globals.d.ts | 0 .../test-applications/nextjs-14/next-env.d.ts | 0 .../nextjs-14/next.config.js | 0 .../test-applications/nextjs-14/package.json | 0 .../nextjs-14/playwright.config.ts | 0 .../nextjs-14/sentry.client.config.ts | 0 .../nextjs-14/sentry.edge.config.ts | 0 .../nextjs-14/sentry.server.config.ts | 0 .../nextjs-14/start-event-proxy.ts | 0 .../tests/generation-functions.test.ts | 0 .../test-applications/nextjs-14/tsconfig.json | 0 .../nextjs-app-dir/.gitignore | 0 .../test-applications/nextjs-app-dir/.npmrc | 0 .../app/(nested-layout)/layout.tsx | 0 .../(nested-layout)/nested-layout/layout.tsx | 0 .../(nested-layout)/nested-layout/page.tsx | 0 .../app/client-component/error.tsx | 0 .../app/client-component/layout.tsx | 0 .../app/client-component/loading.tsx | 0 .../app/client-component/not-found.tsx | 0 .../app/client-component/page.tsx | 0 .../parameter/[...parameters]/error.tsx | 0 .../parameter/[...parameters]/layout.tsx | 0 .../parameter/[...parameters]/loading.tsx | 0 .../parameter/[...parameters]/not-found.tsx | 0 .../parameter/[...parameters]/page.tsx | 0 .../parameter/[parameter]/error.tsx | 0 .../parameter/[parameter]/layout.tsx | 0 .../parameter/[parameter]/loading.tsx | 0 .../parameter/[parameter]/not-found.tsx | 0 .../parameter/[parameter]/page.tsx | 0 .../app/edge-server-components/error/page.tsx | 0 .../app/edge-server-components/page.tsx | 0 .../nextjs-app-dir/app/error.tsx | 0 .../nextjs-app-dir/app/layout.tsx | 0 .../nextjs-app-dir/app/loading.tsx | 0 .../nextjs-app-dir/app/not-found.tsx | 0 .../nextjs-app-dir/app/page.tsx | 0 .../app/route-handlers/[param]/edge/route.ts | 0 .../app/route-handlers/[param]/error/route.ts | 0 .../app/route-handlers/[param]/route.ts | 0 .../app/route-handlers/static/route.ts | 0 .../nextjs-app-dir/app/server-action/page.tsx | 0 .../app/server-component/error.tsx | 0 .../app/server-component/layout.tsx | 0 .../app/server-component/loading.tsx | 0 .../app/server-component/not-found.tsx | 0 .../app/server-component/not-found/page.tsx | 0 .../app/server-component/page.tsx | 0 .../parameter/[...parameters]/error.tsx | 0 .../parameter/[...parameters]/layout.tsx | 0 .../parameter/[...parameters]/loading.tsx | 0 .../parameter/[...parameters]/not-found.tsx | 0 .../parameter/[...parameters]/page.tsx | 0 .../parameter/[parameter]/error.tsx | 0 .../parameter/[parameter]/layout.tsx | 0 .../parameter/[parameter]/loading.tsx | 0 .../parameter/[parameter]/not-found.tsx | 0 .../parameter/[parameter]/page.tsx | 0 .../app/server-component/redirect/page.tsx | 0 .../nextjs-app-dir/assert-build.ts | 0 .../components/client-error-debug-tools.tsx | 0 .../components/transaction-context.tsx | 0 .../nextjs-app-dir/event-proxy-server.ts | 0 .../nextjs-app-dir/globals.d.ts | 0 .../nextjs-app-dir/middleware.ts | 0 .../nextjs-app-dir/next-env.d.ts | 0 .../nextjs-app-dir/next.config.js | 0 .../nextjs-app-dir/package.json | 0 .../pages/api/async-context-edge-endpoint.ts | 0 .../nextjs-app-dir/pages/api/edge-endpoint.ts | 0 .../pages/api/endpoint-behind-middleware.ts | 0 .../nextjs-app-dir/pages/api/endpoint.ts | 0 .../pages/api/error-edge-endpoint.ts | 0 .../pages/pages-router/ssr-error-class.tsx | 0 .../pages/pages-router/ssr-error-fc.tsx | 0 .../nextjs-app-dir/playwright.config.ts | 0 .../nextjs-app-dir/sentry.client.config.ts | 0 .../nextjs-app-dir/sentry.edge.config.ts | 0 .../nextjs-app-dir/sentry.server.config.ts | 0 .../nextjs-app-dir/start-event-proxy.ts | 0 .../tests/async-context-edge.test.ts | 0 ...client-app-routing-instrumentation.test.ts | 0 .../connected-servercomponent-trace.test.ts | 0 .../tests/devErrorSymbolification.test.ts | 0 .../nextjs-app-dir/tests/edge-route.test.ts | 0 .../nextjs-app-dir/tests/edge.test.ts | 0 .../nextjs-app-dir/tests/exceptions.test.ts | 0 .../nextjs-app-dir/tests/middleware.test.ts | 0 .../tests/pages-ssr-errors.test.ts | 0 .../tests/route-handlers.test.ts | 0 .../nextjs-app-dir/tests/transactions.test.ts | 0 .../nextjs-app-dir/tsconfig.json | 0 .../node-experimental-fastify-app/.gitignore | 0 .../node-experimental-fastify-app/.npmrc | 0 .../event-proxy-server.ts | 0 .../package.json | 0 .../playwright.config.ts | 0 .../node-experimental-fastify-app/src/app.js | 0 .../src/tracing.js | 0 .../start-event-proxy.ts | 0 .../tests/errors.test.ts | 0 .../tests/propagation.test.ts | 0 .../tests/transactions.test.ts | 0 .../tsconfig.json | 0 .../node-express-app/.gitignore | 0 .../test-applications/node-express-app/.npmrc | 0 .../node-express-app/event-proxy-server.ts | 0 .../node-express-app/package.json | 0 .../node-express-app/playwright.config.ts | 0 .../node-express-app/src/app.ts | 0 .../node-express-app/start-event-proxy.ts | 0 .../node-express-app/tests/server.test.ts | 0 .../node-express-app/tsconfig.json | 0 .../node-hapi-app/.gitignore | 0 .../test-applications/node-hapi-app/.npmrc | 0 .../node-hapi-app/event-proxy-server.ts | 0 .../node-hapi-app/package.json | 0 .../node-hapi-app/playwright.config.ts | 0 .../node-hapi-app/src/app.js | 0 .../node-hapi-app/start-event-proxy.ts | 0 .../node-hapi-app/tests/server.test.ts | 0 .../node-hapi-app/tsconfig.json | 0 .../react-create-hash-router/.gitignore | 0 .../react-create-hash-router/.npmrc | 0 .../react-create-hash-router/package.json | 0 .../playwright.config.ts | 0 .../public/index.html | 0 .../react-create-hash-router/src/globals.d.ts | 0 .../react-create-hash-router/src/index.tsx | 0 .../src/pages/Index.tsx | 0 .../src/pages/User.tsx | 0 .../src/react-app-env.d.ts | 0 .../tests/behaviour-test.spec.ts | 0 .../tests/fixtures/ReplayRecordingData.ts | 0 .../react-create-hash-router/tsconfig.json | 0 .../react-router-6-use-routes/.gitignore | 0 .../react-router-6-use-routes/.npmrc | 0 .../react-router-6-use-routes/package.json | 0 .../playwright.config.ts | 0 .../public/index.html | 0 .../src/globals.d.ts | 0 .../react-router-6-use-routes/src/index.tsx | 0 .../src/pages/Index.tsx | 0 .../src/pages/User.tsx | 0 .../src/react-app-env.d.ts | 0 .../tests/behaviour-test.spec.ts | 0 .../tests/fixtures/ReplayRecordingData.ts | 0 .../react-router-6-use-routes/tsconfig.json | 0 .../.gitignore | 0 .../.npmrc | 0 .../package.json | 0 .../playwright.config.ts | 0 .../public/index.html | 0 .../src/globals.d.ts | 0 .../src/index.tsx | 0 .../src/pages/Index.tsx | 0 .../src/pages/User.tsx | 0 .../src/react-app-env.d.ts | 0 .../tests/behaviour-test.spec.ts | 0 .../tsconfig.json | 0 .../standard-frontend-react/.gitignore | 0 .../standard-frontend-react/.npmrc | 0 .../standard-frontend-react/package.json | 0 .../playwright.config.ts | 0 .../standard-frontend-react/public/index.html | 0 .../standard-frontend-react/src/globals.d.ts | 0 .../standard-frontend-react/src/index.tsx | 0 .../src/pages/Index.tsx | 0 .../src/pages/User.tsx | 0 .../src/react-app-env.d.ts | 0 .../tests/behaviour-test.spec.ts | 0 .../tests/fixtures/ReplayRecordingData.ts | 0 .../standard-frontend-react/tsconfig.json | 0 .../test-applications/sveltekit-2/.gitignore | 0 .../test-applications/sveltekit-2/.npmrc | 0 .../test-applications/sveltekit-2/README.md | 0 .../sveltekit-2/event-proxy-server.ts | 0 .../sveltekit-2/package.json | 0 .../sveltekit-2/playwright.config.ts | 0 .../sveltekit-2/src/app.html | 0 .../sveltekit-2/src/hooks.client.ts | 0 .../sveltekit-2/src/hooks.server.ts | 0 .../sveltekit-2/src/routes/+page.svelte | 0 .../src/routes/building/+page.server.ts | 0 .../src/routes/building/+page.svelte | 0 .../sveltekit-2/src/routes/building/+page.ts | 0 .../sveltekit-2/start-event-proxy.ts | 0 .../sveltekit-2/static/favicon.png | Bin .../sveltekit-2/svelte.config.js | 0 .../sveltekit-2/test/transaction.test.ts | 0 .../sveltekit-2/tsconfig.json | 0 .../sveltekit-2/vite.config.js | 0 .../test-applications/sveltekit/.gitignore | 0 .../test-applications/sveltekit/.npmrc | 0 .../test-applications/sveltekit/README.md | 0 .../sveltekit/event-proxy-server.ts | 0 .../test-applications/sveltekit/package.json | 0 .../sveltekit/playwright.config.ts | 0 .../test-applications/sveltekit/src/app.html | 0 .../sveltekit/src/hooks.client.ts | 0 .../sveltekit/src/hooks.server.ts | 0 .../sveltekit/src/routes/+page.svelte | 0 .../src/routes/building/+page.server.ts | 0 .../src/routes/building/+page.svelte | 0 .../sveltekit/src/routes/building/+page.ts | 0 .../sveltekit/start-event-proxy.ts | 0 .../sveltekit/static/favicon.png | Bin .../sveltekit/svelte.config.js | 0 .../sveltekit/test/transaction.test.ts | 0 .../test-applications/sveltekit/tsconfig.json | 0 .../sveltekit/vite.config.js | 0 .../e2e-tests/test-registry.npmrc | 0 .../e2e-tests/tsconfig.json | 0 .../e2e-tests/validate-test-app-setups.ts | 4 +-- .../validate-verdaccio-configuration.ts | 0 .../e2e-tests/verdaccio-config/config.yaml | 0 .../node-integration-tests/.eslintrc.js | 0 .../node-integration-tests/README.md | 0 .../node-integration-tests/jest.config.js | 0 .../node-integration-tests/jest.setup.js | 0 .../node-integration-tests/package.json | 0 .../suites/anr/basic-session.js | 0 .../suites/anr/basic.js | 0 .../suites/anr/basic.mjs | 0 .../suites/anr/forked.js | 0 .../suites/anr/forker.js | 0 .../suites/anr/legacy.js | 0 .../node-integration-tests/suites/anr/test.ts | 0 .../suites/express/handle-error/server.ts | 0 .../suites/express/handle-error/test.ts | 0 .../common-infix-parameterized/server.ts | 0 .../common-infix-parameterized/test.ts | 0 .../multiple-routers/common-infix/server.ts | 0 .../multiple-routers/common-infix/test.ts | 0 .../server.ts | 0 .../test.ts | 0 .../common-prefix-parameterized/server.ts | 0 .../common-prefix-parameterized/test.ts | 0 .../server.ts | 0 .../test.ts | 0 .../server.ts | 0 .../test.ts | 0 .../multiple-routers/common-prefix/server.ts | 0 .../multiple-routers/common-prefix/test.ts | 0 .../multiple-routers/complex-router/server.ts | 0 .../multiple-routers/complex-router/test.ts | 0 .../middle-layer-parameterized/server.ts | 0 .../middle-layer-parameterized/test.ts | 0 .../baggage-header-assign/test.ts | 0 .../sentry-trace/baggage-header-out/server.ts | 0 .../sentry-trace/baggage-header-out/test.ts | 0 .../server.ts | 0 .../test.ts | 0 .../baggage-other-vendors/server.ts | 0 .../baggage-other-vendors/test.ts | 0 .../baggage-transaction-name/server.ts | 0 .../baggage-transaction-name/test.ts | 0 .../suites/express/sentry-trace/server.ts | 0 .../sentry-trace/trace-header-assign/test.ts | 0 .../sentry-trace/trace-header-out/test.ts | 0 .../suites/express/tracing/server.ts | 0 .../suites/express/tracing/test.ts | 0 .../LocalVariables/local-variables-caught.js | 0 .../LocalVariables/local-variables-caught.mjs | 0 .../LocalVariables/local-variables.js | 0 .../LocalVariables/no-local-variables.js | 0 .../suites/public-api/LocalVariables/test.ts | 0 .../additional-listener-test-script.js | 0 .../log-entire-error-to-console.js | 0 ...haviour-additional-listener-test-script.js | 0 ...iour-no-additional-listener-test-script.js | 0 .../no-additional-listener-test-script.js | 0 .../public-api/OnUncaughtException/test.ts | 0 .../addBreadcrumb/empty-obj/scenario.ts | 0 .../addBreadcrumb/empty-obj/test.ts | 0 .../multiple_breadcrumbs/scenario.ts | 0 .../multiple_breadcrumbs/test.ts | 0 .../simple_breadcrumb/scenario.ts | 0 .../addBreadcrumb/simple_breadcrumb/test.ts | 0 .../catched-error/scenario.ts | 0 .../captureException/catched-error/test.ts | 0 .../captureException/empty-obj/scenario.ts | 0 .../captureException/empty-obj/test.ts | 0 .../captureException/simple-error/scenario.ts | 0 .../captureException/simple-error/test.ts | 0 .../captureMessage/simple_message/scenario.ts | 0 .../captureMessage/simple_message/test.ts | 0 .../captureMessage/with_level/scenario.ts | 0 .../captureMessage/with_level/test.ts | 0 .../configureScope/clear_scope/scenario.ts | 0 .../configureScope/clear_scope/test.ts | 0 .../configureScope/set_properties/scenario.ts | 0 .../configureScope/set_properties/test.ts | 0 .../scopes/initialScopes/scenario.ts | 0 .../public-api/scopes/initialScopes/test.ts | 0 .../scopes/isolationScope/scenario.ts | 0 .../public-api/scopes/isolationScope/test.ts | 0 .../setContext/multiple-contexts/scenario.ts | 0 .../setContext/multiple-contexts/test.ts | 0 .../non-serializable-context/scenario.ts | 0 .../non-serializable-context/test.ts | 0 .../setContext/simple-context/scenario.ts | 0 .../setContext/simple-context/test.ts | 0 .../setExtra/multiple-extras/scenario.ts | 0 .../setExtra/multiple-extras/test.ts | 0 .../non-serializable-extra/scenario.ts | 0 .../setExtra/non-serializable-extra/test.ts | 0 .../setExtra/simple-extra/scenario.ts | 0 .../public-api/setExtra/simple-extra/test.ts | 0 .../setExtras/consecutive-calls/scenario.ts | 0 .../setExtras/consecutive-calls/test.ts | 0 .../setExtras/multiple-extras/scenario.ts | 0 .../setExtras/multiple-extras/test.ts | 0 .../setTag/with-primitives/scenario.ts | 0 .../public-api/setTag/with-primitives/test.ts | 0 .../setTags/with-primitives/scenario.ts | 0 .../setTags/with-primitives/test.ts | 0 .../public-api/setUser/unset_user/scenario.ts | 0 .../public-api/setUser/unset_user/test.ts | 0 .../setUser/update_user/scenario.ts | 0 .../public-api/setUser/update_user/test.ts | 0 .../startTransaction/basic-usage/scenario.ts | 0 .../startTransaction/basic-usage/test.ts | 0 .../with-nested-spans/scenario.ts | 0 .../with-nested-spans/test.ts | 0 .../withScope/nested-scopes/scenario.ts | 0 .../withScope/nested-scopes/test.ts | 0 .../crashed-session-aggregate/test.ts | 0 .../errored-session-aggregate/test.ts | 0 .../sessions/exited-session-aggregate/test.ts | 0 .../suites/sessions/server.ts | 0 .../tracing-new/apollo-graphql/scenario.ts | 0 .../suites/tracing-new/apollo-graphql/test.ts | 0 .../auto-instrument/mongodb/scenario.ts | 0 .../auto-instrument/mongodb/test.ts | 0 .../mysql/withConnect/scenario.ts | 0 .../auto-instrument/mysql/withConnect/test.ts | 0 .../mysql/withoutCallback/scenario.ts | 0 .../mysql/withoutCallback/test.ts | 0 .../mysql/withoutConnect/scenario.ts | 0 .../mysql/withoutConnect/test.ts | 0 .../auto-instrument/pg/scenario.ts | 0 .../tracing-new/auto-instrument/pg/test.ts | 0 .../tracing-new/prisma-orm/docker-compose.yml | 0 .../tracing-new/prisma-orm/package.json | 0 .../prisma/migrations/migration_lock.toml | 0 .../migrations/sentry_test/migration.sql | 0 .../prisma-orm/prisma/schema.prisma | 0 .../suites/tracing-new/prisma-orm/scenario.ts | 0 .../suites/tracing-new/prisma-orm/setup.ts | 0 .../suites/tracing-new/prisma-orm/test.ts | 0 .../suites/tracing-new/prisma-orm/yarn.lock | 0 .../tracePropagationTargets/scenario.ts | 0 .../tracePropagationTargets/test.ts | 0 .../suites/tracing/apollo-graphql/scenario.ts | 0 .../suites/tracing/apollo-graphql/test.ts | 0 .../auto-instrument/mongodb/scenario.ts | 0 .../tracing/auto-instrument/mongodb/test.ts | 0 .../tracing/auto-instrument/mysql/scenario.ts | 0 .../tracing/auto-instrument/mysql/test.ts | 0 .../tracing/auto-instrument/pg/scenario.ts | 0 .../suites/tracing/auto-instrument/pg/test.ts | 0 .../tracing/prisma-orm/docker-compose.yml | 0 .../suites/tracing/prisma-orm/package.json | 0 .../prisma/migrations/migration_lock.toml | 0 .../migrations/sentry_test/migration.sql | 0 .../tracing/prisma-orm/prisma/schema.prisma | 0 .../suites/tracing/prisma-orm/scenario.ts | 0 .../suites/tracing/prisma-orm/setup.ts | 0 .../suites/tracing/prisma-orm/test.ts | 0 .../suites/tracing/prisma-orm/yarn.lock | 0 .../tracePropagationTargets/scenario.ts | 0 .../tracing/tracePropagationTargets/test.ts | 0 .../node-integration-tests/tsconfig.json | 0 .../node-integration-tests/tsconfig.test.json | 0 .../utils/defaults/server.ts | 0 .../node-integration-tests/utils/index.ts | 0 .../node-integration-tests/utils/run-tests.ts | 0 .../utils/setup-tests.ts | 0 .../overhead-metrics/.eslintrc.cjs | 0 .../overhead-metrics/.gitignore | 0 .../overhead-metrics/README.md | 0 .../overhead-metrics/configs/README.md | 0 .../overhead-metrics/configs/ci/collect.ts | 0 .../overhead-metrics/configs/ci/env.ts | 0 .../overhead-metrics/configs/ci/process.ts | 0 .../overhead-metrics/configs/dev/collect.ts | 0 .../overhead-metrics/configs/dev/env.ts | 0 .../overhead-metrics/configs/dev/process.ts | 0 .../overhead-metrics/package.json | 0 .../overhead-metrics/src/collector.ts | 0 .../overhead-metrics/src/perf/cpu.ts | 0 .../overhead-metrics/src/perf/memory.ts | 0 .../overhead-metrics/src/perf/network.ts | 0 .../overhead-metrics/src/perf/sampler.ts | 0 .../overhead-metrics/src/results/analyzer.ts | 0 .../src/results/metrics-stats.ts | 0 .../src/results/pr-comment.ts | 0 .../overhead-metrics/src/results/result.ts | 0 .../src/results/results-set.ts | 0 .../overhead-metrics/src/scenarios.ts | 0 .../overhead-metrics/src/util/console.ts | 0 .../overhead-metrics/src/util/git.ts | 0 .../overhead-metrics/src/util/github.ts | 0 .../overhead-metrics/src/util/json.ts | 0 .../overhead-metrics/src/vitals/cls.ts | 0 .../overhead-metrics/src/vitals/fid.ts | 0 .../overhead-metrics/src/vitals/index.ts | 0 .../overhead-metrics/src/vitals/lcp.ts | 0 .../test-apps/booking-app/img/house-0.jpg | Bin .../test-apps/booking-app/img/house-1.jpg | Bin .../test-apps/booking-app/img/house-2.jpg | Bin .../test-apps/booking-app/index.html | 0 .../test-apps/booking-app/main.js | 0 .../test-apps/booking-app/with-replay.html | 0 .../test-apps/booking-app/with-sentry.html | 0 .../overhead-metrics/test-apps/jank/README.md | 0 .../overhead-metrics/test-apps/jank/app.js | 0 .../test-apps/jank/favicon-96x96.png | Bin .../test-apps/jank/index.html | 0 .../test-apps/jank/logo-1024px.png | Bin .../test-apps/jank/styles.css | 0 .../test-apps/jank/with-replay.html | 0 .../test-apps/jank/with-sentry.html | 0 .../overhead-metrics/tsconfig.json | 0 .../rollup-utils/README.md | 0 .../rollup-utils/bundleHelpers.mjs | 0 .../rollup-utils/index.mjs | 0 .../rollup-utils/npmHelpers.mjs | 0 .../rollup-utils/package.json | 0 .../rollup-utils/plugins/bundlePlugins.mjs | 0 .../plugins/extractPolyfillsPlugin.mjs | 0 .../rollup-utils/plugins/index.mjs | 0 .../rollup-utils/plugins/npmPlugins.mjs | 0 .../rollup-utils/polyfills/es5.js | 0 .../rollup-utils/utils.mjs | 0 docs/new-sdk-release-checklist.md | 2 +- package.json | 12 ++++---- .../integration/test/client/utils/helpers.ts | 2 +- .../integration/test/server/utils/helpers.ts | 2 +- .../integration/test/client/utils/helpers.ts | 2 +- .../integration/test/server/utils/helpers.ts | 4 +-- 1098 files changed, 50 insertions(+), 46 deletions(-) rename {packages => dev-packages}/browser-integration-tests/.eslintrc.js (100%) rename {packages => dev-packages}/browser-integration-tests/.gitignore (100%) rename {packages => dev-packages}/browser-integration-tests/README.md (100%) rename {packages => dev-packages}/browser-integration-tests/fixtures/loader.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/captureException/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/captureException/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/customOnErrorHandler/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/customOnErrorHandler/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandler/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandler/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandlerLater/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandlerLater/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/pageloadTransaction/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/pageloadTransaction/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/replay/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/replay/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/unhandeledPromiseRejectionHandler/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/noOnLoad/unhandeledPromiseRejectionHandler/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/captureException/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/captureException/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/customBrowserTracing/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/customBrowserTracing/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/customInit/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/customInit/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/customReplay/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/customReplay/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/errorHandler/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/errorHandler/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/errorHandlerLater/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/errorHandlerLater/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/pageloadTransaction/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/pageloadTransaction/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/replay/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/replay/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/package.json (100%) rename {packages => dev-packages}/browser-integration-tests/playwright.config.ts (100%) rename {packages => dev-packages}/browser-integration-tests/playwright.setup.ts (100%) rename {packages => dev-packages}/browser-integration-tests/scripts/detectFlakyTests.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/feedback/captureFeedback/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/feedback/captureFeedback/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/feedback/captureFeedback/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/dom/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/dom/textInput/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/dom/textInput/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/get/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/get/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/post/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/post/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/get/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/get/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/post/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/post/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/ContextLines/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/ContextLines/inline/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/ContextLines/inline/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/ContextLines/scriptTag/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/ContextLines/scriptTag/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/axios/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/axios/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/fetch/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/fetch/simple/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/fetch/simple/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/xhr/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/integrations/httpclient/xhr/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/manual-client/browser-context/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/manual-client/browser-context/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/addBreadcrumb/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/classInstance/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/classInstance/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/emptyObj/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/emptyObj/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/errorEvent/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/errorEvent/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/errorEvent/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/event/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/event/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/linkedErrrors/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/linkedErrrors/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/plainObject/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/plainObject/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/simpleError/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/simpleError/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/undefinedArg/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureException/undefinedArg/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureMessage/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureMessage/simple_message/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureMessage/simple_message/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureMessage/with_level/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureMessage/with_level/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureUserFeedback/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/configureScope/clear_scope/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/configureScope/clear_scope/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/configureScope/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/configureScope/set_properties/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/configureScope/set_properties/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/debug/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/debug/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/init/console/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/init/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/eventListener-instrumentation-behaviour/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/eventListener-instrumentation-behaviour/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/eventListener-this-preservation/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/eventListener-this-preservation/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/eventListener-wrapping/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/eventListener-wrapping/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/eventListener/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/eventListener/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/setTimeout/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/setTimeout/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setContext/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setContext/multiple_contexts/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setContext/multiple_contexts/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setContext/non_serializable_context/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setContext/non_serializable_context/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setContext/simple_context/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setContext/simple_context/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setExtra/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setExtra/multiple_extras/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setExtra/multiple_extras/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setExtra/simple_extra/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setExtra/simple_extra/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setExtras/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setExtras/multiple_extras/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setExtras/multiple_extras/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setTag/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setTag/with_non_primitives/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setTag/with_non_primitives/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setTag/with_primitives/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setTag/with_primitives/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setTags/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setTags/with_non_primitives/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setTags/with_non_primitives/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setTags/with_primitives/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setTags/with_primitives/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setUser/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setUser/unset_user/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setUser/unset_user/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setUser/update_user/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/setUser/update_user/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/showReportDialog/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/showReportDialog/inject-script/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/showReportDialog/inject-script/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startSpan/basic/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startSpan/basic/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startSpan/error-async-reject/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startSpan/error-async-reject/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startSpan/error-async-throw/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startSpan/error-async-throw/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startSpan/error-sync/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startSpan/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startTransaction/basic_usage/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startTransaction/basic_usage/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startTransaction/circular_data/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startTransaction/circular_data/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startTransaction/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startTransaction/setMeasurement/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/startTransaction/setMeasurement/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/withScope/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/withScope/nested_scopes/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/public-api/withScope/nested_scopes/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/bufferMode/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/bufferMode/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/bufferMode/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/bufferMode/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/bufferModeReload/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/bufferModeReload/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/bufferModeReload/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/captureComponentName/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/captureComponentName/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/captureComponentName/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/captureConsoleLog/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/captureConsoleLog/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/captureReplay/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/captureReplay/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/compressionDisabled/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/compressionDisabled/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/compressionDisabled/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/compressionEnabled/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/compressionEnabled/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/compressionEnabled/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/compressionWorkerUrl/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/compressionWorkerUrl/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/compressionWorkerUrl/test.ts (94%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/customEvents/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/customEvents/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/customEvents/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/customEvents/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/dsc/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/dsc/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errorResponse/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errorResponse/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/beforeErrorSampling/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/beforeErrorSampling/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/droppedError/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/droppedError/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/errorMode/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/errorModeCustomTransport/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/errorModeCustomTransport/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/errorNotSent/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/errorNotSent/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/errorsInSession/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/errorsInSession/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/errors/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/eventBufferError/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/eventBufferError/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/exceptions/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/exceptions/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestBody/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestBody/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestHeaders/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestHeaders/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestSize/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseBody/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseBody/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseHeaders/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseHeaders/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseSize/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureTimestamps/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureTimestamps/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestBody/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestBody/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestHeaders/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestHeaders/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestSize/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseBody/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseBody/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseHeaders/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseHeaders/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseSize/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureTimestamps/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureTimestamps/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/fileInput/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/fileInput/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/fileInput/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/flushing/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/flushing/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/flushing/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/flushing/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/keyboardEvents/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/keyboardEvents/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/keyboardEvents/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/largeMutations/defaultOptions/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/largeMutations/defaultOptions/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/largeMutations/defaultOptions/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/largeMutations/mutationLimit/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/largeMutations/mutationLimit/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/largeMutations/mutationLimit/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/maxReplayDuration/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/maxReplayDuration/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/maxReplayDuration/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/minReplayDuration/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/minReplayDuration/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/minReplayDuration/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/page-0.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-0-snap-full (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-0-snap-full-chromium (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-1-snap-incremental (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-1-snap-incremental-chromium (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-2-snap-full (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-2-snap-full-chromium (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-3-snap-incremental (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-3-snap-incremental-chromium (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-4-snap-full (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-4-snap-full-chromium (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-5-snap-incremental (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-5-snap-incremental-chromium (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-6-snap-incremental (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-6-snap-incremental-chromium (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-7-snap-incremental (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-7-snap-incremental-chromium (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-8-snap-full (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-8-snap-full-chromium (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-9-snap-incremental (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-9-snap-incremental-chromium (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyBlock/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyBlock/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyBlock/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-chromium.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-firefox.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-webkit.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyDefault/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyDefault/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyDefault/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-chromium.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-firefox.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-webkit.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyInput/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyInput/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyInput/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyInputMaskAll/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyInputMaskAll/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/privacyInputMaskAll/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/replayShim/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/replayShim/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/replayShim/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/requests/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/requests/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/requests/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/requests/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sampling/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sampling/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sampling/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionExpiry/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionExpiry/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionExpiry/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-0-chromium.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-0-webkit.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-2-chromium.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-2-webkit.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionInactive/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionInactive/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionInactive/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-0-chromium.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-0-webkit.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-1-chromium.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-1-webkit.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionMaxAge/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionMaxAge/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionMaxAge/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-0-chromium.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-0-webkit.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-2-chromium.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-2-webkit.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/clickTargets/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/disable/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/disable/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/error/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/error/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/error/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/ignore/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/multiClick/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/mutation/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/scroll/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/timeout/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/slowClick/windowOpen/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/throttleBreadcrumbs/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/throttleBreadcrumbs/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/throttleBreadcrumbs/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/throttleBreadcrumbs/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/compressed/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/compressed/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-chromium.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-firefox.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-webkit.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/uncompressed/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-chromium.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-firefox.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-webkit.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed.json (100%) rename {packages => dev-packages}/browser-integration-tests/suites/sessions/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/sessions/start-session/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/sessions/start-session/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/sessions/update-session/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/sessions/update-session/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/sessions/update-session/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/stacktraces/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/stacktraces/protocol_containing_fn_identifiers/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/stacktraces/protocol_containing_fn_identifiers/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/stacktraces/protocol_fn_identifiers/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/stacktraces/protocol_fn_identifiers/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/stacktraces/regular_fn_identifiers/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/stacktraces/regular_fn_identifiers/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/stacktraces/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browserTracingShim/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browserTracingShim/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browserTracingShim/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/http-timings/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/http-timings/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/http-timings/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/interactions/assets/script.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/interactions/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/interactions/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/interactions/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/assets/script.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/assets/script.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/meta/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/meta/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/meta/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/navigation/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/pageload/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/pageload/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/pageloadDelayed/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/pageloadDelayed/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/envelope-header-transaction-name/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/envelope-header-transaction-name/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/envelope-header/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/envelope-header/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/connection-rtt/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/connection-rtt/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/pageload-browser-spans/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/image.svg (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/script.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/style.css (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/assets/sentry-logo-600x179.png (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/web-vitals-ttfb/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/metrics/web-vitals-ttfb/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/request/fetch/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/request/fetch/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/request/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/request/xhr/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/tracing/request/xhr/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/transport/offline/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/transport/offline/queued/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/transport/offline/queued/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/suites/wasm/init.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/wasm/simple.wasm (100%) rename {packages => dev-packages}/browser-integration-tests/suites/wasm/subject.js (100%) rename {packages => dev-packages}/browser-integration-tests/suites/wasm/test.ts (100%) rename {packages => dev-packages}/browser-integration-tests/tsconfig.json (100%) rename {packages => dev-packages}/browser-integration-tests/utils/defaults/template.html (100%) rename {packages => dev-packages}/browser-integration-tests/utils/fixtures.ts (100%) rename {packages => dev-packages}/browser-integration-tests/utils/generatePage.ts (100%) rename {packages => dev-packages}/browser-integration-tests/utils/generatePlugin.ts (95%) rename {packages => dev-packages}/browser-integration-tests/utils/helpers.ts (100%) rename {packages => dev-packages}/browser-integration-tests/utils/replayEventTemplates.ts (100%) rename {packages => dev-packages}/browser-integration-tests/utils/replayHelpers.ts (100%) rename {packages => dev-packages}/browser-integration-tests/utils/staticAssets.ts (100%) rename {packages => dev-packages}/browser-integration-tests/utils/wasmHelpers.ts (100%) rename {packages => dev-packages}/browser-integration-tests/utils/web-vitals/cls.ts (100%) rename {packages => dev-packages}/browser-integration-tests/webpack.config.ts (100%) rename {packages => dev-packages}/e2e-tests/.env.example (100%) rename {packages => dev-packages}/e2e-tests/.eslintrc.js (100%) rename {packages => dev-packages}/e2e-tests/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/Dockerfile.publish-packages (82%) rename {packages => dev-packages}/e2e-tests/LICENSE (100%) rename {packages => dev-packages}/e2e-tests/README.md (100%) rename {packages => dev-packages}/e2e-tests/lib/constants.ts (100%) rename {packages => dev-packages}/e2e-tests/lib/validate.ts (100%) rename {packages => dev-packages}/e2e-tests/package.json (100%) rename {packages => dev-packages}/e2e-tests/prepare.ts (100%) rename {packages => dev-packages}/e2e-tests/publish-packages.ts (100%) rename {packages => dev-packages}/e2e-tests/registrySetup.ts (100%) rename {packages => dev-packages}/e2e-tests/run.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/globals.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/next-env.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/next.config.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/pages/_app.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/pages/_document.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/pages/_error.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/pages/api/error.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/pages/api/success.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/pages/index.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/pages/user/[id].tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/sentry.client.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/sentry.server.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/tests/behaviour-client.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/tests/behaviour-server.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-next-app/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/public/favicon.ico (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/public/index.html (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/public/logo192.png (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/public/logo512.png (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/public/manifest.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/public/robots.txt (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/src/App.css (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/src/App.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/src/index.css (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/src/index.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/src/logo.svg (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/src/react-app-env.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/src/reportWebVitals.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/src/setupTests.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-react-app/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/.eslintrc.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/README.md (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/app/entry.client.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/app/entry.server.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/app/root.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/app/routes/_index.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/app/routes/client-error.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/app/routes/navigate.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/app/routes/user.$id.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/globals.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/remix.config.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/remix.env.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/tests/behaviour-client.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app-v2/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/.eslintrc.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/app/entry.client.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/app/entry.server.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/app/root.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/app/routes/_index.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/app/routes/client-error.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/app/routes/navigate.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/app/routes/user.$id.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/globals.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/remix.config.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/tests/behaviour-client.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/create-remix-app/upload-sourcemaps.sh (100%) rename {packages => dev-packages}/e2e-tests/test-applications/debug-id-sourcemaps/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/debug-id-sourcemaps/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/debug-id-sourcemaps/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/debug-id-sourcemaps/rollup.config.mjs (100%) rename {packages => dev-packages}/e2e-tests/test-applications/debug-id-sourcemaps/src/app.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/debug-id-sourcemaps/tests/__snapshots__/server.test.ts.snap (100%) rename {packages => dev-packages}/e2e-tests/test-applications/debug-id-sourcemaps/tests/server.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/generic-ts3.8/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/generic-ts3.8/index.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/generic-ts3.8/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/generic-ts3.8/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/app/generation-functions/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/app/layout.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/event-proxy-server.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/globals.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/next-env.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/next.config.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/sentry.client.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/sentry.edge.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/sentry.server.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/start-event-proxy.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/tests/generation-functions.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-14/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/layout.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/nested-layout/layout.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/nested-layout/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/error.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/layout.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/loading.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/not-found.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/error.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/layout.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/loading.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/not-found.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/error.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/layout.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/loading.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/not-found.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/edge-server-components/error/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/edge-server-components/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/error.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/layout.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/loading.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/not-found.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/edge/route.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/error/route.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/route.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/static/route.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-action/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/error.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/layout.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/loading.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/not-found.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/not-found/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/error.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/layout.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/loading.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/not-found.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/error.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/layout.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/loading.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/not-found.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/app/server-component/redirect/page.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/assert-build.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/components/client-error-debug-tools.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/components/transaction-context.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/event-proxy-server.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/globals.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/middleware.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/next-env.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/next.config.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/pages/api/async-context-edge-endpoint.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/pages/api/edge-endpoint.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/pages/api/endpoint-behind-middleware.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/pages/api/endpoint.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/pages/api/error-edge-endpoint.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/pages/pages-router/ssr-error-class.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/pages/pages-router/ssr-error-fc.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/sentry.client.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/start-event-proxy.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/tests/async-context-edge.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/tests/client-app-routing-instrumentation.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/tests/connected-servercomponent-trace.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/tests/devErrorSymbolification.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/tests/edge-route.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/tests/edge.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/tests/exceptions.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/tests/middleware.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/tests/pages-ssr-errors.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/tests/route-handlers.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/tests/transactions.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/nextjs-app-dir/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-experimental-fastify-app/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-experimental-fastify-app/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-experimental-fastify-app/event-proxy-server.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-experimental-fastify-app/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-experimental-fastify-app/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-experimental-fastify-app/src/app.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-experimental-fastify-app/src/tracing.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-experimental-fastify-app/start-event-proxy.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-experimental-fastify-app/tests/errors.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-experimental-fastify-app/tests/propagation.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-experimental-fastify-app/tests/transactions.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-experimental-fastify-app/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-express-app/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-express-app/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-express-app/event-proxy-server.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-express-app/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-express-app/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-express-app/src/app.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-express-app/start-event-proxy.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-express-app/tests/server.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-express-app/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-hapi-app/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-hapi-app/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-hapi-app/event-proxy-server.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-hapi-app/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-hapi-app/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-hapi-app/src/app.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-hapi-app/start-event-proxy.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-hapi-app/tests/server.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/node-hapi-app/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-create-hash-router/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-create-hash-router/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-create-hash-router/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-create-hash-router/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-create-hash-router/public/index.html (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-create-hash-router/src/globals.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-create-hash-router/src/index.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-create-hash-router/src/pages/Index.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-create-hash-router/src/pages/User.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-create-hash-router/src/react-app-env.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-create-hash-router/tests/behaviour-test.spec.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-create-hash-router/tests/fixtures/ReplayRecordingData.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-create-hash-router/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-router-6-use-routes/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-router-6-use-routes/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-router-6-use-routes/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-router-6-use-routes/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-router-6-use-routes/public/index.html (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-router-6-use-routes/src/globals.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-router-6-use-routes/src/index.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-router-6-use-routes/src/pages/Index.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-router-6-use-routes/src/pages/User.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-router-6-use-routes/src/react-app-env.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-router-6-use-routes/tests/behaviour-test.spec.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-router-6-use-routes/tests/fixtures/ReplayRecordingData.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/react-router-6-use-routes/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react-tracing-import/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react-tracing-import/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react-tracing-import/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react-tracing-import/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react-tracing-import/public/index.html (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/globals.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/index.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/pages/Index.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/pages/User.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/react-app-env.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react-tracing-import/tests/behaviour-test.spec.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react-tracing-import/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react/public/index.html (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react/src/globals.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react/src/index.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react/src/pages/Index.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react/src/pages/User.tsx (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react/src/react-app-env.d.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react/tests/behaviour-test.spec.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react/tests/fixtures/ReplayRecordingData.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/standard-frontend-react/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/README.md (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/event-proxy-server.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/src/app.html (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/src/hooks.client.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/src/hooks.server.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/src/routes/+page.svelte (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.server.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.svelte (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/start-event-proxy.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/static/favicon.png (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/svelte.config.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/test/transaction.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit-2/vite.config.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/.gitignore (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/.npmrc (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/README.md (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/event-proxy-server.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/package.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/playwright.config.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/src/app.html (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/src/hooks.client.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/src/hooks.server.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/src/routes/+page.svelte (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/src/routes/building/+page.server.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/src/routes/building/+page.svelte (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/src/routes/building/+page.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/start-event-proxy.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/static/favicon.png (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/svelte.config.js (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/test/transaction.test.ts (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/test-applications/sveltekit/vite.config.js (100%) rename {packages => dev-packages}/e2e-tests/test-registry.npmrc (100%) rename {packages => dev-packages}/e2e-tests/tsconfig.json (100%) rename {packages => dev-packages}/e2e-tests/validate-test-app-setups.ts (88%) rename {packages => dev-packages}/e2e-tests/validate-verdaccio-configuration.ts (100%) rename {packages => dev-packages}/e2e-tests/verdaccio-config/config.yaml (100%) rename {packages => dev-packages}/node-integration-tests/.eslintrc.js (100%) rename {packages => dev-packages}/node-integration-tests/README.md (100%) rename {packages => dev-packages}/node-integration-tests/jest.config.js (100%) rename {packages => dev-packages}/node-integration-tests/jest.setup.js (100%) rename {packages => dev-packages}/node-integration-tests/package.json (100%) rename {packages => dev-packages}/node-integration-tests/suites/anr/basic-session.js (100%) rename {packages => dev-packages}/node-integration-tests/suites/anr/basic.js (100%) rename {packages => dev-packages}/node-integration-tests/suites/anr/basic.mjs (100%) rename {packages => dev-packages}/node-integration-tests/suites/anr/forked.js (100%) rename {packages => dev-packages}/node-integration-tests/suites/anr/forker.js (100%) rename {packages => dev-packages}/node-integration-tests/suites/anr/legacy.js (100%) rename {packages => dev-packages}/node-integration-tests/suites/anr/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/handle-error/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/handle-error/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-infix-parameterized/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-infix-parameterized/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-infix/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-infix/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized-reverse/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized-reverse/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized copy/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized copy/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-prefix/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/common-prefix/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/complex-router/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/complex-router/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/middle-layer-parameterized/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/multiple-routers/middle-layer-parameterized/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/sentry-trace/baggage-header-assign/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/sentry-trace/baggage-header-out/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/sentry-trace/baggage-header-out/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors-with-sentry-entries/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors-with-sentry-entries/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/sentry-trace/baggage-transaction-name/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/sentry-trace/baggage-transaction-name/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/sentry-trace/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/sentry-trace/trace-header-assign/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/sentry-trace/trace-header-out/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/tracing/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/express/tracing/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/LocalVariables/local-variables.js (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/LocalVariables/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/OnUncaughtException/additional-listener-test-script.js (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/OnUncaughtException/log-entire-error-to-console.js (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/OnUncaughtException/mimic-native-behaviour-additional-listener-test-script.js (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/OnUncaughtException/mimic-native-behaviour-no-additional-listener-test-script.js (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/OnUncaughtException/no-additional-listener-test-script.js (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/OnUncaughtException/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/addBreadcrumb/empty-obj/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/addBreadcrumb/empty-obj/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/captureException/catched-error/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/captureException/catched-error/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/captureException/empty-obj/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/captureException/empty-obj/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/captureException/simple-error/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/captureException/simple-error/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/captureMessage/simple_message/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/captureMessage/simple_message/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/captureMessage/with_level/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/captureMessage/with_level/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/configureScope/clear_scope/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/configureScope/clear_scope/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/configureScope/set_properties/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/configureScope/set_properties/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/scopes/initialScopes/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/scopes/initialScopes/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/scopes/isolationScope/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/scopes/isolationScope/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setContext/multiple-contexts/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setContext/multiple-contexts/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setContext/non-serializable-context/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setContext/non-serializable-context/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setContext/simple-context/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setContext/simple-context/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setExtra/multiple-extras/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setExtra/multiple-extras/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setExtra/non-serializable-extra/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setExtra/non-serializable-extra/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setExtra/simple-extra/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setExtra/simple-extra/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setExtras/consecutive-calls/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setExtras/consecutive-calls/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setExtras/multiple-extras/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setExtras/multiple-extras/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setTag/with-primitives/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setTag/with-primitives/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setTags/with-primitives/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setTags/with-primitives/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setUser/unset_user/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setUser/unset_user/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setUser/update_user/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/setUser/update_user/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/startTransaction/basic-usage/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/startTransaction/basic-usage/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/startTransaction/with-nested-spans/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/startTransaction/with-nested-spans/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/withScope/nested-scopes/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/public-api/withScope/nested-scopes/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/sessions/crashed-session-aggregate/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/sessions/errored-session-aggregate/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/sessions/exited-session-aggregate/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/sessions/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/apollo-graphql/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/apollo-graphql/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/auto-instrument/mongodb/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/auto-instrument/mongodb/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withConnect/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withConnect/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutCallback/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutCallback/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutConnect/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutConnect/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/auto-instrument/pg/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/auto-instrument/pg/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/prisma-orm/docker-compose.yml (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/prisma-orm/package.json (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/prisma-orm/prisma/migrations/migration_lock.toml (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/prisma-orm/prisma/migrations/sentry_test/migration.sql (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/prisma-orm/prisma/schema.prisma (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/prisma-orm/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/prisma-orm/setup.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/prisma-orm/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/prisma-orm/yarn.lock (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/tracePropagationTargets/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing-new/tracePropagationTargets/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/apollo-graphql/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/apollo-graphql/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/auto-instrument/mongodb/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/auto-instrument/mongodb/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/auto-instrument/mysql/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/auto-instrument/mysql/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/auto-instrument/pg/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/auto-instrument/pg/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/prisma-orm/docker-compose.yml (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/prisma-orm/package.json (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/prisma-orm/prisma/migrations/migration_lock.toml (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/prisma-orm/prisma/migrations/sentry_test/migration.sql (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/prisma-orm/prisma/schema.prisma (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/prisma-orm/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/prisma-orm/setup.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/prisma-orm/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/prisma-orm/yarn.lock (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/tracePropagationTargets/scenario.ts (100%) rename {packages => dev-packages}/node-integration-tests/suites/tracing/tracePropagationTargets/test.ts (100%) rename {packages => dev-packages}/node-integration-tests/tsconfig.json (100%) rename {packages => dev-packages}/node-integration-tests/tsconfig.test.json (100%) rename {packages => dev-packages}/node-integration-tests/utils/defaults/server.ts (100%) rename {packages => dev-packages}/node-integration-tests/utils/index.ts (100%) rename {packages => dev-packages}/node-integration-tests/utils/run-tests.ts (100%) rename {packages => dev-packages}/node-integration-tests/utils/setup-tests.ts (100%) rename {packages => dev-packages}/overhead-metrics/.eslintrc.cjs (100%) rename {packages => dev-packages}/overhead-metrics/.gitignore (100%) rename {packages => dev-packages}/overhead-metrics/README.md (100%) rename {packages => dev-packages}/overhead-metrics/configs/README.md (100%) rename {packages => dev-packages}/overhead-metrics/configs/ci/collect.ts (100%) rename {packages => dev-packages}/overhead-metrics/configs/ci/env.ts (100%) rename {packages => dev-packages}/overhead-metrics/configs/ci/process.ts (100%) rename {packages => dev-packages}/overhead-metrics/configs/dev/collect.ts (100%) rename {packages => dev-packages}/overhead-metrics/configs/dev/env.ts (100%) rename {packages => dev-packages}/overhead-metrics/configs/dev/process.ts (100%) rename {packages => dev-packages}/overhead-metrics/package.json (100%) rename {packages => dev-packages}/overhead-metrics/src/collector.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/perf/cpu.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/perf/memory.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/perf/network.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/perf/sampler.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/results/analyzer.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/results/metrics-stats.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/results/pr-comment.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/results/result.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/results/results-set.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/scenarios.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/util/console.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/util/git.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/util/github.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/util/json.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/vitals/cls.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/vitals/fid.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/vitals/index.ts (100%) rename {packages => dev-packages}/overhead-metrics/src/vitals/lcp.ts (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/booking-app/img/house-0.jpg (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/booking-app/img/house-1.jpg (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/booking-app/img/house-2.jpg (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/booking-app/index.html (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/booking-app/main.js (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/booking-app/with-replay.html (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/booking-app/with-sentry.html (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/jank/README.md (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/jank/app.js (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/jank/favicon-96x96.png (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/jank/index.html (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/jank/logo-1024px.png (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/jank/styles.css (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/jank/with-replay.html (100%) rename {packages => dev-packages}/overhead-metrics/test-apps/jank/with-sentry.html (100%) rename {packages => dev-packages}/overhead-metrics/tsconfig.json (100%) rename {packages => dev-packages}/rollup-utils/README.md (100%) rename {packages => dev-packages}/rollup-utils/bundleHelpers.mjs (100%) rename {packages => dev-packages}/rollup-utils/index.mjs (100%) rename {packages => dev-packages}/rollup-utils/npmHelpers.mjs (100%) rename {packages => dev-packages}/rollup-utils/package.json (100%) rename {packages => dev-packages}/rollup-utils/plugins/bundlePlugins.mjs (100%) rename {packages => dev-packages}/rollup-utils/plugins/extractPolyfillsPlugin.mjs (100%) rename {packages => dev-packages}/rollup-utils/plugins/index.mjs (100%) rename {packages => dev-packages}/rollup-utils/plugins/npmPlugins.mjs (100%) rename {packages => dev-packages}/rollup-utils/polyfills/es5.js (100%) rename {packages => dev-packages}/rollup-utils/utils.mjs (100%) diff --git a/.eslintrc.js b/.eslintrc.js index 882db9c4b069..4de21ba03e3f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -62,7 +62,7 @@ module.exports = { }, }, { - files: ['scenarios/**', 'packages/rollup-utils/**'], + files: ['scenarios/**', 'dev-packages/rollup-utils/**'], parserOptions: { sourceType: 'module', }, diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64ed24e0bf94..413dd3d88aa3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,7 @@ env: CACHED_DEPENDENCY_PATHS: | ${{ github.workspace }}/node_modules ${{ github.workspace }}/packages/*/node_modules + ${{ github.workspace }}/dev-packages/*/node_modules ~/.cache/ms-playwright/ ~/.cache/mongodb-binaries/ @@ -102,7 +103,7 @@ jobs: browser_integration: - *shared - *browser - - 'packages/browser-integration-tests/**' + - 'dev-packages/browser-integration-tests/**' ember: - *shared - *browser @@ -122,7 +123,7 @@ jobs: node: - *shared - 'packages/node/**' - - 'packages/node-integration-tests/**' + - 'dev-packages/node-integration-tests/**' deno: - *shared - *browser @@ -601,7 +602,7 @@ jobs: env: PW_BUNDLE: ${{ matrix.bundle }} run: | - cd packages/browser-integration-tests + cd dev-packages/browser-integration-tests yarn test:ci job_browser_loader_tests: @@ -658,7 +659,7 @@ jobs: env: PW_BUNDLE: ${{ matrix.bundle }} run: | - cd packages/browser-integration-tests + cd dev-packages/browser-integration-tests yarn test:loader job_browser_integration_tests: @@ -762,7 +763,7 @@ jobs: env: NODE_VERSION: ${{ matrix.node }} run: | - cd packages/node-integration-tests + cd dev-packages/node-integration-tests yarn test job_remix_integration_tests: @@ -906,7 +907,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v4 with: - node-version-file: 'packages/e2e-tests/package.json' + node-version-file: 'dev-packages/e2e-tests/package.json' - name: Restore caches uses: ./.github/actions/restore-cache env: @@ -921,25 +922,25 @@ jobs: - name: Get node version id: versions run: | - echo "echo node=$(jq -r '.volta.node' packages/e2e-tests/package.json)" >> $GITHUB_OUTPUT + echo "echo node=$(jq -r '.volta.node' dev-packages/e2e-tests/package.json)" >> $GITHUB_OUTPUT - name: Validate Verdaccio run: yarn test:validate - working-directory: packages/e2e-tests + working-directory: dev-packages/e2e-tests - name: Prepare Verdaccio run: yarn test:prepare - working-directory: packages/e2e-tests + working-directory: dev-packages/e2e-tests env: E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }} - name: Build E2E app - working-directory: packages/e2e-tests/test-applications/${{ matrix.test-application }} + working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }} timeout-minutes: 5 run: yarn ${{ matrix.build-command || 'test:build' }} - name: Run E2E test - working-directory: packages/e2e-tests/test-applications/${{ matrix.test-application }} + working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }} timeout-minutes: 5 run: yarn test:assert @@ -996,12 +997,12 @@ jobs: - name: Collect run: yarn ci:collect - working-directory: packages/overhead-metrics + working-directory: dev-packages/overhead-metrics - name: Process id: process run: yarn ci:process - working-directory: packages/overhead-metrics + working-directory: dev-packages/overhead-metrics # Don't run on forks - the PR comment cannot be added. if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository env: diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 9801407515cd..72dcd46d238d 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -115,21 +115,21 @@ jobs: - name: Validate Verdaccio run: yarn test:validate - working-directory: packages/e2e-tests + working-directory: dev-packages/e2e-tests - name: Prepare Verdaccio run: yarn test:prepare - working-directory: packages/e2e-tests + working-directory: dev-packages/e2e-tests env: E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }} - name: Build E2E app - working-directory: packages/e2e-tests/test-applications/${{ matrix.test-application }} + working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }} timeout-minutes: 5 run: yarn ${{ matrix.build-command }} - name: Run E2E test - working-directory: packages/e2e-tests/test-applications/${{ matrix.test-application }} + working-directory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }} timeout-minutes: 5 run: yarn test:assert diff --git a/.github/workflows/flaky-test-detector.yml b/.github/workflows/flaky-test-detector.yml index 9d067eafdbf9..1207c9fbf3fd 100644 --- a/.github/workflows/flaky-test-detector.yml +++ b/.github/workflows/flaky-test-detector.yml @@ -3,7 +3,7 @@ on: workflow_dispatch: pull_request: paths: - - 'packages/browser-integration-tests/suites/**' + - 'dev-packages/browser-integration-tests/suites/**' branches-ignore: - master @@ -76,11 +76,11 @@ jobs: with: list-files: json filters: | - browser_integration: packages/browser-integration-tests/suites/** + browser_integration: dev-packages/browser-integration-tests/suites/** - name: Detect flaky tests run: yarn test:detect-flaky - working-directory: packages/browser-integration-tests + working-directory: dev-packages/browser-integration-tests env: CHANGED_TEST_PATHS: ${{ steps.changed.outputs.browser_integration_files }} TEST_RUN_COUNT: 'AUTO' diff --git a/.gitignore b/.gitignore index 813a38ad89d2..73fc943c1152 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # dependencies node_modules/ packages/*/package-lock.json +dev-packages/*/package-lock.json package-lock.json # build and test diff --git a/CODEOWNERS b/CODEOWNERS index c8925d8cc981..6a09d1924613 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,3 +1,3 @@ packages/replay @getsentry/replay-sdk packages/replay-worker @getsentry/replay-sdk -packages/browser-integration-tests/suites/replay @getsentry/replay-sdk +dev-packages/browser-integration-tests/suites/replay @getsentry/replay-sdk diff --git a/biome.json b/biome.json index e4601d14da3c..ee621463f01c 100644 --- a/biome.json +++ b/biome.json @@ -42,10 +42,10 @@ "indentWidth": 2, "lineWidth": 120, "ignore": [ - "packages/browser-integration-tests/fixtures/loader.js", - "packages/browser-integration-tests/suites/**/*.json", - "packages/browser-integration-tests/loader-suites/**/*.js", - "packages/browser-integration-tests/suites/stacktraces/**/*.js", + "dev-packages/browser-integration-tests/fixtures/loader.js", + "dev-packages/browser-integration-tests/suites/**/*.json", + "dev-packages/browser-integration-tests/loader-suites/**/*.js", + "dev-packages/browser-integration-tests/suites/stacktraces/**/*.js", "**/fixtures/*/*.json", "**/*.min.js" ] diff --git a/packages/browser-integration-tests/.eslintrc.js b/dev-packages/browser-integration-tests/.eslintrc.js similarity index 100% rename from packages/browser-integration-tests/.eslintrc.js rename to dev-packages/browser-integration-tests/.eslintrc.js diff --git a/packages/browser-integration-tests/.gitignore b/dev-packages/browser-integration-tests/.gitignore similarity index 100% rename from packages/browser-integration-tests/.gitignore rename to dev-packages/browser-integration-tests/.gitignore diff --git a/packages/browser-integration-tests/README.md b/dev-packages/browser-integration-tests/README.md similarity index 100% rename from packages/browser-integration-tests/README.md rename to dev-packages/browser-integration-tests/README.md diff --git a/packages/browser-integration-tests/fixtures/loader.js b/dev-packages/browser-integration-tests/fixtures/loader.js similarity index 100% rename from packages/browser-integration-tests/fixtures/loader.js rename to dev-packages/browser-integration-tests/fixtures/loader.js diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/captureException/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/captureException/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/captureException/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/captureException/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/captureException/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/captureException/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/captureException/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/captureException/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/customOnErrorHandler/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/customOnErrorHandler/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/customOnErrorHandler/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/customOnErrorHandler/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/customOnErrorHandler/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/customOnErrorHandler/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/customOnErrorHandler/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/customOnErrorHandler/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandler/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandler/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandler/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandler/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandler/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandler/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandler/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandler/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandlerLater/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandlerLater/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandlerLater/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandlerLater/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandlerLater/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandlerLater/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandlerLater/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/errorHandlerLater/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/pageloadTransaction/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/pageloadTransaction/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/pageloadTransaction/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/pageloadTransaction/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/pageloadTransaction/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/pageloadTransaction/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/pageloadTransaction/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/pageloadTransaction/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/replay/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/replay/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/replay/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/replay/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/replay/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/replay/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/replay/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/replay/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/unhandeledPromiseRejectionHandler/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/unhandeledPromiseRejectionHandler/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/unhandeledPromiseRejectionHandler/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/unhandeledPromiseRejectionHandler/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/noOnLoad/unhandeledPromiseRejectionHandler/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/unhandeledPromiseRejectionHandler/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/noOnLoad/unhandeledPromiseRejectionHandler/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/noOnLoad/unhandeledPromiseRejectionHandler/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/captureException/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/captureException/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/captureException/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/captureException/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/captureException/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/captureException/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/captureException/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/captureException/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/captureExceptionInOnLoad/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/customBrowserTracing/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customBrowserTracing/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/customBrowserTracing/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customBrowserTracing/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/customBrowserTracing/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customBrowserTracing/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/customBrowserTracing/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customBrowserTracing/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/customInit/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customInit/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/customInit/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customInit/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/customInit/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customInit/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/customInit/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customInit/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrations/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customIntegrationsFunction/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/customReplay/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customReplay/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/customReplay/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customReplay/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/customReplay/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customReplay/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/customReplay/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/customReplay/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandler/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandler/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandler/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandler/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandler/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandler/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandler/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandler/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandlerLater/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandlerLater/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandlerLater/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandlerLater/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandlerLater/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandlerLater/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandlerLater/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/errorHandlerLater/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/onLoadLate/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/pageloadTransaction/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/pageloadTransaction/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/pageloadTransaction/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/pageloadTransaction/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/pageloadTransaction/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/pageloadTransaction/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/pageloadTransaction/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/pageloadTransaction/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/replay/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/replay/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/replay/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/replay/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/replay/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/replay/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/replay/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/replay/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/template.html b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/template.html similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/template.html rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/template.html diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoad/test.ts diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/init.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/init.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/init.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/init.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/subject.js b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/subject.js similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/subject.js rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/subject.js diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/template.html b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/template.html similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/template.html rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/template.html diff --git a/packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/test.ts similarity index 100% rename from packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/test.ts rename to dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadAndOnLoad/test.ts diff --git a/packages/browser-integration-tests/package.json b/dev-packages/browser-integration-tests/package.json similarity index 100% rename from packages/browser-integration-tests/package.json rename to dev-packages/browser-integration-tests/package.json diff --git a/packages/browser-integration-tests/playwright.config.ts b/dev-packages/browser-integration-tests/playwright.config.ts similarity index 100% rename from packages/browser-integration-tests/playwright.config.ts rename to dev-packages/browser-integration-tests/playwright.config.ts diff --git a/packages/browser-integration-tests/playwright.setup.ts b/dev-packages/browser-integration-tests/playwright.setup.ts similarity index 100% rename from packages/browser-integration-tests/playwright.setup.ts rename to dev-packages/browser-integration-tests/playwright.setup.ts diff --git a/packages/browser-integration-tests/scripts/detectFlakyTests.ts b/dev-packages/browser-integration-tests/scripts/detectFlakyTests.ts similarity index 100% rename from packages/browser-integration-tests/scripts/detectFlakyTests.ts rename to dev-packages/browser-integration-tests/scripts/detectFlakyTests.ts diff --git a/packages/browser-integration-tests/suites/feedback/captureFeedback/init.js b/dev-packages/browser-integration-tests/suites/feedback/captureFeedback/init.js similarity index 100% rename from packages/browser-integration-tests/suites/feedback/captureFeedback/init.js rename to dev-packages/browser-integration-tests/suites/feedback/captureFeedback/init.js diff --git a/packages/browser-integration-tests/suites/feedback/captureFeedback/template.html b/dev-packages/browser-integration-tests/suites/feedback/captureFeedback/template.html similarity index 100% rename from packages/browser-integration-tests/suites/feedback/captureFeedback/template.html rename to dev-packages/browser-integration-tests/suites/feedback/captureFeedback/template.html diff --git a/packages/browser-integration-tests/suites/feedback/captureFeedback/test.ts b/dev-packages/browser-integration-tests/suites/feedback/captureFeedback/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/feedback/captureFeedback/test.ts rename to dev-packages/browser-integration-tests/suites/feedback/captureFeedback/test.ts diff --git a/packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/init.js b/dev-packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/init.js similarity index 100% rename from packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/init.js rename to dev-packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/init.js diff --git a/packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/template.html b/dev-packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/template.html similarity index 100% rename from packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/template.html rename to dev-packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/template.html diff --git a/packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/test.ts b/dev-packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/test.ts rename to dev-packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/template.html b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/template.html similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/template.html rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/template.html diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/test.ts b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/init.js b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/init.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/init.js rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/init.js diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/textInput/template.html b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/textInput/template.html similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/textInput/template.html rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/textInput/template.html diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/textInput/test.ts b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/textInput/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/textInput/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/textInput/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/get/subject.js b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/get/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/get/subject.js rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/get/subject.js diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/get/test.ts b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/get/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/get/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/get/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/init.js b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/init.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/init.js rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/init.js diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/post/subject.js b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/post/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/post/subject.js rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/post/subject.js diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/post/test.ts b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/post/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/post/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/fetch/post/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/get/subject.js b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/get/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/get/subject.js rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/get/subject.js diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/get/test.ts b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/get/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/get/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/get/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/init.js b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/init.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/init.js rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/init.js diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/post/subject.js b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/post/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/post/subject.js rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/post/subject.js diff --git a/packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/post/test.ts b/dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/post/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/post/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/xhr/post/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/ContextLines/init.js b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/init.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/ContextLines/init.js rename to dev-packages/browser-integration-tests/suites/integrations/ContextLines/init.js diff --git a/packages/browser-integration-tests/suites/integrations/ContextLines/inline/template.html b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/inline/template.html similarity index 100% rename from packages/browser-integration-tests/suites/integrations/ContextLines/inline/template.html rename to dev-packages/browser-integration-tests/suites/integrations/ContextLines/inline/template.html diff --git a/packages/browser-integration-tests/suites/integrations/ContextLines/inline/test.ts b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/inline/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/ContextLines/inline/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/ContextLines/inline/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/subject.js b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/subject.js rename to dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/subject.js diff --git a/packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/template.html b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/template.html similarity index 100% rename from packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/template.html rename to dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/template.html diff --git a/packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/ContextLines/noAddedLines/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/template.html b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/template.html similarity index 100% rename from packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/template.html rename to dev-packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/template.html diff --git a/packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/test.ts b/dev-packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/ContextLines/scriptTag/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/axios/subject.js b/dev-packages/browser-integration-tests/suites/integrations/httpclient/axios/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/axios/subject.js rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/axios/subject.js diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/axios/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpclient/axios/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/axios/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/axios/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/fetch/init.js b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/init.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/fetch/init.js rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/init.js diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/fetch/simple/subject.js b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/simple/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/fetch/simple/subject.js rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/simple/subject.js diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/fetch/simple/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/simple/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/fetch/simple/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/simple/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/subject.js b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/subject.js rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/subject.js diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequest/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/subject.js b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/subject.js rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/subject.js diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndBodyAndOptions/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/subject.js b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/subject.js rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/subject.js diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/fetch/withRequestAndOptions/test.ts diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/init.js b/dev-packages/browser-integration-tests/suites/integrations/httpclient/init.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/init.js rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/init.js diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/xhr/subject.js b/dev-packages/browser-integration-tests/suites/integrations/httpclient/xhr/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/xhr/subject.js rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/xhr/subject.js diff --git a/packages/browser-integration-tests/suites/integrations/httpclient/xhr/test.ts b/dev-packages/browser-integration-tests/suites/integrations/httpclient/xhr/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/integrations/httpclient/xhr/test.ts rename to dev-packages/browser-integration-tests/suites/integrations/httpclient/xhr/test.ts diff --git a/packages/browser-integration-tests/suites/manual-client/browser-context/init.js b/dev-packages/browser-integration-tests/suites/manual-client/browser-context/init.js similarity index 100% rename from packages/browser-integration-tests/suites/manual-client/browser-context/init.js rename to dev-packages/browser-integration-tests/suites/manual-client/browser-context/init.js diff --git a/packages/browser-integration-tests/suites/manual-client/browser-context/test.ts b/dev-packages/browser-integration-tests/suites/manual-client/browser-context/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/manual-client/browser-context/test.ts rename to dev-packages/browser-integration-tests/suites/manual-client/browser-context/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/subject.js b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/test.ts b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/empty_obj/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/addBreadcrumb/init.js b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/addBreadcrumb/init.js rename to dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/init.js diff --git a/packages/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/subject.js b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/subject.js b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/subject.js b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/test.ts b/dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/addBreadcrumb/undefined_arg/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/captureException/classInstance/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureException/classInstance/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/classInstance/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureException/classInstance/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/captureException/classInstance/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/classInstance/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/classInstance/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureException/classInstance/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/captureException/emptyObj/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureException/emptyObj/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/emptyObj/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureException/emptyObj/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/captureException/emptyObj/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/emptyObj/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/emptyObj/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureException/emptyObj/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/captureException/errorEvent/init.js b/dev-packages/browser-integration-tests/suites/public-api/captureException/errorEvent/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/errorEvent/init.js rename to dev-packages/browser-integration-tests/suites/public-api/captureException/errorEvent/init.js diff --git a/packages/browser-integration-tests/suites/public-api/captureException/errorEvent/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureException/errorEvent/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/errorEvent/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureException/errorEvent/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/captureException/errorEvent/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/errorEvent/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/errorEvent/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureException/errorEvent/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/captureException/event/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureException/event/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/event/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureException/event/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/captureException/event/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/event/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/event/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureException/event/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/captureException/init.js b/dev-packages/browser-integration-tests/suites/public-api/captureException/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/init.js rename to dev-packages/browser-integration-tests/suites/public-api/captureException/init.js diff --git a/packages/browser-integration-tests/suites/public-api/captureException/linkedErrrors/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureException/linkedErrrors/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/linkedErrrors/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureException/linkedErrrors/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/captureException/linkedErrrors/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/linkedErrrors/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/linkedErrrors/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureException/linkedErrrors/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/captureException/plainObject/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureException/plainObject/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/plainObject/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureException/plainObject/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/captureException/plainObject/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/plainObject/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/plainObject/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureException/plainObject/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/captureException/simpleError/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureException/simpleError/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/simpleError/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureException/simpleError/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/captureException/simpleError/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/simpleError/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/simpleError/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureException/simpleError/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/captureException/undefinedArg/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureException/undefinedArg/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/undefinedArg/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureException/undefinedArg/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/captureException/undefinedArg/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureException/undefinedArg/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureException/undefinedArg/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureException/undefinedArg/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/captureMessage/init.js b/dev-packages/browser-integration-tests/suites/public-api/captureMessage/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureMessage/init.js rename to dev-packages/browser-integration-tests/suites/public-api/captureMessage/init.js diff --git a/packages/browser-integration-tests/suites/public-api/captureMessage/simple_message/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureMessage/simple_message/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureMessage/simple_message/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureMessage/simple_message/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/captureMessage/simple_message/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureMessage/simple_message/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureMessage/simple_message/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureMessage/simple_message/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/captureMessage/with_level/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureMessage/with_level/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureMessage/with_level/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureMessage/with_level/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/captureMessage/with_level/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureMessage/with_level/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureMessage/with_level/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureMessage/with_level/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/captureUserFeedback/init.js b/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureUserFeedback/init.js rename to dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/init.js diff --git a/packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/configureScope/clear_scope/subject.js b/dev-packages/browser-integration-tests/suites/public-api/configureScope/clear_scope/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/configureScope/clear_scope/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/configureScope/clear_scope/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/configureScope/clear_scope/test.ts b/dev-packages/browser-integration-tests/suites/public-api/configureScope/clear_scope/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/configureScope/clear_scope/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/configureScope/clear_scope/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/configureScope/init.js b/dev-packages/browser-integration-tests/suites/public-api/configureScope/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/configureScope/init.js rename to dev-packages/browser-integration-tests/suites/public-api/configureScope/init.js diff --git a/packages/browser-integration-tests/suites/public-api/configureScope/set_properties/subject.js b/dev-packages/browser-integration-tests/suites/public-api/configureScope/set_properties/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/configureScope/set_properties/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/configureScope/set_properties/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/configureScope/set_properties/test.ts b/dev-packages/browser-integration-tests/suites/public-api/configureScope/set_properties/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/configureScope/set_properties/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/configureScope/set_properties/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/debug/init.js b/dev-packages/browser-integration-tests/suites/public-api/debug/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/debug/init.js rename to dev-packages/browser-integration-tests/suites/public-api/debug/init.js diff --git a/packages/browser-integration-tests/suites/public-api/debug/test.ts b/dev-packages/browser-integration-tests/suites/public-api/debug/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/debug/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/debug/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/init/console/test.ts b/dev-packages/browser-integration-tests/suites/public-api/init/console/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/init/console/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/init/console/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/init/init.js b/dev-packages/browser-integration-tests/suites/public-api/init/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/init/init.js rename to dev-packages/browser-integration-tests/suites/public-api/init/init.js diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-instrumentation-behaviour/subject.js b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-instrumentation-behaviour/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-instrumentation-behaviour/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-instrumentation-behaviour/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-instrumentation-behaviour/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-instrumentation-behaviour/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-instrumentation-behaviour/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-instrumentation-behaviour/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-this-preservation/subject.js b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-this-preservation/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-this-preservation/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-this-preservation/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-this-preservation/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-this-preservation/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-this-preservation/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-this-preservation/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-wrapping/subject.js b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-wrapping/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-wrapping/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-wrapping/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-wrapping/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-wrapping/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-wrapping/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener-wrapping/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/subject.js b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/init.js b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/init.js rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/init.js diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/setTimeout/subject.js b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeout/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/setTimeout/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeout/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/setTimeout/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeout/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/setTimeout/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeout/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/init.js b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/init.js rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/init.js diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/subject.js b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/test.ts b/dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setContext/init.js b/dev-packages/browser-integration-tests/suites/public-api/setContext/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setContext/init.js rename to dev-packages/browser-integration-tests/suites/public-api/setContext/init.js diff --git a/packages/browser-integration-tests/suites/public-api/setContext/multiple_contexts/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setContext/multiple_contexts/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setContext/multiple_contexts/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setContext/multiple_contexts/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setContext/multiple_contexts/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setContext/multiple_contexts/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setContext/multiple_contexts/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setContext/multiple_contexts/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setContext/non_serializable_context/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setContext/non_serializable_context/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setContext/non_serializable_context/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setContext/non_serializable_context/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setContext/non_serializable_context/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setContext/non_serializable_context/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setContext/non_serializable_context/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setContext/non_serializable_context/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setContext/simple_context/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setContext/simple_context/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setContext/simple_context/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setContext/simple_context/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setContext/simple_context/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setContext/simple_context/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setContext/simple_context/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setContext/simple_context/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setExtra/init.js b/dev-packages/browser-integration-tests/suites/public-api/setExtra/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setExtra/init.js rename to dev-packages/browser-integration-tests/suites/public-api/setExtra/init.js diff --git a/packages/browser-integration-tests/suites/public-api/setExtra/multiple_extras/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setExtra/multiple_extras/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setExtra/multiple_extras/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setExtra/multiple_extras/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setExtra/multiple_extras/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setExtra/multiple_extras/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setExtra/multiple_extras/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setExtra/multiple_extras/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setExtra/non_serializable_extra/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setExtra/simple_extra/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setExtra/simple_extra/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setExtra/simple_extra/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setExtra/simple_extra/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setExtra/simple_extra/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setExtra/simple_extra/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setExtra/simple_extra/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setExtra/simple_extra/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setExtras/consecutive_calls/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setExtras/init.js b/dev-packages/browser-integration-tests/suites/public-api/setExtras/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setExtras/init.js rename to dev-packages/browser-integration-tests/suites/public-api/setExtras/init.js diff --git a/packages/browser-integration-tests/suites/public-api/setExtras/multiple_extras/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setExtras/multiple_extras/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setExtras/multiple_extras/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setExtras/multiple_extras/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setExtras/multiple_extras/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setExtras/multiple_extras/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setExtras/multiple_extras/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setExtras/multiple_extras/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setTag/init.js b/dev-packages/browser-integration-tests/suites/public-api/setTag/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setTag/init.js rename to dev-packages/browser-integration-tests/suites/public-api/setTag/init.js diff --git a/packages/browser-integration-tests/suites/public-api/setTag/with_non_primitives/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setTag/with_non_primitives/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setTag/with_non_primitives/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setTag/with_non_primitives/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setTag/with_non_primitives/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setTag/with_non_primitives/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setTag/with_non_primitives/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setTag/with_non_primitives/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setTag/with_primitives/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setTag/with_primitives/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setTag/with_primitives/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setTag/with_primitives/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setTag/with_primitives/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setTag/with_primitives/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setTag/with_primitives/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setTag/with_primitives/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setTags/init.js b/dev-packages/browser-integration-tests/suites/public-api/setTags/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setTags/init.js rename to dev-packages/browser-integration-tests/suites/public-api/setTags/init.js diff --git a/packages/browser-integration-tests/suites/public-api/setTags/with_non_primitives/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setTags/with_non_primitives/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setTags/with_non_primitives/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setTags/with_non_primitives/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setTags/with_non_primitives/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setTags/with_non_primitives/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setTags/with_non_primitives/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setTags/with_non_primitives/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setTags/with_primitives/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setTags/with_primitives/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setTags/with_primitives/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setTags/with_primitives/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setTags/with_primitives/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setTags/with_primitives/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setTags/with_primitives/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setTags/with_primitives/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setUser/init.js b/dev-packages/browser-integration-tests/suites/public-api/setUser/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setUser/init.js rename to dev-packages/browser-integration-tests/suites/public-api/setUser/init.js diff --git a/packages/browser-integration-tests/suites/public-api/setUser/unset_user/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setUser/unset_user/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setUser/unset_user/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setUser/unset_user/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setUser/unset_user/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setUser/unset_user/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setUser/unset_user/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setUser/unset_user/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/setUser/update_user/subject.js b/dev-packages/browser-integration-tests/suites/public-api/setUser/update_user/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setUser/update_user/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/setUser/update_user/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/setUser/update_user/test.ts b/dev-packages/browser-integration-tests/suites/public-api/setUser/update_user/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/setUser/update_user/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/setUser/update_user/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/showReportDialog/init.js b/dev-packages/browser-integration-tests/suites/public-api/showReportDialog/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/showReportDialog/init.js rename to dev-packages/browser-integration-tests/suites/public-api/showReportDialog/init.js diff --git a/packages/browser-integration-tests/suites/public-api/showReportDialog/inject-script/subject.js b/dev-packages/browser-integration-tests/suites/public-api/showReportDialog/inject-script/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/showReportDialog/inject-script/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/showReportDialog/inject-script/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/showReportDialog/inject-script/test.ts b/dev-packages/browser-integration-tests/suites/public-api/showReportDialog/inject-script/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/showReportDialog/inject-script/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/showReportDialog/inject-script/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/startSpan/basic/subject.js b/dev-packages/browser-integration-tests/suites/public-api/startSpan/basic/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startSpan/basic/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/startSpan/basic/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/startSpan/basic/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/basic/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startSpan/basic/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/startSpan/basic/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/startSpan/error-async-reject/template.html b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-reject/template.html similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startSpan/error-async-reject/template.html rename to dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-reject/template.html diff --git a/packages/browser-integration-tests/suites/public-api/startSpan/error-async-reject/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-reject/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startSpan/error-async-reject/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-reject/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/template.html b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/template.html similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/template.html rename to dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/template.html diff --git a/packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw-not-awaited/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw/template.html b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw/template.html similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw/template.html rename to dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw/template.html diff --git a/packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/startSpan/error-async-throw/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/startSpan/error-sync/subject.js b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startSpan/error-sync/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/startSpan/init.js b/dev-packages/browser-integration-tests/suites/public-api/startSpan/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startSpan/init.js rename to dev-packages/browser-integration-tests/suites/public-api/startSpan/init.js diff --git a/packages/browser-integration-tests/suites/public-api/startTransaction/basic_usage/subject.js b/dev-packages/browser-integration-tests/suites/public-api/startTransaction/basic_usage/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startTransaction/basic_usage/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/startTransaction/basic_usage/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/startTransaction/basic_usage/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startTransaction/basic_usage/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startTransaction/basic_usage/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/startTransaction/basic_usage/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/startTransaction/circular_data/subject.js b/dev-packages/browser-integration-tests/suites/public-api/startTransaction/circular_data/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startTransaction/circular_data/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/startTransaction/circular_data/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/startTransaction/circular_data/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startTransaction/circular_data/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startTransaction/circular_data/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/startTransaction/circular_data/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/startTransaction/init.js b/dev-packages/browser-integration-tests/suites/public-api/startTransaction/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startTransaction/init.js rename to dev-packages/browser-integration-tests/suites/public-api/startTransaction/init.js diff --git a/packages/browser-integration-tests/suites/public-api/startTransaction/setMeasurement/subject.js b/dev-packages/browser-integration-tests/suites/public-api/startTransaction/setMeasurement/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startTransaction/setMeasurement/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/startTransaction/setMeasurement/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/startTransaction/setMeasurement/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startTransaction/setMeasurement/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/startTransaction/setMeasurement/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/startTransaction/setMeasurement/test.ts diff --git a/packages/browser-integration-tests/suites/public-api/withScope/init.js b/dev-packages/browser-integration-tests/suites/public-api/withScope/init.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/withScope/init.js rename to dev-packages/browser-integration-tests/suites/public-api/withScope/init.js diff --git a/packages/browser-integration-tests/suites/public-api/withScope/nested_scopes/subject.js b/dev-packages/browser-integration-tests/suites/public-api/withScope/nested_scopes/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/public-api/withScope/nested_scopes/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/withScope/nested_scopes/subject.js diff --git a/packages/browser-integration-tests/suites/public-api/withScope/nested_scopes/test.ts b/dev-packages/browser-integration-tests/suites/public-api/withScope/nested_scopes/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/public-api/withScope/nested_scopes/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/withScope/nested_scopes/test.ts diff --git a/packages/browser-integration-tests/suites/replay/bufferMode/init.js b/dev-packages/browser-integration-tests/suites/replay/bufferMode/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/bufferMode/init.js rename to dev-packages/browser-integration-tests/suites/replay/bufferMode/init.js diff --git a/packages/browser-integration-tests/suites/replay/bufferMode/subject.js b/dev-packages/browser-integration-tests/suites/replay/bufferMode/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/bufferMode/subject.js rename to dev-packages/browser-integration-tests/suites/replay/bufferMode/subject.js diff --git a/packages/browser-integration-tests/suites/replay/bufferMode/template.html b/dev-packages/browser-integration-tests/suites/replay/bufferMode/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/bufferMode/template.html rename to dev-packages/browser-integration-tests/suites/replay/bufferMode/template.html diff --git a/packages/browser-integration-tests/suites/replay/bufferMode/test.ts b/dev-packages/browser-integration-tests/suites/replay/bufferMode/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/bufferMode/test.ts rename to dev-packages/browser-integration-tests/suites/replay/bufferMode/test.ts diff --git a/packages/browser-integration-tests/suites/replay/bufferModeReload/init.js b/dev-packages/browser-integration-tests/suites/replay/bufferModeReload/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/bufferModeReload/init.js rename to dev-packages/browser-integration-tests/suites/replay/bufferModeReload/init.js diff --git a/packages/browser-integration-tests/suites/replay/bufferModeReload/template.html b/dev-packages/browser-integration-tests/suites/replay/bufferModeReload/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/bufferModeReload/template.html rename to dev-packages/browser-integration-tests/suites/replay/bufferModeReload/template.html diff --git a/packages/browser-integration-tests/suites/replay/bufferModeReload/test.ts b/dev-packages/browser-integration-tests/suites/replay/bufferModeReload/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/bufferModeReload/test.ts rename to dev-packages/browser-integration-tests/suites/replay/bufferModeReload/test.ts diff --git a/packages/browser-integration-tests/suites/replay/captureComponentName/init.js b/dev-packages/browser-integration-tests/suites/replay/captureComponentName/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/captureComponentName/init.js rename to dev-packages/browser-integration-tests/suites/replay/captureComponentName/init.js diff --git a/packages/browser-integration-tests/suites/replay/captureComponentName/template.html b/dev-packages/browser-integration-tests/suites/replay/captureComponentName/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/captureComponentName/template.html rename to dev-packages/browser-integration-tests/suites/replay/captureComponentName/template.html diff --git a/packages/browser-integration-tests/suites/replay/captureComponentName/test.ts b/dev-packages/browser-integration-tests/suites/replay/captureComponentName/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/captureComponentName/test.ts rename to dev-packages/browser-integration-tests/suites/replay/captureComponentName/test.ts diff --git a/packages/browser-integration-tests/suites/replay/captureConsoleLog/template.html b/dev-packages/browser-integration-tests/suites/replay/captureConsoleLog/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/captureConsoleLog/template.html rename to dev-packages/browser-integration-tests/suites/replay/captureConsoleLog/template.html diff --git a/packages/browser-integration-tests/suites/replay/captureConsoleLog/test.ts b/dev-packages/browser-integration-tests/suites/replay/captureConsoleLog/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/captureConsoleLog/test.ts rename to dev-packages/browser-integration-tests/suites/replay/captureConsoleLog/test.ts diff --git a/packages/browser-integration-tests/suites/replay/captureReplay/template.html b/dev-packages/browser-integration-tests/suites/replay/captureReplay/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/captureReplay/template.html rename to dev-packages/browser-integration-tests/suites/replay/captureReplay/template.html diff --git a/packages/browser-integration-tests/suites/replay/captureReplay/test.ts b/dev-packages/browser-integration-tests/suites/replay/captureReplay/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/captureReplay/test.ts rename to dev-packages/browser-integration-tests/suites/replay/captureReplay/test.ts diff --git a/packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/init.js b/dev-packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/init.js rename to dev-packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/init.js diff --git a/packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/template.html b/dev-packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/template.html rename to dev-packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/template.html diff --git a/packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/test.ts b/dev-packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/test.ts rename to dev-packages/browser-integration-tests/suites/replay/captureReplayFromReplayPackage/test.ts diff --git a/packages/browser-integration-tests/suites/replay/compressionDisabled/init.js b/dev-packages/browser-integration-tests/suites/replay/compressionDisabled/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/compressionDisabled/init.js rename to dev-packages/browser-integration-tests/suites/replay/compressionDisabled/init.js diff --git a/packages/browser-integration-tests/suites/replay/compressionDisabled/template.html b/dev-packages/browser-integration-tests/suites/replay/compressionDisabled/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/compressionDisabled/template.html rename to dev-packages/browser-integration-tests/suites/replay/compressionDisabled/template.html diff --git a/packages/browser-integration-tests/suites/replay/compressionDisabled/test.ts b/dev-packages/browser-integration-tests/suites/replay/compressionDisabled/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/compressionDisabled/test.ts rename to dev-packages/browser-integration-tests/suites/replay/compressionDisabled/test.ts diff --git a/packages/browser-integration-tests/suites/replay/compressionEnabled/init.js b/dev-packages/browser-integration-tests/suites/replay/compressionEnabled/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/compressionEnabled/init.js rename to dev-packages/browser-integration-tests/suites/replay/compressionEnabled/init.js diff --git a/packages/browser-integration-tests/suites/replay/compressionEnabled/template.html b/dev-packages/browser-integration-tests/suites/replay/compressionEnabled/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/compressionEnabled/template.html rename to dev-packages/browser-integration-tests/suites/replay/compressionEnabled/template.html diff --git a/packages/browser-integration-tests/suites/replay/compressionEnabled/test.ts b/dev-packages/browser-integration-tests/suites/replay/compressionEnabled/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/compressionEnabled/test.ts rename to dev-packages/browser-integration-tests/suites/replay/compressionEnabled/test.ts diff --git a/packages/browser-integration-tests/suites/replay/compressionWorkerUrl/init.js b/dev-packages/browser-integration-tests/suites/replay/compressionWorkerUrl/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/compressionWorkerUrl/init.js rename to dev-packages/browser-integration-tests/suites/replay/compressionWorkerUrl/init.js diff --git a/packages/browser-integration-tests/suites/replay/compressionWorkerUrl/template.html b/dev-packages/browser-integration-tests/suites/replay/compressionWorkerUrl/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/compressionWorkerUrl/template.html rename to dev-packages/browser-integration-tests/suites/replay/compressionWorkerUrl/template.html diff --git a/packages/browser-integration-tests/suites/replay/compressionWorkerUrl/test.ts b/dev-packages/browser-integration-tests/suites/replay/compressionWorkerUrl/test.ts similarity index 94% rename from packages/browser-integration-tests/suites/replay/compressionWorkerUrl/test.ts rename to dev-packages/browser-integration-tests/suites/replay/compressionWorkerUrl/test.ts index f9474f7ae4c4..0b34803e3b7a 100644 --- a/packages/browser-integration-tests/suites/replay/compressionWorkerUrl/test.ts +++ b/dev-packages/browser-integration-tests/suites/replay/compressionWorkerUrl/test.ts @@ -35,7 +35,7 @@ sentryTest( // Ensure to register this _after_ getLocalTestUrl is called, as that also registers a default route for TEST_HOST await page.route(`${TEST_HOST}/my-test-worker.js`, route => { - const filePath = path.resolve(__dirname, '../../../../replay-worker/examples/worker.min.js'); + const filePath = path.resolve(__dirname, '../../../../../packages/replay-worker/examples/worker.min.js'); customCompressCalled++; diff --git a/packages/browser-integration-tests/suites/replay/customEvents/init.js b/dev-packages/browser-integration-tests/suites/replay/customEvents/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/customEvents/init.js rename to dev-packages/browser-integration-tests/suites/replay/customEvents/init.js diff --git a/packages/browser-integration-tests/suites/replay/customEvents/subject.js b/dev-packages/browser-integration-tests/suites/replay/customEvents/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/customEvents/subject.js rename to dev-packages/browser-integration-tests/suites/replay/customEvents/subject.js diff --git a/packages/browser-integration-tests/suites/replay/customEvents/template.html b/dev-packages/browser-integration-tests/suites/replay/customEvents/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/customEvents/template.html rename to dev-packages/browser-integration-tests/suites/replay/customEvents/template.html diff --git a/packages/browser-integration-tests/suites/replay/customEvents/test.ts b/dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/customEvents/test.ts rename to dev-packages/browser-integration-tests/suites/replay/customEvents/test.ts diff --git a/packages/browser-integration-tests/suites/replay/dsc/init.js b/dev-packages/browser-integration-tests/suites/replay/dsc/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/dsc/init.js rename to dev-packages/browser-integration-tests/suites/replay/dsc/init.js diff --git a/packages/browser-integration-tests/suites/replay/dsc/test.ts b/dev-packages/browser-integration-tests/suites/replay/dsc/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/dsc/test.ts rename to dev-packages/browser-integration-tests/suites/replay/dsc/test.ts diff --git a/packages/browser-integration-tests/suites/replay/errorResponse/template.html b/dev-packages/browser-integration-tests/suites/replay/errorResponse/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/errorResponse/template.html rename to dev-packages/browser-integration-tests/suites/replay/errorResponse/template.html diff --git a/packages/browser-integration-tests/suites/replay/errorResponse/test.ts b/dev-packages/browser-integration-tests/suites/replay/errorResponse/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/errorResponse/test.ts rename to dev-packages/browser-integration-tests/suites/replay/errorResponse/test.ts diff --git a/packages/browser-integration-tests/suites/replay/errors/beforeErrorSampling/init.js b/dev-packages/browser-integration-tests/suites/replay/errors/beforeErrorSampling/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/beforeErrorSampling/init.js rename to dev-packages/browser-integration-tests/suites/replay/errors/beforeErrorSampling/init.js diff --git a/packages/browser-integration-tests/suites/replay/errors/beforeErrorSampling/test.ts b/dev-packages/browser-integration-tests/suites/replay/errors/beforeErrorSampling/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/beforeErrorSampling/test.ts rename to dev-packages/browser-integration-tests/suites/replay/errors/beforeErrorSampling/test.ts diff --git a/packages/browser-integration-tests/suites/replay/errors/droppedError/init.js b/dev-packages/browser-integration-tests/suites/replay/errors/droppedError/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/droppedError/init.js rename to dev-packages/browser-integration-tests/suites/replay/errors/droppedError/init.js diff --git a/packages/browser-integration-tests/suites/replay/errors/droppedError/test.ts b/dev-packages/browser-integration-tests/suites/replay/errors/droppedError/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/droppedError/test.ts rename to dev-packages/browser-integration-tests/suites/replay/errors/droppedError/test.ts diff --git a/packages/browser-integration-tests/suites/replay/errors/errorMode/test.ts b/dev-packages/browser-integration-tests/suites/replay/errors/errorMode/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/errorMode/test.ts rename to dev-packages/browser-integration-tests/suites/replay/errors/errorMode/test.ts diff --git a/packages/browser-integration-tests/suites/replay/errors/errorModeCustomTransport/init.js b/dev-packages/browser-integration-tests/suites/replay/errors/errorModeCustomTransport/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/errorModeCustomTransport/init.js rename to dev-packages/browser-integration-tests/suites/replay/errors/errorModeCustomTransport/init.js diff --git a/packages/browser-integration-tests/suites/replay/errors/errorModeCustomTransport/test.ts b/dev-packages/browser-integration-tests/suites/replay/errors/errorModeCustomTransport/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/errorModeCustomTransport/test.ts rename to dev-packages/browser-integration-tests/suites/replay/errors/errorModeCustomTransport/test.ts diff --git a/packages/browser-integration-tests/suites/replay/errors/errorNotSent/init.js b/dev-packages/browser-integration-tests/suites/replay/errors/errorNotSent/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/errorNotSent/init.js rename to dev-packages/browser-integration-tests/suites/replay/errors/errorNotSent/init.js diff --git a/packages/browser-integration-tests/suites/replay/errors/errorNotSent/test.ts b/dev-packages/browser-integration-tests/suites/replay/errors/errorNotSent/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/errorNotSent/test.ts rename to dev-packages/browser-integration-tests/suites/replay/errors/errorNotSent/test.ts diff --git a/packages/browser-integration-tests/suites/replay/errors/errorsInSession/init.js b/dev-packages/browser-integration-tests/suites/replay/errors/errorsInSession/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/errorsInSession/init.js rename to dev-packages/browser-integration-tests/suites/replay/errors/errorsInSession/init.js diff --git a/packages/browser-integration-tests/suites/replay/errors/errorsInSession/test.ts b/dev-packages/browser-integration-tests/suites/replay/errors/errorsInSession/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/errorsInSession/test.ts rename to dev-packages/browser-integration-tests/suites/replay/errors/errorsInSession/test.ts diff --git a/packages/browser-integration-tests/suites/replay/errors/init.js b/dev-packages/browser-integration-tests/suites/replay/errors/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/init.js rename to dev-packages/browser-integration-tests/suites/replay/errors/init.js diff --git a/packages/browser-integration-tests/suites/replay/errors/subject.js b/dev-packages/browser-integration-tests/suites/replay/errors/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/subject.js rename to dev-packages/browser-integration-tests/suites/replay/errors/subject.js diff --git a/packages/browser-integration-tests/suites/replay/errors/template.html b/dev-packages/browser-integration-tests/suites/replay/errors/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/errors/template.html rename to dev-packages/browser-integration-tests/suites/replay/errors/template.html diff --git a/packages/browser-integration-tests/suites/replay/eventBufferError/template.html b/dev-packages/browser-integration-tests/suites/replay/eventBufferError/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/eventBufferError/template.html rename to dev-packages/browser-integration-tests/suites/replay/eventBufferError/template.html diff --git a/packages/browser-integration-tests/suites/replay/eventBufferError/test.ts b/dev-packages/browser-integration-tests/suites/replay/eventBufferError/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/eventBufferError/test.ts rename to dev-packages/browser-integration-tests/suites/replay/eventBufferError/test.ts diff --git a/packages/browser-integration-tests/suites/replay/exceptions/template.html b/dev-packages/browser-integration-tests/suites/replay/exceptions/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/exceptions/template.html rename to dev-packages/browser-integration-tests/suites/replay/exceptions/template.html diff --git a/packages/browser-integration-tests/suites/replay/exceptions/test.ts b/dev-packages/browser-integration-tests/suites/replay/exceptions/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/exceptions/test.ts rename to dev-packages/browser-integration-tests/suites/replay/exceptions/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestBody/init.js b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestBody/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestBody/init.js rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestBody/init.js diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestBody/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestBody/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestBody/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestBody/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestHeaders/init.js b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestHeaders/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestHeaders/init.js rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestHeaders/init.js diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestHeaders/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestHeaders/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestHeaders/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestHeaders/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestSize/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestSize/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestSize/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureRequestSize/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseBody/init.js b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseBody/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseBody/init.js rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseBody/init.js diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseBody/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseBody/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseBody/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseBody/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseHeaders/init.js b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseHeaders/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseHeaders/init.js rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseHeaders/init.js diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseHeaders/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseHeaders/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseHeaders/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseHeaders/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseSize/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseSize/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseSize/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureResponseSize/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureTimestamps/init.js b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureTimestamps/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureTimestamps/init.js rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureTimestamps/init.js diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureTimestamps/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureTimestamps/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureTimestamps/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/captureTimestamps/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/init.js b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/init.js rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/fetch/init.js diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestBody/init.js b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestBody/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestBody/init.js rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestBody/init.js diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestBody/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestBody/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestBody/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestBody/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestHeaders/init.js b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestHeaders/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestHeaders/init.js rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestHeaders/init.js diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestHeaders/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestHeaders/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestHeaders/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestHeaders/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestSize/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestSize/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestSize/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureRequestSize/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseBody/init.js b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseBody/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseBody/init.js rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseBody/init.js diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseBody/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseBody/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseBody/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseBody/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseHeaders/init.js b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseHeaders/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseHeaders/init.js rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseHeaders/init.js diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseHeaders/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseHeaders/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseHeaders/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseHeaders/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseSize/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseSize/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseSize/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureResponseSize/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureTimestamps/init.js b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureTimestamps/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureTimestamps/init.js rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureTimestamps/init.js diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureTimestamps/test.ts b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureTimestamps/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureTimestamps/test.ts rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/captureTimestamps/test.ts diff --git a/packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/init.js b/dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/init.js rename to dev-packages/browser-integration-tests/suites/replay/extendNetworkBreadcrumbs/xhr/init.js diff --git a/packages/browser-integration-tests/suites/replay/fileInput/init.js b/dev-packages/browser-integration-tests/suites/replay/fileInput/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/fileInput/init.js rename to dev-packages/browser-integration-tests/suites/replay/fileInput/init.js diff --git a/packages/browser-integration-tests/suites/replay/fileInput/template.html b/dev-packages/browser-integration-tests/suites/replay/fileInput/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/fileInput/template.html rename to dev-packages/browser-integration-tests/suites/replay/fileInput/template.html diff --git a/packages/browser-integration-tests/suites/replay/fileInput/test.ts b/dev-packages/browser-integration-tests/suites/replay/fileInput/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/fileInput/test.ts rename to dev-packages/browser-integration-tests/suites/replay/fileInput/test.ts diff --git a/packages/browser-integration-tests/suites/replay/flushing/init.js b/dev-packages/browser-integration-tests/suites/replay/flushing/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/flushing/init.js rename to dev-packages/browser-integration-tests/suites/replay/flushing/init.js diff --git a/packages/browser-integration-tests/suites/replay/flushing/subject.js b/dev-packages/browser-integration-tests/suites/replay/flushing/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/flushing/subject.js rename to dev-packages/browser-integration-tests/suites/replay/flushing/subject.js diff --git a/packages/browser-integration-tests/suites/replay/flushing/template.html b/dev-packages/browser-integration-tests/suites/replay/flushing/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/flushing/template.html rename to dev-packages/browser-integration-tests/suites/replay/flushing/template.html diff --git a/packages/browser-integration-tests/suites/replay/flushing/test.ts b/dev-packages/browser-integration-tests/suites/replay/flushing/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/flushing/test.ts rename to dev-packages/browser-integration-tests/suites/replay/flushing/test.ts diff --git a/packages/browser-integration-tests/suites/replay/init.js b/dev-packages/browser-integration-tests/suites/replay/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/init.js rename to dev-packages/browser-integration-tests/suites/replay/init.js diff --git a/packages/browser-integration-tests/suites/replay/keyboardEvents/init.js b/dev-packages/browser-integration-tests/suites/replay/keyboardEvents/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/keyboardEvents/init.js rename to dev-packages/browser-integration-tests/suites/replay/keyboardEvents/init.js diff --git a/packages/browser-integration-tests/suites/replay/keyboardEvents/template.html b/dev-packages/browser-integration-tests/suites/replay/keyboardEvents/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/keyboardEvents/template.html rename to dev-packages/browser-integration-tests/suites/replay/keyboardEvents/template.html diff --git a/packages/browser-integration-tests/suites/replay/keyboardEvents/test.ts b/dev-packages/browser-integration-tests/suites/replay/keyboardEvents/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/keyboardEvents/test.ts rename to dev-packages/browser-integration-tests/suites/replay/keyboardEvents/test.ts diff --git a/packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/init.js b/dev-packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/init.js rename to dev-packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/init.js diff --git a/packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/template.html b/dev-packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/template.html rename to dev-packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/template.html diff --git a/packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/test.ts b/dev-packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/test.ts rename to dev-packages/browser-integration-tests/suites/replay/largeMutations/defaultOptions/test.ts diff --git a/packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/init.js b/dev-packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/init.js rename to dev-packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/init.js diff --git a/packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/template.html b/dev-packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/template.html rename to dev-packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/template.html diff --git a/packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/test.ts b/dev-packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/test.ts rename to dev-packages/browser-integration-tests/suites/replay/largeMutations/mutationLimit/test.ts diff --git a/packages/browser-integration-tests/suites/replay/maxReplayDuration/init.js b/dev-packages/browser-integration-tests/suites/replay/maxReplayDuration/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/maxReplayDuration/init.js rename to dev-packages/browser-integration-tests/suites/replay/maxReplayDuration/init.js diff --git a/packages/browser-integration-tests/suites/replay/maxReplayDuration/template.html b/dev-packages/browser-integration-tests/suites/replay/maxReplayDuration/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/maxReplayDuration/template.html rename to dev-packages/browser-integration-tests/suites/replay/maxReplayDuration/template.html diff --git a/packages/browser-integration-tests/suites/replay/maxReplayDuration/test.ts b/dev-packages/browser-integration-tests/suites/replay/maxReplayDuration/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/maxReplayDuration/test.ts rename to dev-packages/browser-integration-tests/suites/replay/maxReplayDuration/test.ts diff --git a/packages/browser-integration-tests/suites/replay/minReplayDuration/init.js b/dev-packages/browser-integration-tests/suites/replay/minReplayDuration/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/minReplayDuration/init.js rename to dev-packages/browser-integration-tests/suites/replay/minReplayDuration/init.js diff --git a/packages/browser-integration-tests/suites/replay/minReplayDuration/template.html b/dev-packages/browser-integration-tests/suites/replay/minReplayDuration/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/minReplayDuration/template.html rename to dev-packages/browser-integration-tests/suites/replay/minReplayDuration/template.html diff --git a/packages/browser-integration-tests/suites/replay/minReplayDuration/test.ts b/dev-packages/browser-integration-tests/suites/replay/minReplayDuration/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/minReplayDuration/test.ts rename to dev-packages/browser-integration-tests/suites/replay/minReplayDuration/test.ts diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/init.js b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/init.js rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/init.js diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/page-0.html b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/page-0.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/page-0.html rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/page-0.html diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/subject.js b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/subject.js rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/subject.js diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/template.html b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/template.html rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/template.html diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-0-snap-full b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-0-snap-full similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-0-snap-full rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-0-snap-full diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-0-snap-full-chromium b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-0-snap-full-chromium similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-0-snap-full-chromium rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-0-snap-full-chromium diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-1-snap-incremental b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-1-snap-incremental similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-1-snap-incremental rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-1-snap-incremental diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-1-snap-incremental-chromium b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-1-snap-incremental-chromium similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-1-snap-incremental-chromium rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-1-snap-incremental-chromium diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-2-snap-full b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-2-snap-full similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-2-snap-full rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-2-snap-full diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-2-snap-full-chromium b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-2-snap-full-chromium similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-2-snap-full-chromium rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-2-snap-full-chromium diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-3-snap-incremental b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-3-snap-incremental similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-3-snap-incremental rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-3-snap-incremental diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-3-snap-incremental-chromium b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-3-snap-incremental-chromium similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-3-snap-incremental-chromium rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-3-snap-incremental-chromium diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-4-snap-full b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-4-snap-full similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-4-snap-full rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-4-snap-full diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-4-snap-full-chromium b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-4-snap-full-chromium similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-4-snap-full-chromium rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-4-snap-full-chromium diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-5-snap-incremental b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-5-snap-incremental similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-5-snap-incremental rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-5-snap-incremental diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-5-snap-incremental-chromium b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-5-snap-incremental-chromium similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-5-snap-incremental-chromium rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-5-snap-incremental-chromium diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-6-snap-incremental b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-6-snap-incremental similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-6-snap-incremental rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-6-snap-incremental diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-6-snap-incremental-chromium b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-6-snap-incremental-chromium similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-6-snap-incremental-chromium rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-6-snap-incremental-chromium diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-7-snap-incremental b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-7-snap-incremental similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-7-snap-incremental rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-7-snap-incremental diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-7-snap-incremental-chromium b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-7-snap-incremental-chromium similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-7-snap-incremental-chromium rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-7-snap-incremental-chromium diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-8-snap-full b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-8-snap-full similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-8-snap-full rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-8-snap-full diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-8-snap-full-chromium b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-8-snap-full-chromium similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-8-snap-full-chromium rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-8-snap-full-chromium diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-9-snap-incremental b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-9-snap-incremental similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-9-snap-incremental rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-9-snap-incremental diff --git a/packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-9-snap-incremental-chromium b/dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-9-snap-incremental-chromium similarity index 100% rename from packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-9-snap-incremental-chromium rename to dev-packages/browser-integration-tests/suites/replay/multiple-pages/test.ts-snapshots/seg-9-snap-incremental-chromium diff --git a/packages/browser-integration-tests/suites/replay/privacyBlock/init.js b/dev-packages/browser-integration-tests/suites/replay/privacyBlock/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyBlock/init.js rename to dev-packages/browser-integration-tests/suites/replay/privacyBlock/init.js diff --git a/packages/browser-integration-tests/suites/replay/privacyBlock/template.html b/dev-packages/browser-integration-tests/suites/replay/privacyBlock/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyBlock/template.html rename to dev-packages/browser-integration-tests/suites/replay/privacyBlock/template.html diff --git a/packages/browser-integration-tests/suites/replay/privacyBlock/test.ts b/dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyBlock/test.ts rename to dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts diff --git a/packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-chromium.json b/dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-chromium.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-chromium.json rename to dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-chromium.json diff --git a/packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-firefox.json b/dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-firefox.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-firefox.json rename to dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-firefox.json diff --git a/packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-webkit.json b/dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-webkit.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-webkit.json rename to dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy-webkit.json diff --git a/packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy.json b/dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy.json rename to dev-packages/browser-integration-tests/suites/replay/privacyBlock/test.ts-snapshots/privacy.json diff --git a/packages/browser-integration-tests/suites/replay/privacyDefault/init.js b/dev-packages/browser-integration-tests/suites/replay/privacyDefault/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyDefault/init.js rename to dev-packages/browser-integration-tests/suites/replay/privacyDefault/init.js diff --git a/packages/browser-integration-tests/suites/replay/privacyDefault/template.html b/dev-packages/browser-integration-tests/suites/replay/privacyDefault/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyDefault/template.html rename to dev-packages/browser-integration-tests/suites/replay/privacyDefault/template.html diff --git a/packages/browser-integration-tests/suites/replay/privacyDefault/test.ts b/dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyDefault/test.ts rename to dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts diff --git a/packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-chromium.json b/dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-chromium.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-chromium.json rename to dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-chromium.json diff --git a/packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-firefox.json b/dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-firefox.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-firefox.json rename to dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-firefox.json diff --git a/packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-webkit.json b/dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-webkit.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-webkit.json rename to dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy-webkit.json diff --git a/packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy.json b/dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy.json rename to dev-packages/browser-integration-tests/suites/replay/privacyDefault/test.ts-snapshots/privacy.json diff --git a/packages/browser-integration-tests/suites/replay/privacyInput/init.js b/dev-packages/browser-integration-tests/suites/replay/privacyInput/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyInput/init.js rename to dev-packages/browser-integration-tests/suites/replay/privacyInput/init.js diff --git a/packages/browser-integration-tests/suites/replay/privacyInput/template.html b/dev-packages/browser-integration-tests/suites/replay/privacyInput/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyInput/template.html rename to dev-packages/browser-integration-tests/suites/replay/privacyInput/template.html diff --git a/packages/browser-integration-tests/suites/replay/privacyInput/test.ts b/dev-packages/browser-integration-tests/suites/replay/privacyInput/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyInput/test.ts rename to dev-packages/browser-integration-tests/suites/replay/privacyInput/test.ts diff --git a/packages/browser-integration-tests/suites/replay/privacyInputMaskAll/init.js b/dev-packages/browser-integration-tests/suites/replay/privacyInputMaskAll/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyInputMaskAll/init.js rename to dev-packages/browser-integration-tests/suites/replay/privacyInputMaskAll/init.js diff --git a/packages/browser-integration-tests/suites/replay/privacyInputMaskAll/template.html b/dev-packages/browser-integration-tests/suites/replay/privacyInputMaskAll/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyInputMaskAll/template.html rename to dev-packages/browser-integration-tests/suites/replay/privacyInputMaskAll/template.html diff --git a/packages/browser-integration-tests/suites/replay/privacyInputMaskAll/test.ts b/dev-packages/browser-integration-tests/suites/replay/privacyInputMaskAll/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/privacyInputMaskAll/test.ts rename to dev-packages/browser-integration-tests/suites/replay/privacyInputMaskAll/test.ts diff --git a/packages/browser-integration-tests/suites/replay/replayShim/init.js b/dev-packages/browser-integration-tests/suites/replay/replayShim/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/replayShim/init.js rename to dev-packages/browser-integration-tests/suites/replay/replayShim/init.js diff --git a/packages/browser-integration-tests/suites/replay/replayShim/template.html b/dev-packages/browser-integration-tests/suites/replay/replayShim/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/replayShim/template.html rename to dev-packages/browser-integration-tests/suites/replay/replayShim/template.html diff --git a/packages/browser-integration-tests/suites/replay/replayShim/test.ts b/dev-packages/browser-integration-tests/suites/replay/replayShim/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/replayShim/test.ts rename to dev-packages/browser-integration-tests/suites/replay/replayShim/test.ts diff --git a/packages/browser-integration-tests/suites/replay/requests/init.js b/dev-packages/browser-integration-tests/suites/replay/requests/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/requests/init.js rename to dev-packages/browser-integration-tests/suites/replay/requests/init.js diff --git a/packages/browser-integration-tests/suites/replay/requests/subject.js b/dev-packages/browser-integration-tests/suites/replay/requests/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/requests/subject.js rename to dev-packages/browser-integration-tests/suites/replay/requests/subject.js diff --git a/packages/browser-integration-tests/suites/replay/requests/template.html b/dev-packages/browser-integration-tests/suites/replay/requests/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/requests/template.html rename to dev-packages/browser-integration-tests/suites/replay/requests/template.html diff --git a/packages/browser-integration-tests/suites/replay/requests/test.ts b/dev-packages/browser-integration-tests/suites/replay/requests/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/requests/test.ts rename to dev-packages/browser-integration-tests/suites/replay/requests/test.ts diff --git a/packages/browser-integration-tests/suites/replay/sampling/init.js b/dev-packages/browser-integration-tests/suites/replay/sampling/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/sampling/init.js rename to dev-packages/browser-integration-tests/suites/replay/sampling/init.js diff --git a/packages/browser-integration-tests/suites/replay/sampling/template.html b/dev-packages/browser-integration-tests/suites/replay/sampling/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/sampling/template.html rename to dev-packages/browser-integration-tests/suites/replay/sampling/template.html diff --git a/packages/browser-integration-tests/suites/replay/sampling/test.ts b/dev-packages/browser-integration-tests/suites/replay/sampling/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/sampling/test.ts rename to dev-packages/browser-integration-tests/suites/replay/sampling/test.ts diff --git a/packages/browser-integration-tests/suites/replay/sessionExpiry/init.js b/dev-packages/browser-integration-tests/suites/replay/sessionExpiry/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionExpiry/init.js rename to dev-packages/browser-integration-tests/suites/replay/sessionExpiry/init.js diff --git a/packages/browser-integration-tests/suites/replay/sessionExpiry/template.html b/dev-packages/browser-integration-tests/suites/replay/sessionExpiry/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionExpiry/template.html rename to dev-packages/browser-integration-tests/suites/replay/sessionExpiry/template.html diff --git a/packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts b/dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts rename to dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts diff --git a/packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-0-chromium.json b/dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-0-chromium.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-0-chromium.json rename to dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-0-chromium.json diff --git a/packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-0-webkit.json b/dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-0-webkit.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-0-webkit.json rename to dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-0-webkit.json diff --git a/packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-2-chromium.json b/dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-2-chromium.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-2-chromium.json rename to dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-2-chromium.json diff --git a/packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-2-webkit.json b/dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-2-webkit.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-2-webkit.json rename to dev-packages/browser-integration-tests/suites/replay/sessionExpiry/test.ts-snapshots/snapshot-2-webkit.json diff --git a/packages/browser-integration-tests/suites/replay/sessionInactive/init.js b/dev-packages/browser-integration-tests/suites/replay/sessionInactive/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionInactive/init.js rename to dev-packages/browser-integration-tests/suites/replay/sessionInactive/init.js diff --git a/packages/browser-integration-tests/suites/replay/sessionInactive/template.html b/dev-packages/browser-integration-tests/suites/replay/sessionInactive/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionInactive/template.html rename to dev-packages/browser-integration-tests/suites/replay/sessionInactive/template.html diff --git a/packages/browser-integration-tests/suites/replay/sessionInactive/test.ts b/dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionInactive/test.ts rename to dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts diff --git a/packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-0-chromium.json b/dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-0-chromium.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-0-chromium.json rename to dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-0-chromium.json diff --git a/packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-0-webkit.json b/dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-0-webkit.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-0-webkit.json rename to dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-0-webkit.json diff --git a/packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-1-chromium.json b/dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-1-chromium.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-1-chromium.json rename to dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-1-chromium.json diff --git a/packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-1-webkit.json b/dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-1-webkit.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-1-webkit.json rename to dev-packages/browser-integration-tests/suites/replay/sessionInactive/test.ts-snapshots/snapshot-1-webkit.json diff --git a/packages/browser-integration-tests/suites/replay/sessionMaxAge/init.js b/dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionMaxAge/init.js rename to dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/init.js diff --git a/packages/browser-integration-tests/suites/replay/sessionMaxAge/template.html b/dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionMaxAge/template.html rename to dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/template.html diff --git a/packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts b/dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts rename to dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts diff --git a/packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-0-chromium.json b/dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-0-chromium.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-0-chromium.json rename to dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-0-chromium.json diff --git a/packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-0-webkit.json b/dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-0-webkit.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-0-webkit.json rename to dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-0-webkit.json diff --git a/packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-2-chromium.json b/dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-2-chromium.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-2-chromium.json rename to dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-2-chromium.json diff --git a/packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-2-webkit.json b/dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-2-webkit.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-2-webkit.json rename to dev-packages/browser-integration-tests/suites/replay/sessionMaxAge/test.ts-snapshots/snapshot-2-webkit.json diff --git a/packages/browser-integration-tests/suites/replay/slowClick/clickTargets/test.ts b/dev-packages/browser-integration-tests/suites/replay/slowClick/clickTargets/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/clickTargets/test.ts rename to dev-packages/browser-integration-tests/suites/replay/slowClick/clickTargets/test.ts diff --git a/packages/browser-integration-tests/suites/replay/slowClick/disable/init.js b/dev-packages/browser-integration-tests/suites/replay/slowClick/disable/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/disable/init.js rename to dev-packages/browser-integration-tests/suites/replay/slowClick/disable/init.js diff --git a/packages/browser-integration-tests/suites/replay/slowClick/disable/test.ts b/dev-packages/browser-integration-tests/suites/replay/slowClick/disable/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/disable/test.ts rename to dev-packages/browser-integration-tests/suites/replay/slowClick/disable/test.ts diff --git a/packages/browser-integration-tests/suites/replay/slowClick/error/init.js b/dev-packages/browser-integration-tests/suites/replay/slowClick/error/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/error/init.js rename to dev-packages/browser-integration-tests/suites/replay/slowClick/error/init.js diff --git a/packages/browser-integration-tests/suites/replay/slowClick/error/template.html b/dev-packages/browser-integration-tests/suites/replay/slowClick/error/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/error/template.html rename to dev-packages/browser-integration-tests/suites/replay/slowClick/error/template.html diff --git a/packages/browser-integration-tests/suites/replay/slowClick/error/test.ts b/dev-packages/browser-integration-tests/suites/replay/slowClick/error/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/error/test.ts rename to dev-packages/browser-integration-tests/suites/replay/slowClick/error/test.ts diff --git a/packages/browser-integration-tests/suites/replay/slowClick/ignore/test.ts b/dev-packages/browser-integration-tests/suites/replay/slowClick/ignore/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/ignore/test.ts rename to dev-packages/browser-integration-tests/suites/replay/slowClick/ignore/test.ts diff --git a/packages/browser-integration-tests/suites/replay/slowClick/init.js b/dev-packages/browser-integration-tests/suites/replay/slowClick/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/init.js rename to dev-packages/browser-integration-tests/suites/replay/slowClick/init.js diff --git a/packages/browser-integration-tests/suites/replay/slowClick/multiClick/test.ts b/dev-packages/browser-integration-tests/suites/replay/slowClick/multiClick/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/multiClick/test.ts rename to dev-packages/browser-integration-tests/suites/replay/slowClick/multiClick/test.ts diff --git a/packages/browser-integration-tests/suites/replay/slowClick/mutation/test.ts b/dev-packages/browser-integration-tests/suites/replay/slowClick/mutation/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/mutation/test.ts rename to dev-packages/browser-integration-tests/suites/replay/slowClick/mutation/test.ts diff --git a/packages/browser-integration-tests/suites/replay/slowClick/scroll/test.ts b/dev-packages/browser-integration-tests/suites/replay/slowClick/scroll/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/scroll/test.ts rename to dev-packages/browser-integration-tests/suites/replay/slowClick/scroll/test.ts diff --git a/packages/browser-integration-tests/suites/replay/slowClick/template.html b/dev-packages/browser-integration-tests/suites/replay/slowClick/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/template.html rename to dev-packages/browser-integration-tests/suites/replay/slowClick/template.html diff --git a/packages/browser-integration-tests/suites/replay/slowClick/timeout/test.ts b/dev-packages/browser-integration-tests/suites/replay/slowClick/timeout/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/timeout/test.ts rename to dev-packages/browser-integration-tests/suites/replay/slowClick/timeout/test.ts diff --git a/packages/browser-integration-tests/suites/replay/slowClick/windowOpen/test.ts b/dev-packages/browser-integration-tests/suites/replay/slowClick/windowOpen/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/slowClick/windowOpen/test.ts rename to dev-packages/browser-integration-tests/suites/replay/slowClick/windowOpen/test.ts diff --git a/packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/init.js b/dev-packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/init.js rename to dev-packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/init.js diff --git a/packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/subject.js b/dev-packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/subject.js rename to dev-packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/subject.js diff --git a/packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/template.html b/dev-packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/template.html rename to dev-packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/template.html diff --git a/packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/test.ts b/dev-packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/test.ts rename to dev-packages/browser-integration-tests/suites/replay/throttleBreadcrumbs/test.ts diff --git a/packages/browser-integration-tests/suites/replay/unicode/compressed/init.js b/dev-packages/browser-integration-tests/suites/replay/unicode/compressed/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/compressed/init.js rename to dev-packages/browser-integration-tests/suites/replay/unicode/compressed/init.js diff --git a/packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts b/dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts rename to dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts diff --git a/packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-chromium.json b/dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-chromium.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-chromium.json rename to dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-chromium.json diff --git a/packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-firefox.json b/dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-firefox.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-firefox.json rename to dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-firefox.json diff --git a/packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-webkit.json b/dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-webkit.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-webkit.json rename to dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-webkit.json diff --git a/packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed.json b/dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed.json rename to dev-packages/browser-integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed.json diff --git a/packages/browser-integration-tests/suites/replay/unicode/subject.js b/dev-packages/browser-integration-tests/suites/replay/unicode/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/subject.js rename to dev-packages/browser-integration-tests/suites/replay/unicode/subject.js diff --git a/packages/browser-integration-tests/suites/replay/unicode/template.html b/dev-packages/browser-integration-tests/suites/replay/unicode/template.html similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/template.html rename to dev-packages/browser-integration-tests/suites/replay/unicode/template.html diff --git a/packages/browser-integration-tests/suites/replay/unicode/uncompressed/init.js b/dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/init.js similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/uncompressed/init.js rename to dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/init.js diff --git a/packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts b/dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts rename to dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts diff --git a/packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-chromium.json b/dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-chromium.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-chromium.json rename to dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-chromium.json diff --git a/packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-firefox.json b/dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-firefox.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-firefox.json rename to dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-firefox.json diff --git a/packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-webkit.json b/dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-webkit.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-webkit.json rename to dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-webkit.json diff --git a/packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed.json b/dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed.json similarity index 100% rename from packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed.json rename to dev-packages/browser-integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed.json diff --git a/packages/browser-integration-tests/suites/sessions/init.js b/dev-packages/browser-integration-tests/suites/sessions/init.js similarity index 100% rename from packages/browser-integration-tests/suites/sessions/init.js rename to dev-packages/browser-integration-tests/suites/sessions/init.js diff --git a/packages/browser-integration-tests/suites/sessions/start-session/template.html b/dev-packages/browser-integration-tests/suites/sessions/start-session/template.html similarity index 100% rename from packages/browser-integration-tests/suites/sessions/start-session/template.html rename to dev-packages/browser-integration-tests/suites/sessions/start-session/template.html diff --git a/packages/browser-integration-tests/suites/sessions/start-session/test.ts b/dev-packages/browser-integration-tests/suites/sessions/start-session/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/sessions/start-session/test.ts rename to dev-packages/browser-integration-tests/suites/sessions/start-session/test.ts diff --git a/packages/browser-integration-tests/suites/sessions/update-session/subject.js b/dev-packages/browser-integration-tests/suites/sessions/update-session/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/sessions/update-session/subject.js rename to dev-packages/browser-integration-tests/suites/sessions/update-session/subject.js diff --git a/packages/browser-integration-tests/suites/sessions/update-session/template.html b/dev-packages/browser-integration-tests/suites/sessions/update-session/template.html similarity index 100% rename from packages/browser-integration-tests/suites/sessions/update-session/template.html rename to dev-packages/browser-integration-tests/suites/sessions/update-session/template.html diff --git a/packages/browser-integration-tests/suites/sessions/update-session/test.ts b/dev-packages/browser-integration-tests/suites/sessions/update-session/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/sessions/update-session/test.ts rename to dev-packages/browser-integration-tests/suites/sessions/update-session/test.ts diff --git a/packages/browser-integration-tests/suites/stacktraces/init.js b/dev-packages/browser-integration-tests/suites/stacktraces/init.js similarity index 100% rename from packages/browser-integration-tests/suites/stacktraces/init.js rename to dev-packages/browser-integration-tests/suites/stacktraces/init.js diff --git a/packages/browser-integration-tests/suites/stacktraces/protocol_containing_fn_identifiers/subject.js b/dev-packages/browser-integration-tests/suites/stacktraces/protocol_containing_fn_identifiers/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/stacktraces/protocol_containing_fn_identifiers/subject.js rename to dev-packages/browser-integration-tests/suites/stacktraces/protocol_containing_fn_identifiers/subject.js diff --git a/packages/browser-integration-tests/suites/stacktraces/protocol_containing_fn_identifiers/test.ts b/dev-packages/browser-integration-tests/suites/stacktraces/protocol_containing_fn_identifiers/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/stacktraces/protocol_containing_fn_identifiers/test.ts rename to dev-packages/browser-integration-tests/suites/stacktraces/protocol_containing_fn_identifiers/test.ts diff --git a/packages/browser-integration-tests/suites/stacktraces/protocol_fn_identifiers/subject.js b/dev-packages/browser-integration-tests/suites/stacktraces/protocol_fn_identifiers/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/stacktraces/protocol_fn_identifiers/subject.js rename to dev-packages/browser-integration-tests/suites/stacktraces/protocol_fn_identifiers/subject.js diff --git a/packages/browser-integration-tests/suites/stacktraces/protocol_fn_identifiers/test.ts b/dev-packages/browser-integration-tests/suites/stacktraces/protocol_fn_identifiers/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/stacktraces/protocol_fn_identifiers/test.ts rename to dev-packages/browser-integration-tests/suites/stacktraces/protocol_fn_identifiers/test.ts diff --git a/packages/browser-integration-tests/suites/stacktraces/regular_fn_identifiers/subject.js b/dev-packages/browser-integration-tests/suites/stacktraces/regular_fn_identifiers/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/stacktraces/regular_fn_identifiers/subject.js rename to dev-packages/browser-integration-tests/suites/stacktraces/regular_fn_identifiers/subject.js diff --git a/packages/browser-integration-tests/suites/stacktraces/regular_fn_identifiers/test.ts b/dev-packages/browser-integration-tests/suites/stacktraces/regular_fn_identifiers/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/stacktraces/regular_fn_identifiers/test.ts rename to dev-packages/browser-integration-tests/suites/stacktraces/regular_fn_identifiers/test.ts diff --git a/packages/browser-integration-tests/suites/stacktraces/template.html b/dev-packages/browser-integration-tests/suites/stacktraces/template.html similarity index 100% rename from packages/browser-integration-tests/suites/stacktraces/template.html rename to dev-packages/browser-integration-tests/suites/stacktraces/template.html diff --git a/packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/init.js b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/template.html b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/template.html rename to dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/template.html diff --git a/packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegrationShim/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browserTracingShim/init.js b/dev-packages/browser-integration-tests/suites/tracing/browserTracingShim/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browserTracingShim/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browserTracingShim/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browserTracingShim/template.html b/dev-packages/browser-integration-tests/suites/tracing/browserTracingShim/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browserTracingShim/template.html rename to dev-packages/browser-integration-tests/suites/tracing/browserTracingShim/template.html diff --git a/packages/browser-integration-tests/suites/tracing/browserTracingShim/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingShim/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browserTracingShim/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browserTracingShim/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/subject.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/subject.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/subject.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/template.html b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/template.html rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/template.html diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-custom/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/subject.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/subject.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/subject.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/template.html b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/template.html rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/template.html diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/backgroundtab-pageload/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/subject.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/subject.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/subject.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/http-timings/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/interactions/assets/script.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/interactions/assets/script.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/interactions/assets/script.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/interactions/assets/script.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/interactions/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/interactions/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/interactions/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/interactions/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/interactions/template.html b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/interactions/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/interactions/template.html rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/interactions/template.html diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/interactions/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/interactions/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/interactions/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/interactions/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/assets/script.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/assets/script.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/assets/script.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/assets/script.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/template.html b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/template.html rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/template.html diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-disabled/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/assets/script.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/assets/script.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/assets/script.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/assets/script.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/template.html b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/template.html rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/template.html diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/long-tasks-enabled/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/meta/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/meta/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/meta/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/meta/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/meta/template.html b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/meta/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/meta/template.html rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/meta/template.html diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/meta/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/meta/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/meta/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/meta/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/navigation/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/navigation/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/navigation/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/navigation/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/pageload/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/pageload/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/pageload/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/pageload/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/pageload/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/pageload/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/pageload/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/pageload/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/pageloadDelayed/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/pageloadDelayed/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/pageloadDelayed/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/pageloadDelayed/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/pageloadDelayed/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/pageloadDelayed/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/pageloadDelayed/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/pageloadDelayed/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/subject.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/subject.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/subject.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargets/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/subject.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/subject.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/subject.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTargetsAndOrigins/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/subject.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/subject.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/subject.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/customTracingOrigins/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/subject.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/subject.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/subject.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsMatch/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/init.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/init.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/init.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/subject.js b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/subject.js rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/subject.js diff --git a/packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/browsertracing/tracePropagationTargets/defaultTargetsNoMatch/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/envelope-header-transaction-name/init.js b/dev-packages/browser-integration-tests/suites/tracing/envelope-header-transaction-name/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/envelope-header-transaction-name/init.js rename to dev-packages/browser-integration-tests/suites/tracing/envelope-header-transaction-name/init.js diff --git a/packages/browser-integration-tests/suites/tracing/envelope-header-transaction-name/test.ts b/dev-packages/browser-integration-tests/suites/tracing/envelope-header-transaction-name/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/envelope-header-transaction-name/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/envelope-header-transaction-name/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/envelope-header/init.js b/dev-packages/browser-integration-tests/suites/tracing/envelope-header/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/envelope-header/init.js rename to dev-packages/browser-integration-tests/suites/tracing/envelope-header/init.js diff --git a/packages/browser-integration-tests/suites/tracing/envelope-header/test.ts b/dev-packages/browser-integration-tests/suites/tracing/envelope-header/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/envelope-header/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/envelope-header/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/metrics/connection-rtt/template.html b/dev-packages/browser-integration-tests/suites/tracing/metrics/connection-rtt/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/connection-rtt/template.html rename to dev-packages/browser-integration-tests/suites/tracing/metrics/connection-rtt/template.html diff --git a/packages/browser-integration-tests/suites/tracing/metrics/connection-rtt/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/connection-rtt/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/connection-rtt/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/metrics/connection-rtt/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/metrics/init.js b/dev-packages/browser-integration-tests/suites/tracing/metrics/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/init.js rename to dev-packages/browser-integration-tests/suites/tracing/metrics/init.js diff --git a/packages/browser-integration-tests/suites/tracing/metrics/pageload-browser-spans/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-browser-spans/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/pageload-browser-spans/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-browser-spans/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/image.svg b/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/image.svg similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/image.svg rename to dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/image.svg diff --git a/packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/script.js b/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/script.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/script.js rename to dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/script.js diff --git a/packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/style.css b/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/style.css similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/style.css rename to dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/assets/style.css diff --git a/packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/template.html b/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/template.html rename to dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/template.html diff --git a/packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/subject.js b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/subject.js rename to dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/subject.js diff --git a/packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/template.html b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/template.html rename to dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/template.html diff --git a/packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-cls/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/template.html b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/template.html rename to dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/template.html diff --git a/packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fid/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/template.html b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/template.html rename to dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/template.html diff --git a/packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-fp-fcp/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/assets/sentry-logo-600x179.png b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/assets/sentry-logo-600x179.png similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/assets/sentry-logo-600x179.png rename to dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/assets/sentry-logo-600x179.png diff --git a/packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/template.html b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/template.html rename to dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/template.html diff --git a/packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-lcp/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/metrics/web-vitals-ttfb/template.html b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-ttfb/template.html similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/web-vitals-ttfb/template.html rename to dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-ttfb/template.html diff --git a/packages/browser-integration-tests/suites/tracing/metrics/web-vitals-ttfb/test.ts b/dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-ttfb/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/metrics/web-vitals-ttfb/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-ttfb/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/request/fetch/subject.js b/dev-packages/browser-integration-tests/suites/tracing/request/fetch/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/request/fetch/subject.js rename to dev-packages/browser-integration-tests/suites/tracing/request/fetch/subject.js diff --git a/packages/browser-integration-tests/suites/tracing/request/fetch/test.ts b/dev-packages/browser-integration-tests/suites/tracing/request/fetch/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/request/fetch/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/request/fetch/test.ts diff --git a/packages/browser-integration-tests/suites/tracing/request/init.js b/dev-packages/browser-integration-tests/suites/tracing/request/init.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/request/init.js rename to dev-packages/browser-integration-tests/suites/tracing/request/init.js diff --git a/packages/browser-integration-tests/suites/tracing/request/xhr/subject.js b/dev-packages/browser-integration-tests/suites/tracing/request/xhr/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/tracing/request/xhr/subject.js rename to dev-packages/browser-integration-tests/suites/tracing/request/xhr/subject.js diff --git a/packages/browser-integration-tests/suites/tracing/request/xhr/test.ts b/dev-packages/browser-integration-tests/suites/tracing/request/xhr/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/tracing/request/xhr/test.ts rename to dev-packages/browser-integration-tests/suites/tracing/request/xhr/test.ts diff --git a/packages/browser-integration-tests/suites/transport/offline/init.js b/dev-packages/browser-integration-tests/suites/transport/offline/init.js similarity index 100% rename from packages/browser-integration-tests/suites/transport/offline/init.js rename to dev-packages/browser-integration-tests/suites/transport/offline/init.js diff --git a/packages/browser-integration-tests/suites/transport/offline/queued/subject.js b/dev-packages/browser-integration-tests/suites/transport/offline/queued/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/transport/offline/queued/subject.js rename to dev-packages/browser-integration-tests/suites/transport/offline/queued/subject.js diff --git a/packages/browser-integration-tests/suites/transport/offline/queued/test.ts b/dev-packages/browser-integration-tests/suites/transport/offline/queued/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/transport/offline/queued/test.ts rename to dev-packages/browser-integration-tests/suites/transport/offline/queued/test.ts diff --git a/packages/browser-integration-tests/suites/wasm/init.js b/dev-packages/browser-integration-tests/suites/wasm/init.js similarity index 100% rename from packages/browser-integration-tests/suites/wasm/init.js rename to dev-packages/browser-integration-tests/suites/wasm/init.js diff --git a/packages/browser-integration-tests/suites/wasm/simple.wasm b/dev-packages/browser-integration-tests/suites/wasm/simple.wasm similarity index 100% rename from packages/browser-integration-tests/suites/wasm/simple.wasm rename to dev-packages/browser-integration-tests/suites/wasm/simple.wasm diff --git a/packages/browser-integration-tests/suites/wasm/subject.js b/dev-packages/browser-integration-tests/suites/wasm/subject.js similarity index 100% rename from packages/browser-integration-tests/suites/wasm/subject.js rename to dev-packages/browser-integration-tests/suites/wasm/subject.js diff --git a/packages/browser-integration-tests/suites/wasm/test.ts b/dev-packages/browser-integration-tests/suites/wasm/test.ts similarity index 100% rename from packages/browser-integration-tests/suites/wasm/test.ts rename to dev-packages/browser-integration-tests/suites/wasm/test.ts diff --git a/packages/browser-integration-tests/tsconfig.json b/dev-packages/browser-integration-tests/tsconfig.json similarity index 100% rename from packages/browser-integration-tests/tsconfig.json rename to dev-packages/browser-integration-tests/tsconfig.json diff --git a/packages/browser-integration-tests/utils/defaults/template.html b/dev-packages/browser-integration-tests/utils/defaults/template.html similarity index 100% rename from packages/browser-integration-tests/utils/defaults/template.html rename to dev-packages/browser-integration-tests/utils/defaults/template.html diff --git a/packages/browser-integration-tests/utils/fixtures.ts b/dev-packages/browser-integration-tests/utils/fixtures.ts similarity index 100% rename from packages/browser-integration-tests/utils/fixtures.ts rename to dev-packages/browser-integration-tests/utils/fixtures.ts diff --git a/packages/browser-integration-tests/utils/generatePage.ts b/dev-packages/browser-integration-tests/utils/generatePage.ts similarity index 100% rename from packages/browser-integration-tests/utils/generatePage.ts rename to dev-packages/browser-integration-tests/utils/generatePage.ts diff --git a/packages/browser-integration-tests/utils/generatePlugin.ts b/dev-packages/browser-integration-tests/utils/generatePlugin.ts similarity index 95% rename from packages/browser-integration-tests/utils/generatePlugin.ts rename to dev-packages/browser-integration-tests/utils/generatePlugin.ts index af4da2e8b2b8..1258c684492d 100644 --- a/packages/browser-integration-tests/utils/generatePlugin.ts +++ b/dev-packages/browser-integration-tests/utils/generatePlugin.ts @@ -7,8 +7,8 @@ import type { Compiler } from 'webpack'; import { addStaticAsset, addStaticAssetSymlink } from './staticAssets'; const LOADER_TEMPLATE = fs.readFileSync(path.join(__dirname, '../fixtures/loader.js'), 'utf-8'); -const PACKAGES_DIR = '../../packages'; -const PACKAGE_JSON = '../../package.json'; +const PACKAGES_DIR = path.join(__dirname, '..', '..', '..', 'packages'); +const ROOT_PACKAGE_JSON_PATH = path.join(__dirname, '..', '..', '..', 'package.json'); /** * Possible values: See BUNDLE_PATHS.browser @@ -101,8 +101,10 @@ export const LOADER_CONFIGS: Record; * so that the compiled versions aren't included */ function generateSentryAlias(): Record { - const rootPackageJson = JSON.parse(fs.readFileSync(PACKAGE_JSON, 'utf8')) as { workspaces: string[] }; - const packageNames = rootPackageJson.workspaces.map(workspace => workspace.replace('packages/', '')); + const rootPackageJson = JSON.parse(fs.readFileSync(ROOT_PACKAGE_JSON_PATH, 'utf8')) as { workspaces: string[] }; + const packageNames = rootPackageJson.workspaces + .filter(workspace => !workspace.startsWith('dev-packages/')) + .map(workspace => workspace.replace('packages/', '')); return Object.fromEntries( packageNames.map(packageName => { diff --git a/packages/browser-integration-tests/utils/helpers.ts b/dev-packages/browser-integration-tests/utils/helpers.ts similarity index 100% rename from packages/browser-integration-tests/utils/helpers.ts rename to dev-packages/browser-integration-tests/utils/helpers.ts diff --git a/packages/browser-integration-tests/utils/replayEventTemplates.ts b/dev-packages/browser-integration-tests/utils/replayEventTemplates.ts similarity index 100% rename from packages/browser-integration-tests/utils/replayEventTemplates.ts rename to dev-packages/browser-integration-tests/utils/replayEventTemplates.ts diff --git a/packages/browser-integration-tests/utils/replayHelpers.ts b/dev-packages/browser-integration-tests/utils/replayHelpers.ts similarity index 100% rename from packages/browser-integration-tests/utils/replayHelpers.ts rename to dev-packages/browser-integration-tests/utils/replayHelpers.ts diff --git a/packages/browser-integration-tests/utils/staticAssets.ts b/dev-packages/browser-integration-tests/utils/staticAssets.ts similarity index 100% rename from packages/browser-integration-tests/utils/staticAssets.ts rename to dev-packages/browser-integration-tests/utils/staticAssets.ts diff --git a/packages/browser-integration-tests/utils/wasmHelpers.ts b/dev-packages/browser-integration-tests/utils/wasmHelpers.ts similarity index 100% rename from packages/browser-integration-tests/utils/wasmHelpers.ts rename to dev-packages/browser-integration-tests/utils/wasmHelpers.ts diff --git a/packages/browser-integration-tests/utils/web-vitals/cls.ts b/dev-packages/browser-integration-tests/utils/web-vitals/cls.ts similarity index 100% rename from packages/browser-integration-tests/utils/web-vitals/cls.ts rename to dev-packages/browser-integration-tests/utils/web-vitals/cls.ts diff --git a/packages/browser-integration-tests/webpack.config.ts b/dev-packages/browser-integration-tests/webpack.config.ts similarity index 100% rename from packages/browser-integration-tests/webpack.config.ts rename to dev-packages/browser-integration-tests/webpack.config.ts diff --git a/packages/e2e-tests/.env.example b/dev-packages/e2e-tests/.env.example similarity index 100% rename from packages/e2e-tests/.env.example rename to dev-packages/e2e-tests/.env.example diff --git a/packages/e2e-tests/.eslintrc.js b/dev-packages/e2e-tests/.eslintrc.js similarity index 100% rename from packages/e2e-tests/.eslintrc.js rename to dev-packages/e2e-tests/.eslintrc.js diff --git a/packages/e2e-tests/.gitignore b/dev-packages/e2e-tests/.gitignore similarity index 100% rename from packages/e2e-tests/.gitignore rename to dev-packages/e2e-tests/.gitignore diff --git a/packages/e2e-tests/Dockerfile.publish-packages b/dev-packages/e2e-tests/Dockerfile.publish-packages similarity index 82% rename from packages/e2e-tests/Dockerfile.publish-packages rename to dev-packages/e2e-tests/Dockerfile.publish-packages index 117535a0e326..907f6655ca3d 100644 --- a/packages/e2e-tests/Dockerfile.publish-packages +++ b/dev-packages/e2e-tests/Dockerfile.publish-packages @@ -2,5 +2,5 @@ ARG NODE_VERSION=18.17.1 FROM node:${NODE_VERSION} -WORKDIR /sentry-javascript/packages/e2e-tests +WORKDIR /sentry-javascript/dev-packages/e2e-tests CMD [ "yarn", "ts-node", "publish-packages.ts" ] diff --git a/packages/e2e-tests/LICENSE b/dev-packages/e2e-tests/LICENSE similarity index 100% rename from packages/e2e-tests/LICENSE rename to dev-packages/e2e-tests/LICENSE diff --git a/packages/e2e-tests/README.md b/dev-packages/e2e-tests/README.md similarity index 100% rename from packages/e2e-tests/README.md rename to dev-packages/e2e-tests/README.md diff --git a/packages/e2e-tests/lib/constants.ts b/dev-packages/e2e-tests/lib/constants.ts similarity index 100% rename from packages/e2e-tests/lib/constants.ts rename to dev-packages/e2e-tests/lib/constants.ts diff --git a/packages/e2e-tests/lib/validate.ts b/dev-packages/e2e-tests/lib/validate.ts similarity index 100% rename from packages/e2e-tests/lib/validate.ts rename to dev-packages/e2e-tests/lib/validate.ts diff --git a/packages/e2e-tests/package.json b/dev-packages/e2e-tests/package.json similarity index 100% rename from packages/e2e-tests/package.json rename to dev-packages/e2e-tests/package.json diff --git a/packages/e2e-tests/prepare.ts b/dev-packages/e2e-tests/prepare.ts similarity index 100% rename from packages/e2e-tests/prepare.ts rename to dev-packages/e2e-tests/prepare.ts diff --git a/packages/e2e-tests/publish-packages.ts b/dev-packages/e2e-tests/publish-packages.ts similarity index 100% rename from packages/e2e-tests/publish-packages.ts rename to dev-packages/e2e-tests/publish-packages.ts diff --git a/packages/e2e-tests/registrySetup.ts b/dev-packages/e2e-tests/registrySetup.ts similarity index 100% rename from packages/e2e-tests/registrySetup.ts rename to dev-packages/e2e-tests/registrySetup.ts diff --git a/packages/e2e-tests/run.ts b/dev-packages/e2e-tests/run.ts similarity index 100% rename from packages/e2e-tests/run.ts rename to dev-packages/e2e-tests/run.ts diff --git a/packages/e2e-tests/test-applications/create-next-app/.gitignore b/dev-packages/e2e-tests/test-applications/create-next-app/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/.gitignore rename to dev-packages/e2e-tests/test-applications/create-next-app/.gitignore diff --git a/packages/e2e-tests/test-applications/create-next-app/.npmrc b/dev-packages/e2e-tests/test-applications/create-next-app/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/.npmrc rename to dev-packages/e2e-tests/test-applications/create-next-app/.npmrc diff --git a/packages/e2e-tests/test-applications/create-next-app/globals.d.ts b/dev-packages/e2e-tests/test-applications/create-next-app/globals.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/globals.d.ts rename to dev-packages/e2e-tests/test-applications/create-next-app/globals.d.ts diff --git a/packages/e2e-tests/test-applications/create-next-app/next-env.d.ts b/dev-packages/e2e-tests/test-applications/create-next-app/next-env.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/next-env.d.ts rename to dev-packages/e2e-tests/test-applications/create-next-app/next-env.d.ts diff --git a/packages/e2e-tests/test-applications/create-next-app/next.config.js b/dev-packages/e2e-tests/test-applications/create-next-app/next.config.js similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/next.config.js rename to dev-packages/e2e-tests/test-applications/create-next-app/next.config.js diff --git a/packages/e2e-tests/test-applications/create-next-app/package.json b/dev-packages/e2e-tests/test-applications/create-next-app/package.json similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/package.json rename to dev-packages/e2e-tests/test-applications/create-next-app/package.json diff --git a/packages/e2e-tests/test-applications/create-next-app/pages/_app.tsx b/dev-packages/e2e-tests/test-applications/create-next-app/pages/_app.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/pages/_app.tsx rename to dev-packages/e2e-tests/test-applications/create-next-app/pages/_app.tsx diff --git a/packages/e2e-tests/test-applications/create-next-app/pages/_document.tsx b/dev-packages/e2e-tests/test-applications/create-next-app/pages/_document.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/pages/_document.tsx rename to dev-packages/e2e-tests/test-applications/create-next-app/pages/_document.tsx diff --git a/packages/e2e-tests/test-applications/create-next-app/pages/_error.tsx b/dev-packages/e2e-tests/test-applications/create-next-app/pages/_error.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/pages/_error.tsx rename to dev-packages/e2e-tests/test-applications/create-next-app/pages/_error.tsx diff --git a/packages/e2e-tests/test-applications/create-next-app/pages/api/error.ts b/dev-packages/e2e-tests/test-applications/create-next-app/pages/api/error.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/pages/api/error.ts rename to dev-packages/e2e-tests/test-applications/create-next-app/pages/api/error.ts diff --git a/packages/e2e-tests/test-applications/create-next-app/pages/api/success.ts b/dev-packages/e2e-tests/test-applications/create-next-app/pages/api/success.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/pages/api/success.ts rename to dev-packages/e2e-tests/test-applications/create-next-app/pages/api/success.ts diff --git a/packages/e2e-tests/test-applications/create-next-app/pages/index.tsx b/dev-packages/e2e-tests/test-applications/create-next-app/pages/index.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/pages/index.tsx rename to dev-packages/e2e-tests/test-applications/create-next-app/pages/index.tsx diff --git a/packages/e2e-tests/test-applications/create-next-app/pages/user/[id].tsx b/dev-packages/e2e-tests/test-applications/create-next-app/pages/user/[id].tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/pages/user/[id].tsx rename to dev-packages/e2e-tests/test-applications/create-next-app/pages/user/[id].tsx diff --git a/packages/e2e-tests/test-applications/create-next-app/playwright.config.ts b/dev-packages/e2e-tests/test-applications/create-next-app/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/create-next-app/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/create-next-app/sentry.client.config.ts b/dev-packages/e2e-tests/test-applications/create-next-app/sentry.client.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/sentry.client.config.ts rename to dev-packages/e2e-tests/test-applications/create-next-app/sentry.client.config.ts diff --git a/packages/e2e-tests/test-applications/create-next-app/sentry.server.config.ts b/dev-packages/e2e-tests/test-applications/create-next-app/sentry.server.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/sentry.server.config.ts rename to dev-packages/e2e-tests/test-applications/create-next-app/sentry.server.config.ts diff --git a/packages/e2e-tests/test-applications/create-next-app/tests/behaviour-client.test.ts b/dev-packages/e2e-tests/test-applications/create-next-app/tests/behaviour-client.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/tests/behaviour-client.test.ts rename to dev-packages/e2e-tests/test-applications/create-next-app/tests/behaviour-client.test.ts diff --git a/packages/e2e-tests/test-applications/create-next-app/tests/behaviour-server.test.ts b/dev-packages/e2e-tests/test-applications/create-next-app/tests/behaviour-server.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/tests/behaviour-server.test.ts rename to dev-packages/e2e-tests/test-applications/create-next-app/tests/behaviour-server.test.ts diff --git a/packages/e2e-tests/test-applications/create-next-app/tsconfig.json b/dev-packages/e2e-tests/test-applications/create-next-app/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/create-next-app/tsconfig.json rename to dev-packages/e2e-tests/test-applications/create-next-app/tsconfig.json diff --git a/packages/e2e-tests/test-applications/create-react-app/.gitignore b/dev-packages/e2e-tests/test-applications/create-react-app/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/.gitignore rename to dev-packages/e2e-tests/test-applications/create-react-app/.gitignore diff --git a/packages/e2e-tests/test-applications/create-react-app/.npmrc b/dev-packages/e2e-tests/test-applications/create-react-app/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/.npmrc rename to dev-packages/e2e-tests/test-applications/create-react-app/.npmrc diff --git a/packages/e2e-tests/test-applications/create-react-app/package.json b/dev-packages/e2e-tests/test-applications/create-react-app/package.json similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/package.json rename to dev-packages/e2e-tests/test-applications/create-react-app/package.json diff --git a/packages/e2e-tests/test-applications/create-react-app/public/favicon.ico b/dev-packages/e2e-tests/test-applications/create-react-app/public/favicon.ico similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/public/favicon.ico rename to dev-packages/e2e-tests/test-applications/create-react-app/public/favicon.ico diff --git a/packages/e2e-tests/test-applications/create-react-app/public/index.html b/dev-packages/e2e-tests/test-applications/create-react-app/public/index.html similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/public/index.html rename to dev-packages/e2e-tests/test-applications/create-react-app/public/index.html diff --git a/packages/e2e-tests/test-applications/create-react-app/public/logo192.png b/dev-packages/e2e-tests/test-applications/create-react-app/public/logo192.png similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/public/logo192.png rename to dev-packages/e2e-tests/test-applications/create-react-app/public/logo192.png diff --git a/packages/e2e-tests/test-applications/create-react-app/public/logo512.png b/dev-packages/e2e-tests/test-applications/create-react-app/public/logo512.png similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/public/logo512.png rename to dev-packages/e2e-tests/test-applications/create-react-app/public/logo512.png diff --git a/packages/e2e-tests/test-applications/create-react-app/public/manifest.json b/dev-packages/e2e-tests/test-applications/create-react-app/public/manifest.json similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/public/manifest.json rename to dev-packages/e2e-tests/test-applications/create-react-app/public/manifest.json diff --git a/packages/e2e-tests/test-applications/create-react-app/public/robots.txt b/dev-packages/e2e-tests/test-applications/create-react-app/public/robots.txt similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/public/robots.txt rename to dev-packages/e2e-tests/test-applications/create-react-app/public/robots.txt diff --git a/packages/e2e-tests/test-applications/create-react-app/src/App.css b/dev-packages/e2e-tests/test-applications/create-react-app/src/App.css similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/src/App.css rename to dev-packages/e2e-tests/test-applications/create-react-app/src/App.css diff --git a/packages/e2e-tests/test-applications/create-react-app/src/App.tsx b/dev-packages/e2e-tests/test-applications/create-react-app/src/App.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/src/App.tsx rename to dev-packages/e2e-tests/test-applications/create-react-app/src/App.tsx diff --git a/packages/e2e-tests/test-applications/create-react-app/src/index.css b/dev-packages/e2e-tests/test-applications/create-react-app/src/index.css similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/src/index.css rename to dev-packages/e2e-tests/test-applications/create-react-app/src/index.css diff --git a/packages/e2e-tests/test-applications/create-react-app/src/index.tsx b/dev-packages/e2e-tests/test-applications/create-react-app/src/index.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/src/index.tsx rename to dev-packages/e2e-tests/test-applications/create-react-app/src/index.tsx diff --git a/packages/e2e-tests/test-applications/create-react-app/src/logo.svg b/dev-packages/e2e-tests/test-applications/create-react-app/src/logo.svg similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/src/logo.svg rename to dev-packages/e2e-tests/test-applications/create-react-app/src/logo.svg diff --git a/packages/e2e-tests/test-applications/create-react-app/src/react-app-env.d.ts b/dev-packages/e2e-tests/test-applications/create-react-app/src/react-app-env.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/src/react-app-env.d.ts rename to dev-packages/e2e-tests/test-applications/create-react-app/src/react-app-env.d.ts diff --git a/packages/e2e-tests/test-applications/create-react-app/src/reportWebVitals.ts b/dev-packages/e2e-tests/test-applications/create-react-app/src/reportWebVitals.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/src/reportWebVitals.ts rename to dev-packages/e2e-tests/test-applications/create-react-app/src/reportWebVitals.ts diff --git a/packages/e2e-tests/test-applications/create-react-app/src/setupTests.ts b/dev-packages/e2e-tests/test-applications/create-react-app/src/setupTests.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/src/setupTests.ts rename to dev-packages/e2e-tests/test-applications/create-react-app/src/setupTests.ts diff --git a/packages/e2e-tests/test-applications/create-react-app/tsconfig.json b/dev-packages/e2e-tests/test-applications/create-react-app/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/create-react-app/tsconfig.json rename to dev-packages/e2e-tests/test-applications/create-react-app/tsconfig.json diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/.eslintrc.js b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/.eslintrc.js similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/.eslintrc.js rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/.eslintrc.js diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/.gitignore b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/.gitignore rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/.gitignore diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/.npmrc b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/.npmrc rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/.npmrc diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/README.md b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/README.md similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/README.md rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/README.md diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/app/entry.client.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/entry.client.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/app/entry.client.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/entry.client.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/app/entry.server.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/entry.server.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/app/entry.server.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/entry.server.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/app/root.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/root.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/app/root.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/root.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/_index.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/_index.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/_index.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/_index.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/client-error.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/client-error.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/client-error.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/client-error.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/navigate.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/navigate.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/navigate.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/navigate.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/user.$id.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/user.$id.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/user.$id.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/routes/user.$id.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/globals.d.ts b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/globals.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/globals.d.ts rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/globals.d.ts diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/package.json b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/package.json similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/package.json rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/package.json diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/playwright.config.ts b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/remix.config.js b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/remix.config.js similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/remix.config.js rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/remix.config.js diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/remix.env.d.ts b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/remix.env.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/remix.env.d.ts rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/remix.env.d.ts diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/tests/behaviour-client.test.ts b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/tests/behaviour-client.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/tests/behaviour-client.test.ts rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/tests/behaviour-client.test.ts diff --git a/packages/e2e-tests/test-applications/create-remix-app-v2/tsconfig.json b/dev-packages/e2e-tests/test-applications/create-remix-app-v2/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app-v2/tsconfig.json rename to dev-packages/e2e-tests/test-applications/create-remix-app-v2/tsconfig.json diff --git a/packages/e2e-tests/test-applications/create-remix-app/.eslintrc.js b/dev-packages/e2e-tests/test-applications/create-remix-app/.eslintrc.js similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/.eslintrc.js rename to dev-packages/e2e-tests/test-applications/create-remix-app/.eslintrc.js diff --git a/packages/e2e-tests/test-applications/create-remix-app/.gitignore b/dev-packages/e2e-tests/test-applications/create-remix-app/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/.gitignore rename to dev-packages/e2e-tests/test-applications/create-remix-app/.gitignore diff --git a/packages/e2e-tests/test-applications/create-remix-app/.npmrc b/dev-packages/e2e-tests/test-applications/create-remix-app/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/.npmrc rename to dev-packages/e2e-tests/test-applications/create-remix-app/.npmrc diff --git a/packages/e2e-tests/test-applications/create-remix-app/app/entry.client.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app/app/entry.client.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/app/entry.client.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app/app/entry.client.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app/app/entry.server.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app/app/entry.server.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/app/entry.server.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app/app/entry.server.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app/app/root.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app/app/root.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/app/root.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app/app/root.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app/app/routes/_index.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app/app/routes/_index.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/app/routes/_index.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app/app/routes/_index.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app/app/routes/client-error.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app/app/routes/client-error.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/app/routes/client-error.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app/app/routes/client-error.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app/app/routes/navigate.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app/app/routes/navigate.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/app/routes/navigate.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app/app/routes/navigate.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app/app/routes/user.$id.tsx b/dev-packages/e2e-tests/test-applications/create-remix-app/app/routes/user.$id.tsx similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/app/routes/user.$id.tsx rename to dev-packages/e2e-tests/test-applications/create-remix-app/app/routes/user.$id.tsx diff --git a/packages/e2e-tests/test-applications/create-remix-app/globals.d.ts b/dev-packages/e2e-tests/test-applications/create-remix-app/globals.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/globals.d.ts rename to dev-packages/e2e-tests/test-applications/create-remix-app/globals.d.ts diff --git a/packages/e2e-tests/test-applications/create-remix-app/package.json b/dev-packages/e2e-tests/test-applications/create-remix-app/package.json similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/package.json rename to dev-packages/e2e-tests/test-applications/create-remix-app/package.json diff --git a/packages/e2e-tests/test-applications/create-remix-app/playwright.config.ts b/dev-packages/e2e-tests/test-applications/create-remix-app/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/create-remix-app/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/create-remix-app/remix.config.js b/dev-packages/e2e-tests/test-applications/create-remix-app/remix.config.js similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/remix.config.js rename to dev-packages/e2e-tests/test-applications/create-remix-app/remix.config.js diff --git a/packages/e2e-tests/test-applications/create-remix-app/tests/behaviour-client.test.ts b/dev-packages/e2e-tests/test-applications/create-remix-app/tests/behaviour-client.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/tests/behaviour-client.test.ts rename to dev-packages/e2e-tests/test-applications/create-remix-app/tests/behaviour-client.test.ts diff --git a/packages/e2e-tests/test-applications/create-remix-app/tsconfig.json b/dev-packages/e2e-tests/test-applications/create-remix-app/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/tsconfig.json rename to dev-packages/e2e-tests/test-applications/create-remix-app/tsconfig.json diff --git a/packages/e2e-tests/test-applications/create-remix-app/upload-sourcemaps.sh b/dev-packages/e2e-tests/test-applications/create-remix-app/upload-sourcemaps.sh similarity index 100% rename from packages/e2e-tests/test-applications/create-remix-app/upload-sourcemaps.sh rename to dev-packages/e2e-tests/test-applications/create-remix-app/upload-sourcemaps.sh diff --git a/packages/e2e-tests/test-applications/debug-id-sourcemaps/.gitignore b/dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/debug-id-sourcemaps/.gitignore rename to dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/.gitignore diff --git a/packages/e2e-tests/test-applications/debug-id-sourcemaps/.npmrc b/dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/debug-id-sourcemaps/.npmrc rename to dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/.npmrc diff --git a/packages/e2e-tests/test-applications/debug-id-sourcemaps/package.json b/dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/package.json similarity index 100% rename from packages/e2e-tests/test-applications/debug-id-sourcemaps/package.json rename to dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/package.json diff --git a/packages/e2e-tests/test-applications/debug-id-sourcemaps/rollup.config.mjs b/dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/rollup.config.mjs similarity index 100% rename from packages/e2e-tests/test-applications/debug-id-sourcemaps/rollup.config.mjs rename to dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/rollup.config.mjs diff --git a/packages/e2e-tests/test-applications/debug-id-sourcemaps/src/app.js b/dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/src/app.js similarity index 100% rename from packages/e2e-tests/test-applications/debug-id-sourcemaps/src/app.js rename to dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/src/app.js diff --git a/packages/e2e-tests/test-applications/debug-id-sourcemaps/tests/__snapshots__/server.test.ts.snap b/dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/tests/__snapshots__/server.test.ts.snap similarity index 100% rename from packages/e2e-tests/test-applications/debug-id-sourcemaps/tests/__snapshots__/server.test.ts.snap rename to dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/tests/__snapshots__/server.test.ts.snap diff --git a/packages/e2e-tests/test-applications/debug-id-sourcemaps/tests/server.test.ts b/dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/tests/server.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/debug-id-sourcemaps/tests/server.test.ts rename to dev-packages/e2e-tests/test-applications/debug-id-sourcemaps/tests/server.test.ts diff --git a/packages/e2e-tests/test-applications/generic-ts3.8/.npmrc b/dev-packages/e2e-tests/test-applications/generic-ts3.8/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/generic-ts3.8/.npmrc rename to dev-packages/e2e-tests/test-applications/generic-ts3.8/.npmrc diff --git a/packages/e2e-tests/test-applications/generic-ts3.8/index.ts b/dev-packages/e2e-tests/test-applications/generic-ts3.8/index.ts similarity index 100% rename from packages/e2e-tests/test-applications/generic-ts3.8/index.ts rename to dev-packages/e2e-tests/test-applications/generic-ts3.8/index.ts diff --git a/packages/e2e-tests/test-applications/generic-ts3.8/package.json b/dev-packages/e2e-tests/test-applications/generic-ts3.8/package.json similarity index 100% rename from packages/e2e-tests/test-applications/generic-ts3.8/package.json rename to dev-packages/e2e-tests/test-applications/generic-ts3.8/package.json diff --git a/packages/e2e-tests/test-applications/generic-ts3.8/tsconfig.json b/dev-packages/e2e-tests/test-applications/generic-ts3.8/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/generic-ts3.8/tsconfig.json rename to dev-packages/e2e-tests/test-applications/generic-ts3.8/tsconfig.json diff --git a/packages/e2e-tests/test-applications/nextjs-14/.gitignore b/dev-packages/e2e-tests/test-applications/nextjs-14/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/.gitignore rename to dev-packages/e2e-tests/test-applications/nextjs-14/.gitignore diff --git a/packages/e2e-tests/test-applications/nextjs-14/.npmrc b/dev-packages/e2e-tests/test-applications/nextjs-14/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/.npmrc rename to dev-packages/e2e-tests/test-applications/nextjs-14/.npmrc diff --git a/packages/e2e-tests/test-applications/nextjs-14/app/generation-functions/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-14/app/generation-functions/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/app/generation-functions/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-14/app/generation-functions/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-14/app/layout.tsx b/dev-packages/e2e-tests/test-applications/nextjs-14/app/layout.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/app/layout.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-14/app/layout.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-14/event-proxy-server.ts b/dev-packages/e2e-tests/test-applications/nextjs-14/event-proxy-server.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/event-proxy-server.ts rename to dev-packages/e2e-tests/test-applications/nextjs-14/event-proxy-server.ts diff --git a/packages/e2e-tests/test-applications/nextjs-14/globals.d.ts b/dev-packages/e2e-tests/test-applications/nextjs-14/globals.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/globals.d.ts rename to dev-packages/e2e-tests/test-applications/nextjs-14/globals.d.ts diff --git a/packages/e2e-tests/test-applications/nextjs-14/next-env.d.ts b/dev-packages/e2e-tests/test-applications/nextjs-14/next-env.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/next-env.d.ts rename to dev-packages/e2e-tests/test-applications/nextjs-14/next-env.d.ts diff --git a/packages/e2e-tests/test-applications/nextjs-14/next.config.js b/dev-packages/e2e-tests/test-applications/nextjs-14/next.config.js similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/next.config.js rename to dev-packages/e2e-tests/test-applications/nextjs-14/next.config.js diff --git a/packages/e2e-tests/test-applications/nextjs-14/package.json b/dev-packages/e2e-tests/test-applications/nextjs-14/package.json similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/package.json rename to dev-packages/e2e-tests/test-applications/nextjs-14/package.json diff --git a/packages/e2e-tests/test-applications/nextjs-14/playwright.config.ts b/dev-packages/e2e-tests/test-applications/nextjs-14/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/nextjs-14/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/nextjs-14/sentry.client.config.ts b/dev-packages/e2e-tests/test-applications/nextjs-14/sentry.client.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/sentry.client.config.ts rename to dev-packages/e2e-tests/test-applications/nextjs-14/sentry.client.config.ts diff --git a/packages/e2e-tests/test-applications/nextjs-14/sentry.edge.config.ts b/dev-packages/e2e-tests/test-applications/nextjs-14/sentry.edge.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/sentry.edge.config.ts rename to dev-packages/e2e-tests/test-applications/nextjs-14/sentry.edge.config.ts diff --git a/packages/e2e-tests/test-applications/nextjs-14/sentry.server.config.ts b/dev-packages/e2e-tests/test-applications/nextjs-14/sentry.server.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/sentry.server.config.ts rename to dev-packages/e2e-tests/test-applications/nextjs-14/sentry.server.config.ts diff --git a/packages/e2e-tests/test-applications/nextjs-14/start-event-proxy.ts b/dev-packages/e2e-tests/test-applications/nextjs-14/start-event-proxy.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/start-event-proxy.ts rename to dev-packages/e2e-tests/test-applications/nextjs-14/start-event-proxy.ts diff --git a/packages/e2e-tests/test-applications/nextjs-14/tests/generation-functions.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-14/tests/generation-functions.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/tests/generation-functions.test.ts rename to dev-packages/e2e-tests/test-applications/nextjs-14/tests/generation-functions.test.ts diff --git a/packages/e2e-tests/test-applications/nextjs-14/tsconfig.json b/dev-packages/e2e-tests/test-applications/nextjs-14/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-14/tsconfig.json rename to dev-packages/e2e-tests/test-applications/nextjs-14/tsconfig.json diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/.gitignore b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/.gitignore rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/.gitignore diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/.npmrc b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/.npmrc rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/.npmrc diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/layout.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/layout.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/layout.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/layout.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/nested-layout/layout.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/nested-layout/layout.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/nested-layout/layout.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/nested-layout/layout.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/nested-layout/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/nested-layout/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/nested-layout/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/(nested-layout)/nested-layout/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/error.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/error.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/error.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/error.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/layout.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/layout.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/layout.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/layout.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/loading.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/loading.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/loading.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/loading.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/not-found.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/not-found.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/not-found.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/not-found.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/error.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/error.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/error.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/error.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/layout.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/layout.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/layout.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/layout.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/loading.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/loading.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/loading.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/loading.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/not-found.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/not-found.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/not-found.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/not-found.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[...parameters]/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/error.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/error.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/error.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/error.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/layout.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/layout.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/layout.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/layout.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/loading.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/loading.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/loading.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/loading.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/not-found.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/not-found.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/not-found.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/not-found.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/client-component/parameter/[parameter]/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/edge-server-components/error/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/edge-server-components/error/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/edge-server-components/error/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/edge-server-components/error/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/edge-server-components/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/edge-server-components/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/edge-server-components/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/edge-server-components/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/error.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/error.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/error.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/error.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/layout.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/layout.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/layout.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/layout.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/loading.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/loading.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/loading.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/loading.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/not-found.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/not-found.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/not-found.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/not-found.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/edge/route.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/edge/route.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/edge/route.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/edge/route.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/error/route.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/error/route.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/error/route.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/error/route.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/route.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/route.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/route.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/[param]/route.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/static/route.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/static/route.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/static/route.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/route-handlers/static/route.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-action/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-action/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-action/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-action/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/error.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/error.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/error.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/error.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/layout.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/layout.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/layout.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/layout.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/loading.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/loading.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/loading.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/loading.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/not-found.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/not-found.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/not-found.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/not-found.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/not-found/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/not-found/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/not-found/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/not-found/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/error.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/error.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/error.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/error.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/layout.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/layout.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/layout.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/layout.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/loading.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/loading.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/loading.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/loading.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/not-found.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/not-found.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/not-found.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/not-found.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[...parameters]/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/error.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/error.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/error.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/error.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/layout.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/layout.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/layout.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/layout.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/loading.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/loading.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/loading.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/loading.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/not-found.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/not-found.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/not-found.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/not-found.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/parameter/[parameter]/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/redirect/page.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/redirect/page.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/redirect/page.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/app/server-component/redirect/page.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/assert-build.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/assert-build.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/assert-build.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/assert-build.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/components/client-error-debug-tools.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/components/client-error-debug-tools.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/components/client-error-debug-tools.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/components/client-error-debug-tools.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/components/transaction-context.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/components/transaction-context.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/components/transaction-context.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/components/transaction-context.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/event-proxy-server.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/event-proxy-server.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/event-proxy-server.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/event-proxy-server.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/globals.d.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/globals.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/globals.d.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/globals.d.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/middleware.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/middleware.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/middleware.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/middleware.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/next-env.d.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/next-env.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/next-env.d.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/next-env.d.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/next.config.js b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/next.config.js similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/next.config.js rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/next.config.js diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/package.json b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/package.json similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/package.json rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/package.json diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/async-context-edge-endpoint.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/async-context-edge-endpoint.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/async-context-edge-endpoint.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/async-context-edge-endpoint.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/edge-endpoint.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/edge-endpoint.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/edge-endpoint.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/edge-endpoint.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/endpoint-behind-middleware.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/endpoint-behind-middleware.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/endpoint-behind-middleware.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/endpoint-behind-middleware.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/endpoint.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/endpoint.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/endpoint.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/endpoint.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/error-edge-endpoint.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/error-edge-endpoint.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/error-edge-endpoint.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/api/error-edge-endpoint.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/pages/pages-router/ssr-error-class.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/pages-router/ssr-error-class.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/pages/pages-router/ssr-error-class.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/pages-router/ssr-error-class.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/pages/pages-router/ssr-error-fc.tsx b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/pages-router/ssr-error-fc.tsx similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/pages/pages-router/ssr-error-fc.tsx rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/pages/pages-router/ssr-error-fc.tsx diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.client.config.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.client.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/sentry.client.config.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.client.config.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/start-event-proxy.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/start-event-proxy.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/start-event-proxy.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/start-event-proxy.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/tests/async-context-edge.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/async-context-edge.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/tests/async-context-edge.test.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/async-context-edge.test.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/tests/client-app-routing-instrumentation.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/client-app-routing-instrumentation.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/tests/client-app-routing-instrumentation.test.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/client-app-routing-instrumentation.test.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/tests/connected-servercomponent-trace.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/connected-servercomponent-trace.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/tests/connected-servercomponent-trace.test.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/connected-servercomponent-trace.test.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/tests/devErrorSymbolification.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/devErrorSymbolification.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/tests/devErrorSymbolification.test.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/devErrorSymbolification.test.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/tests/edge-route.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/edge-route.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/tests/edge-route.test.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/edge-route.test.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/tests/edge.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/edge.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/tests/edge.test.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/edge.test.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/tests/exceptions.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/exceptions.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/tests/exceptions.test.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/exceptions.test.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/tests/middleware.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/middleware.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/tests/middleware.test.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/middleware.test.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/tests/pages-ssr-errors.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/pages-ssr-errors.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/tests/pages-ssr-errors.test.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/pages-ssr-errors.test.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/tests/route-handlers.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/route-handlers.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/tests/route-handlers.test.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/route-handlers.test.ts diff --git a/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 similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/tests/transactions.test.ts rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/transactions.test.ts diff --git a/packages/e2e-tests/test-applications/nextjs-app-dir/tsconfig.json b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/nextjs-app-dir/tsconfig.json rename to dev-packages/e2e-tests/test-applications/nextjs-app-dir/tsconfig.json diff --git a/packages/e2e-tests/test-applications/node-experimental-fastify-app/.gitignore b/dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/node-experimental-fastify-app/.gitignore rename to dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/.gitignore diff --git a/packages/e2e-tests/test-applications/node-experimental-fastify-app/.npmrc b/dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/node-experimental-fastify-app/.npmrc rename to dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/.npmrc diff --git a/packages/e2e-tests/test-applications/node-experimental-fastify-app/event-proxy-server.ts b/dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/event-proxy-server.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-experimental-fastify-app/event-proxy-server.ts rename to dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/event-proxy-server.ts diff --git a/packages/e2e-tests/test-applications/node-experimental-fastify-app/package.json b/dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/package.json similarity index 100% rename from packages/e2e-tests/test-applications/node-experimental-fastify-app/package.json rename to dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/package.json diff --git a/packages/e2e-tests/test-applications/node-experimental-fastify-app/playwright.config.ts b/dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-experimental-fastify-app/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/node-experimental-fastify-app/src/app.js b/dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/src/app.js similarity index 100% rename from packages/e2e-tests/test-applications/node-experimental-fastify-app/src/app.js rename to dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/src/app.js diff --git a/packages/e2e-tests/test-applications/node-experimental-fastify-app/src/tracing.js b/dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/src/tracing.js similarity index 100% rename from packages/e2e-tests/test-applications/node-experimental-fastify-app/src/tracing.js rename to dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/src/tracing.js diff --git a/packages/e2e-tests/test-applications/node-experimental-fastify-app/start-event-proxy.ts b/dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/start-event-proxy.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-experimental-fastify-app/start-event-proxy.ts rename to dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/start-event-proxy.ts diff --git a/packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/errors.test.ts b/dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/errors.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/errors.test.ts rename to dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/errors.test.ts diff --git a/packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/propagation.test.ts b/dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/propagation.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/propagation.test.ts rename to dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/propagation.test.ts diff --git a/packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/transactions.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/transactions.test.ts rename to dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/tests/transactions.test.ts diff --git a/packages/e2e-tests/test-applications/node-experimental-fastify-app/tsconfig.json b/dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/node-experimental-fastify-app/tsconfig.json rename to dev-packages/e2e-tests/test-applications/node-experimental-fastify-app/tsconfig.json diff --git a/packages/e2e-tests/test-applications/node-express-app/.gitignore b/dev-packages/e2e-tests/test-applications/node-express-app/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/node-express-app/.gitignore rename to dev-packages/e2e-tests/test-applications/node-express-app/.gitignore diff --git a/packages/e2e-tests/test-applications/node-express-app/.npmrc b/dev-packages/e2e-tests/test-applications/node-express-app/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/node-express-app/.npmrc rename to dev-packages/e2e-tests/test-applications/node-express-app/.npmrc diff --git a/packages/e2e-tests/test-applications/node-express-app/event-proxy-server.ts b/dev-packages/e2e-tests/test-applications/node-express-app/event-proxy-server.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-express-app/event-proxy-server.ts rename to dev-packages/e2e-tests/test-applications/node-express-app/event-proxy-server.ts diff --git a/packages/e2e-tests/test-applications/node-express-app/package.json b/dev-packages/e2e-tests/test-applications/node-express-app/package.json similarity index 100% rename from packages/e2e-tests/test-applications/node-express-app/package.json rename to dev-packages/e2e-tests/test-applications/node-express-app/package.json diff --git a/packages/e2e-tests/test-applications/node-express-app/playwright.config.ts b/dev-packages/e2e-tests/test-applications/node-express-app/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-express-app/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/node-express-app/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/node-express-app/src/app.ts b/dev-packages/e2e-tests/test-applications/node-express-app/src/app.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-express-app/src/app.ts rename to dev-packages/e2e-tests/test-applications/node-express-app/src/app.ts diff --git a/packages/e2e-tests/test-applications/node-express-app/start-event-proxy.ts b/dev-packages/e2e-tests/test-applications/node-express-app/start-event-proxy.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-express-app/start-event-proxy.ts rename to dev-packages/e2e-tests/test-applications/node-express-app/start-event-proxy.ts diff --git a/packages/e2e-tests/test-applications/node-express-app/tests/server.test.ts b/dev-packages/e2e-tests/test-applications/node-express-app/tests/server.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-express-app/tests/server.test.ts rename to dev-packages/e2e-tests/test-applications/node-express-app/tests/server.test.ts diff --git a/packages/e2e-tests/test-applications/node-express-app/tsconfig.json b/dev-packages/e2e-tests/test-applications/node-express-app/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/node-express-app/tsconfig.json rename to dev-packages/e2e-tests/test-applications/node-express-app/tsconfig.json diff --git a/packages/e2e-tests/test-applications/node-hapi-app/.gitignore b/dev-packages/e2e-tests/test-applications/node-hapi-app/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/node-hapi-app/.gitignore rename to dev-packages/e2e-tests/test-applications/node-hapi-app/.gitignore diff --git a/packages/e2e-tests/test-applications/node-hapi-app/.npmrc b/dev-packages/e2e-tests/test-applications/node-hapi-app/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/node-hapi-app/.npmrc rename to dev-packages/e2e-tests/test-applications/node-hapi-app/.npmrc diff --git a/packages/e2e-tests/test-applications/node-hapi-app/event-proxy-server.ts b/dev-packages/e2e-tests/test-applications/node-hapi-app/event-proxy-server.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-hapi-app/event-proxy-server.ts rename to dev-packages/e2e-tests/test-applications/node-hapi-app/event-proxy-server.ts diff --git a/packages/e2e-tests/test-applications/node-hapi-app/package.json b/dev-packages/e2e-tests/test-applications/node-hapi-app/package.json similarity index 100% rename from packages/e2e-tests/test-applications/node-hapi-app/package.json rename to dev-packages/e2e-tests/test-applications/node-hapi-app/package.json diff --git a/packages/e2e-tests/test-applications/node-hapi-app/playwright.config.ts b/dev-packages/e2e-tests/test-applications/node-hapi-app/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-hapi-app/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/node-hapi-app/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/node-hapi-app/src/app.js b/dev-packages/e2e-tests/test-applications/node-hapi-app/src/app.js similarity index 100% rename from packages/e2e-tests/test-applications/node-hapi-app/src/app.js rename to dev-packages/e2e-tests/test-applications/node-hapi-app/src/app.js diff --git a/packages/e2e-tests/test-applications/node-hapi-app/start-event-proxy.ts b/dev-packages/e2e-tests/test-applications/node-hapi-app/start-event-proxy.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-hapi-app/start-event-proxy.ts rename to dev-packages/e2e-tests/test-applications/node-hapi-app/start-event-proxy.ts diff --git a/packages/e2e-tests/test-applications/node-hapi-app/tests/server.test.ts b/dev-packages/e2e-tests/test-applications/node-hapi-app/tests/server.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/node-hapi-app/tests/server.test.ts rename to dev-packages/e2e-tests/test-applications/node-hapi-app/tests/server.test.ts diff --git a/packages/e2e-tests/test-applications/node-hapi-app/tsconfig.json b/dev-packages/e2e-tests/test-applications/node-hapi-app/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/node-hapi-app/tsconfig.json rename to dev-packages/e2e-tests/test-applications/node-hapi-app/tsconfig.json diff --git a/packages/e2e-tests/test-applications/react-create-hash-router/.gitignore b/dev-packages/e2e-tests/test-applications/react-create-hash-router/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/react-create-hash-router/.gitignore rename to dev-packages/e2e-tests/test-applications/react-create-hash-router/.gitignore diff --git a/packages/e2e-tests/test-applications/react-create-hash-router/.npmrc b/dev-packages/e2e-tests/test-applications/react-create-hash-router/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/react-create-hash-router/.npmrc rename to dev-packages/e2e-tests/test-applications/react-create-hash-router/.npmrc diff --git a/packages/e2e-tests/test-applications/react-create-hash-router/package.json b/dev-packages/e2e-tests/test-applications/react-create-hash-router/package.json similarity index 100% rename from packages/e2e-tests/test-applications/react-create-hash-router/package.json rename to dev-packages/e2e-tests/test-applications/react-create-hash-router/package.json diff --git a/packages/e2e-tests/test-applications/react-create-hash-router/playwright.config.ts b/dev-packages/e2e-tests/test-applications/react-create-hash-router/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/react-create-hash-router/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/react-create-hash-router/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/react-create-hash-router/public/index.html b/dev-packages/e2e-tests/test-applications/react-create-hash-router/public/index.html similarity index 100% rename from packages/e2e-tests/test-applications/react-create-hash-router/public/index.html rename to dev-packages/e2e-tests/test-applications/react-create-hash-router/public/index.html diff --git a/packages/e2e-tests/test-applications/react-create-hash-router/src/globals.d.ts b/dev-packages/e2e-tests/test-applications/react-create-hash-router/src/globals.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/react-create-hash-router/src/globals.d.ts rename to dev-packages/e2e-tests/test-applications/react-create-hash-router/src/globals.d.ts diff --git a/packages/e2e-tests/test-applications/react-create-hash-router/src/index.tsx b/dev-packages/e2e-tests/test-applications/react-create-hash-router/src/index.tsx similarity index 100% rename from packages/e2e-tests/test-applications/react-create-hash-router/src/index.tsx rename to dev-packages/e2e-tests/test-applications/react-create-hash-router/src/index.tsx diff --git a/packages/e2e-tests/test-applications/react-create-hash-router/src/pages/Index.tsx b/dev-packages/e2e-tests/test-applications/react-create-hash-router/src/pages/Index.tsx similarity index 100% rename from packages/e2e-tests/test-applications/react-create-hash-router/src/pages/Index.tsx rename to dev-packages/e2e-tests/test-applications/react-create-hash-router/src/pages/Index.tsx diff --git a/packages/e2e-tests/test-applications/react-create-hash-router/src/pages/User.tsx b/dev-packages/e2e-tests/test-applications/react-create-hash-router/src/pages/User.tsx similarity index 100% rename from packages/e2e-tests/test-applications/react-create-hash-router/src/pages/User.tsx rename to dev-packages/e2e-tests/test-applications/react-create-hash-router/src/pages/User.tsx diff --git a/packages/e2e-tests/test-applications/react-create-hash-router/src/react-app-env.d.ts b/dev-packages/e2e-tests/test-applications/react-create-hash-router/src/react-app-env.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/react-create-hash-router/src/react-app-env.d.ts rename to dev-packages/e2e-tests/test-applications/react-create-hash-router/src/react-app-env.d.ts diff --git a/packages/e2e-tests/test-applications/react-create-hash-router/tests/behaviour-test.spec.ts b/dev-packages/e2e-tests/test-applications/react-create-hash-router/tests/behaviour-test.spec.ts similarity index 100% rename from packages/e2e-tests/test-applications/react-create-hash-router/tests/behaviour-test.spec.ts rename to dev-packages/e2e-tests/test-applications/react-create-hash-router/tests/behaviour-test.spec.ts diff --git a/packages/e2e-tests/test-applications/react-create-hash-router/tests/fixtures/ReplayRecordingData.ts b/dev-packages/e2e-tests/test-applications/react-create-hash-router/tests/fixtures/ReplayRecordingData.ts similarity index 100% rename from packages/e2e-tests/test-applications/react-create-hash-router/tests/fixtures/ReplayRecordingData.ts rename to dev-packages/e2e-tests/test-applications/react-create-hash-router/tests/fixtures/ReplayRecordingData.ts diff --git a/packages/e2e-tests/test-applications/react-create-hash-router/tsconfig.json b/dev-packages/e2e-tests/test-applications/react-create-hash-router/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/react-create-hash-router/tsconfig.json rename to dev-packages/e2e-tests/test-applications/react-create-hash-router/tsconfig.json diff --git a/packages/e2e-tests/test-applications/react-router-6-use-routes/.gitignore b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/react-router-6-use-routes/.gitignore rename to dev-packages/e2e-tests/test-applications/react-router-6-use-routes/.gitignore diff --git a/packages/e2e-tests/test-applications/react-router-6-use-routes/.npmrc b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/react-router-6-use-routes/.npmrc rename to dev-packages/e2e-tests/test-applications/react-router-6-use-routes/.npmrc diff --git a/packages/e2e-tests/test-applications/react-router-6-use-routes/package.json b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/package.json similarity index 100% rename from packages/e2e-tests/test-applications/react-router-6-use-routes/package.json rename to dev-packages/e2e-tests/test-applications/react-router-6-use-routes/package.json diff --git a/packages/e2e-tests/test-applications/react-router-6-use-routes/playwright.config.ts b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/react-router-6-use-routes/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/react-router-6-use-routes/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/react-router-6-use-routes/public/index.html b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/public/index.html similarity index 100% rename from packages/e2e-tests/test-applications/react-router-6-use-routes/public/index.html rename to dev-packages/e2e-tests/test-applications/react-router-6-use-routes/public/index.html diff --git a/packages/e2e-tests/test-applications/react-router-6-use-routes/src/globals.d.ts b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/globals.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/react-router-6-use-routes/src/globals.d.ts rename to dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/globals.d.ts diff --git a/packages/e2e-tests/test-applications/react-router-6-use-routes/src/index.tsx b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/index.tsx similarity index 100% rename from packages/e2e-tests/test-applications/react-router-6-use-routes/src/index.tsx rename to dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/index.tsx diff --git a/packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/Index.tsx b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/Index.tsx similarity index 100% rename from packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/Index.tsx rename to dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/Index.tsx diff --git a/packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/User.tsx b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/User.tsx similarity index 100% rename from packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/User.tsx rename to dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/pages/User.tsx diff --git a/packages/e2e-tests/test-applications/react-router-6-use-routes/src/react-app-env.d.ts b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/react-app-env.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/react-router-6-use-routes/src/react-app-env.d.ts rename to dev-packages/e2e-tests/test-applications/react-router-6-use-routes/src/react-app-env.d.ts diff --git a/packages/e2e-tests/test-applications/react-router-6-use-routes/tests/behaviour-test.spec.ts b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/tests/behaviour-test.spec.ts similarity index 100% rename from packages/e2e-tests/test-applications/react-router-6-use-routes/tests/behaviour-test.spec.ts rename to dev-packages/e2e-tests/test-applications/react-router-6-use-routes/tests/behaviour-test.spec.ts diff --git a/packages/e2e-tests/test-applications/react-router-6-use-routes/tests/fixtures/ReplayRecordingData.ts b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/tests/fixtures/ReplayRecordingData.ts similarity index 100% rename from packages/e2e-tests/test-applications/react-router-6-use-routes/tests/fixtures/ReplayRecordingData.ts rename to dev-packages/e2e-tests/test-applications/react-router-6-use-routes/tests/fixtures/ReplayRecordingData.ts diff --git a/packages/e2e-tests/test-applications/react-router-6-use-routes/tsconfig.json b/dev-packages/e2e-tests/test-applications/react-router-6-use-routes/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/react-router-6-use-routes/tsconfig.json rename to dev-packages/e2e-tests/test-applications/react-router-6-use-routes/tsconfig.json diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/.gitignore b/dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/.gitignore rename to dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/.gitignore diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/.npmrc b/dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/.npmrc rename to dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/.npmrc diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/package.json b/dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/package.json similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/package.json rename to dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/package.json diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/playwright.config.ts b/dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/public/index.html b/dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/public/index.html similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/public/index.html rename to dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/public/index.html diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/globals.d.ts b/dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/globals.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/globals.d.ts rename to dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/globals.d.ts diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/index.tsx b/dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/index.tsx similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/index.tsx rename to dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/index.tsx diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/pages/Index.tsx b/dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/pages/Index.tsx similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/pages/Index.tsx rename to dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/pages/Index.tsx diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/pages/User.tsx b/dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/pages/User.tsx similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/pages/User.tsx rename to dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/pages/User.tsx diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/react-app-env.d.ts b/dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/react-app-env.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/react-app-env.d.ts rename to dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/react-app-env.d.ts diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/tests/behaviour-test.spec.ts b/dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/tests/behaviour-test.spec.ts similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/tests/behaviour-test.spec.ts rename to dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/tests/behaviour-test.spec.ts diff --git a/packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/tsconfig.json b/dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/tsconfig.json rename to dev-packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/tsconfig.json diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/.gitignore b/dev-packages/e2e-tests/test-applications/standard-frontend-react/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react/.gitignore rename to dev-packages/e2e-tests/test-applications/standard-frontend-react/.gitignore diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/.npmrc b/dev-packages/e2e-tests/test-applications/standard-frontend-react/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react/.npmrc rename to dev-packages/e2e-tests/test-applications/standard-frontend-react/.npmrc diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/package.json b/dev-packages/e2e-tests/test-applications/standard-frontend-react/package.json similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react/package.json rename to dev-packages/e2e-tests/test-applications/standard-frontend-react/package.json diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/playwright.config.ts b/dev-packages/e2e-tests/test-applications/standard-frontend-react/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/standard-frontend-react/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/public/index.html b/dev-packages/e2e-tests/test-applications/standard-frontend-react/public/index.html similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react/public/index.html rename to dev-packages/e2e-tests/test-applications/standard-frontend-react/public/index.html diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/src/globals.d.ts b/dev-packages/e2e-tests/test-applications/standard-frontend-react/src/globals.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react/src/globals.d.ts rename to dev-packages/e2e-tests/test-applications/standard-frontend-react/src/globals.d.ts diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/src/index.tsx b/dev-packages/e2e-tests/test-applications/standard-frontend-react/src/index.tsx similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react/src/index.tsx rename to dev-packages/e2e-tests/test-applications/standard-frontend-react/src/index.tsx diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/src/pages/Index.tsx b/dev-packages/e2e-tests/test-applications/standard-frontend-react/src/pages/Index.tsx similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react/src/pages/Index.tsx rename to dev-packages/e2e-tests/test-applications/standard-frontend-react/src/pages/Index.tsx diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/src/pages/User.tsx b/dev-packages/e2e-tests/test-applications/standard-frontend-react/src/pages/User.tsx similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react/src/pages/User.tsx rename to dev-packages/e2e-tests/test-applications/standard-frontend-react/src/pages/User.tsx diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/src/react-app-env.d.ts b/dev-packages/e2e-tests/test-applications/standard-frontend-react/src/react-app-env.d.ts similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react/src/react-app-env.d.ts rename to dev-packages/e2e-tests/test-applications/standard-frontend-react/src/react-app-env.d.ts diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/tests/behaviour-test.spec.ts b/dev-packages/e2e-tests/test-applications/standard-frontend-react/tests/behaviour-test.spec.ts similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react/tests/behaviour-test.spec.ts rename to dev-packages/e2e-tests/test-applications/standard-frontend-react/tests/behaviour-test.spec.ts diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/tests/fixtures/ReplayRecordingData.ts b/dev-packages/e2e-tests/test-applications/standard-frontend-react/tests/fixtures/ReplayRecordingData.ts similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react/tests/fixtures/ReplayRecordingData.ts rename to dev-packages/e2e-tests/test-applications/standard-frontend-react/tests/fixtures/ReplayRecordingData.ts diff --git a/packages/e2e-tests/test-applications/standard-frontend-react/tsconfig.json b/dev-packages/e2e-tests/test-applications/standard-frontend-react/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/standard-frontend-react/tsconfig.json rename to dev-packages/e2e-tests/test-applications/standard-frontend-react/tsconfig.json diff --git a/packages/e2e-tests/test-applications/sveltekit-2/.gitignore b/dev-packages/e2e-tests/test-applications/sveltekit-2/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/.gitignore rename to dev-packages/e2e-tests/test-applications/sveltekit-2/.gitignore diff --git a/packages/e2e-tests/test-applications/sveltekit-2/.npmrc b/dev-packages/e2e-tests/test-applications/sveltekit-2/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/.npmrc rename to dev-packages/e2e-tests/test-applications/sveltekit-2/.npmrc diff --git a/packages/e2e-tests/test-applications/sveltekit-2/README.md b/dev-packages/e2e-tests/test-applications/sveltekit-2/README.md similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/README.md rename to dev-packages/e2e-tests/test-applications/sveltekit-2/README.md diff --git a/packages/e2e-tests/test-applications/sveltekit-2/event-proxy-server.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2/event-proxy-server.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/event-proxy-server.ts rename to dev-packages/e2e-tests/test-applications/sveltekit-2/event-proxy-server.ts diff --git a/packages/e2e-tests/test-applications/sveltekit-2/package.json b/dev-packages/e2e-tests/test-applications/sveltekit-2/package.json similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/package.json rename to dev-packages/e2e-tests/test-applications/sveltekit-2/package.json diff --git a/packages/e2e-tests/test-applications/sveltekit-2/playwright.config.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/sveltekit-2/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/sveltekit-2/src/app.html b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/app.html similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/src/app.html rename to dev-packages/e2e-tests/test-applications/sveltekit-2/src/app.html diff --git a/packages/e2e-tests/test-applications/sveltekit-2/src/hooks.client.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/hooks.client.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/src/hooks.client.ts rename to dev-packages/e2e-tests/test-applications/sveltekit-2/src/hooks.client.ts diff --git a/packages/e2e-tests/test-applications/sveltekit-2/src/hooks.server.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/hooks.server.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/src/hooks.server.ts rename to dev-packages/e2e-tests/test-applications/sveltekit-2/src/hooks.server.ts diff --git a/packages/e2e-tests/test-applications/sveltekit-2/src/routes/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/+page.svelte similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/src/routes/+page.svelte rename to dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/+page.svelte diff --git a/packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.server.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.server.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.server.ts rename to dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.server.ts diff --git a/packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.svelte similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.svelte rename to dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.svelte diff --git a/packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.ts rename to dev-packages/e2e-tests/test-applications/sveltekit-2/src/routes/building/+page.ts diff --git a/packages/e2e-tests/test-applications/sveltekit-2/start-event-proxy.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2/start-event-proxy.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/start-event-proxy.ts rename to dev-packages/e2e-tests/test-applications/sveltekit-2/start-event-proxy.ts diff --git a/packages/e2e-tests/test-applications/sveltekit-2/static/favicon.png b/dev-packages/e2e-tests/test-applications/sveltekit-2/static/favicon.png similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/static/favicon.png rename to dev-packages/e2e-tests/test-applications/sveltekit-2/static/favicon.png diff --git a/packages/e2e-tests/test-applications/sveltekit-2/svelte.config.js b/dev-packages/e2e-tests/test-applications/sveltekit-2/svelte.config.js similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/svelte.config.js rename to dev-packages/e2e-tests/test-applications/sveltekit-2/svelte.config.js diff --git a/packages/e2e-tests/test-applications/sveltekit-2/test/transaction.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit-2/test/transaction.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/test/transaction.test.ts rename to dev-packages/e2e-tests/test-applications/sveltekit-2/test/transaction.test.ts diff --git a/packages/e2e-tests/test-applications/sveltekit-2/tsconfig.json b/dev-packages/e2e-tests/test-applications/sveltekit-2/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/tsconfig.json rename to dev-packages/e2e-tests/test-applications/sveltekit-2/tsconfig.json diff --git a/packages/e2e-tests/test-applications/sveltekit-2/vite.config.js b/dev-packages/e2e-tests/test-applications/sveltekit-2/vite.config.js similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit-2/vite.config.js rename to dev-packages/e2e-tests/test-applications/sveltekit-2/vite.config.js diff --git a/packages/e2e-tests/test-applications/sveltekit/.gitignore b/dev-packages/e2e-tests/test-applications/sveltekit/.gitignore similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/.gitignore rename to dev-packages/e2e-tests/test-applications/sveltekit/.gitignore diff --git a/packages/e2e-tests/test-applications/sveltekit/.npmrc b/dev-packages/e2e-tests/test-applications/sveltekit/.npmrc similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/.npmrc rename to dev-packages/e2e-tests/test-applications/sveltekit/.npmrc diff --git a/packages/e2e-tests/test-applications/sveltekit/README.md b/dev-packages/e2e-tests/test-applications/sveltekit/README.md similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/README.md rename to dev-packages/e2e-tests/test-applications/sveltekit/README.md diff --git a/packages/e2e-tests/test-applications/sveltekit/event-proxy-server.ts b/dev-packages/e2e-tests/test-applications/sveltekit/event-proxy-server.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/event-proxy-server.ts rename to dev-packages/e2e-tests/test-applications/sveltekit/event-proxy-server.ts diff --git a/packages/e2e-tests/test-applications/sveltekit/package.json b/dev-packages/e2e-tests/test-applications/sveltekit/package.json similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/package.json rename to dev-packages/e2e-tests/test-applications/sveltekit/package.json diff --git a/packages/e2e-tests/test-applications/sveltekit/playwright.config.ts b/dev-packages/e2e-tests/test-applications/sveltekit/playwright.config.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/playwright.config.ts rename to dev-packages/e2e-tests/test-applications/sveltekit/playwright.config.ts diff --git a/packages/e2e-tests/test-applications/sveltekit/src/app.html b/dev-packages/e2e-tests/test-applications/sveltekit/src/app.html similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/src/app.html rename to dev-packages/e2e-tests/test-applications/sveltekit/src/app.html diff --git a/packages/e2e-tests/test-applications/sveltekit/src/hooks.client.ts b/dev-packages/e2e-tests/test-applications/sveltekit/src/hooks.client.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/src/hooks.client.ts rename to dev-packages/e2e-tests/test-applications/sveltekit/src/hooks.client.ts diff --git a/packages/e2e-tests/test-applications/sveltekit/src/hooks.server.ts b/dev-packages/e2e-tests/test-applications/sveltekit/src/hooks.server.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/src/hooks.server.ts rename to dev-packages/e2e-tests/test-applications/sveltekit/src/hooks.server.ts diff --git a/packages/e2e-tests/test-applications/sveltekit/src/routes/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/+page.svelte similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/src/routes/+page.svelte rename to dev-packages/e2e-tests/test-applications/sveltekit/src/routes/+page.svelte diff --git a/packages/e2e-tests/test-applications/sveltekit/src/routes/building/+page.server.ts b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/building/+page.server.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/src/routes/building/+page.server.ts rename to dev-packages/e2e-tests/test-applications/sveltekit/src/routes/building/+page.server.ts diff --git a/packages/e2e-tests/test-applications/sveltekit/src/routes/building/+page.svelte b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/building/+page.svelte similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/src/routes/building/+page.svelte rename to dev-packages/e2e-tests/test-applications/sveltekit/src/routes/building/+page.svelte diff --git a/packages/e2e-tests/test-applications/sveltekit/src/routes/building/+page.ts b/dev-packages/e2e-tests/test-applications/sveltekit/src/routes/building/+page.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/src/routes/building/+page.ts rename to dev-packages/e2e-tests/test-applications/sveltekit/src/routes/building/+page.ts diff --git a/packages/e2e-tests/test-applications/sveltekit/start-event-proxy.ts b/dev-packages/e2e-tests/test-applications/sveltekit/start-event-proxy.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/start-event-proxy.ts rename to dev-packages/e2e-tests/test-applications/sveltekit/start-event-proxy.ts diff --git a/packages/e2e-tests/test-applications/sveltekit/static/favicon.png b/dev-packages/e2e-tests/test-applications/sveltekit/static/favicon.png similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/static/favicon.png rename to dev-packages/e2e-tests/test-applications/sveltekit/static/favicon.png diff --git a/packages/e2e-tests/test-applications/sveltekit/svelte.config.js b/dev-packages/e2e-tests/test-applications/sveltekit/svelte.config.js similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/svelte.config.js rename to dev-packages/e2e-tests/test-applications/sveltekit/svelte.config.js diff --git a/packages/e2e-tests/test-applications/sveltekit/test/transaction.test.ts b/dev-packages/e2e-tests/test-applications/sveltekit/test/transaction.test.ts similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/test/transaction.test.ts rename to dev-packages/e2e-tests/test-applications/sveltekit/test/transaction.test.ts diff --git a/packages/e2e-tests/test-applications/sveltekit/tsconfig.json b/dev-packages/e2e-tests/test-applications/sveltekit/tsconfig.json similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/tsconfig.json rename to dev-packages/e2e-tests/test-applications/sveltekit/tsconfig.json diff --git a/packages/e2e-tests/test-applications/sveltekit/vite.config.js b/dev-packages/e2e-tests/test-applications/sveltekit/vite.config.js similarity index 100% rename from packages/e2e-tests/test-applications/sveltekit/vite.config.js rename to dev-packages/e2e-tests/test-applications/sveltekit/vite.config.js diff --git a/packages/e2e-tests/test-registry.npmrc b/dev-packages/e2e-tests/test-registry.npmrc similarity index 100% rename from packages/e2e-tests/test-registry.npmrc rename to dev-packages/e2e-tests/test-registry.npmrc diff --git a/packages/e2e-tests/tsconfig.json b/dev-packages/e2e-tests/tsconfig.json similarity index 100% rename from packages/e2e-tests/tsconfig.json rename to dev-packages/e2e-tests/tsconfig.json diff --git a/packages/e2e-tests/validate-test-app-setups.ts b/dev-packages/e2e-tests/validate-test-app-setups.ts similarity index 88% rename from packages/e2e-tests/validate-test-app-setups.ts rename to dev-packages/e2e-tests/validate-test-app-setups.ts index 325ab10a1238..a4f17d5c0400 100644 --- a/packages/e2e-tests/validate-test-app-setups.ts +++ b/dev-packages/e2e-tests/validate-test-app-setups.ts @@ -14,7 +14,7 @@ testRecipePaths.forEach(testRecipePath => { if (!fs.existsSync(npmrcPath)) { console.log( - `No .npmrc found in test application "${testAppPath}". Please add a .npmrc to this test application that uses the fake test registry. (More info in packages/e2e-tests/README.md)`, + `No .npmrc found in test application "${testAppPath}". Please add a .npmrc to this test application that uses the fake test registry. (More info in dev-packages/e2e-tests/README.md)`, ); process.exit(1); } @@ -22,7 +22,7 @@ testRecipePaths.forEach(testRecipePath => { const npmrcContents = fs.readFileSync(npmrcPath, 'utf-8'); if (!npmrcContents.includes('http://localhost:4873')) { console.log( - `.npmrc in test application "${testAppPath} doesn't contain a reference to the fake test registry at "http://localhost:4873". Please add a .npmrc to this test application that uses the fake test registry. (More info in packages/e2e-tests/README.md)`, + `.npmrc in test application "${testAppPath} doesn't contain a reference to the fake test registry at "http://localhost:4873". Please add a .npmrc to this test application that uses the fake test registry. (More info in dev-packages/e2e-tests/README.md)`, ); process.exit(1); } diff --git a/packages/e2e-tests/validate-verdaccio-configuration.ts b/dev-packages/e2e-tests/validate-verdaccio-configuration.ts similarity index 100% rename from packages/e2e-tests/validate-verdaccio-configuration.ts rename to dev-packages/e2e-tests/validate-verdaccio-configuration.ts diff --git a/packages/e2e-tests/verdaccio-config/config.yaml b/dev-packages/e2e-tests/verdaccio-config/config.yaml similarity index 100% rename from packages/e2e-tests/verdaccio-config/config.yaml rename to dev-packages/e2e-tests/verdaccio-config/config.yaml diff --git a/packages/node-integration-tests/.eslintrc.js b/dev-packages/node-integration-tests/.eslintrc.js similarity index 100% rename from packages/node-integration-tests/.eslintrc.js rename to dev-packages/node-integration-tests/.eslintrc.js diff --git a/packages/node-integration-tests/README.md b/dev-packages/node-integration-tests/README.md similarity index 100% rename from packages/node-integration-tests/README.md rename to dev-packages/node-integration-tests/README.md diff --git a/packages/node-integration-tests/jest.config.js b/dev-packages/node-integration-tests/jest.config.js similarity index 100% rename from packages/node-integration-tests/jest.config.js rename to dev-packages/node-integration-tests/jest.config.js diff --git a/packages/node-integration-tests/jest.setup.js b/dev-packages/node-integration-tests/jest.setup.js similarity index 100% rename from packages/node-integration-tests/jest.setup.js rename to dev-packages/node-integration-tests/jest.setup.js diff --git a/packages/node-integration-tests/package.json b/dev-packages/node-integration-tests/package.json similarity index 100% rename from packages/node-integration-tests/package.json rename to dev-packages/node-integration-tests/package.json diff --git a/packages/node-integration-tests/suites/anr/basic-session.js b/dev-packages/node-integration-tests/suites/anr/basic-session.js similarity index 100% rename from packages/node-integration-tests/suites/anr/basic-session.js rename to dev-packages/node-integration-tests/suites/anr/basic-session.js diff --git a/packages/node-integration-tests/suites/anr/basic.js b/dev-packages/node-integration-tests/suites/anr/basic.js similarity index 100% rename from packages/node-integration-tests/suites/anr/basic.js rename to dev-packages/node-integration-tests/suites/anr/basic.js diff --git a/packages/node-integration-tests/suites/anr/basic.mjs b/dev-packages/node-integration-tests/suites/anr/basic.mjs similarity index 100% rename from packages/node-integration-tests/suites/anr/basic.mjs rename to dev-packages/node-integration-tests/suites/anr/basic.mjs diff --git a/packages/node-integration-tests/suites/anr/forked.js b/dev-packages/node-integration-tests/suites/anr/forked.js similarity index 100% rename from packages/node-integration-tests/suites/anr/forked.js rename to dev-packages/node-integration-tests/suites/anr/forked.js diff --git a/packages/node-integration-tests/suites/anr/forker.js b/dev-packages/node-integration-tests/suites/anr/forker.js similarity index 100% rename from packages/node-integration-tests/suites/anr/forker.js rename to dev-packages/node-integration-tests/suites/anr/forker.js diff --git a/packages/node-integration-tests/suites/anr/legacy.js b/dev-packages/node-integration-tests/suites/anr/legacy.js similarity index 100% rename from packages/node-integration-tests/suites/anr/legacy.js rename to dev-packages/node-integration-tests/suites/anr/legacy.js diff --git a/packages/node-integration-tests/suites/anr/test.ts b/dev-packages/node-integration-tests/suites/anr/test.ts similarity index 100% rename from packages/node-integration-tests/suites/anr/test.ts rename to dev-packages/node-integration-tests/suites/anr/test.ts diff --git a/packages/node-integration-tests/suites/express/handle-error/server.ts b/dev-packages/node-integration-tests/suites/express/handle-error/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/handle-error/server.ts rename to dev-packages/node-integration-tests/suites/express/handle-error/server.ts diff --git a/packages/node-integration-tests/suites/express/handle-error/test.ts b/dev-packages/node-integration-tests/suites/express/handle-error/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/handle-error/test.ts rename to dev-packages/node-integration-tests/suites/express/handle-error/test.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-infix-parameterized/server.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-infix-parameterized/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-infix-parameterized/server.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-infix-parameterized/server.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-infix-parameterized/test.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-infix-parameterized/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-infix-parameterized/test.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-infix-parameterized/test.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-infix/server.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-infix/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-infix/server.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-infix/server.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-infix/test.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-infix/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-infix/test.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-infix/test.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized-reverse/server.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized-reverse/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized-reverse/server.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized-reverse/server.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized-reverse/test.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized-reverse/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized-reverse/test.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized-reverse/test.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized/server.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized/server.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized/server.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized/test.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized/test.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-parameterized/test.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized copy/server.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized copy/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized copy/server.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized copy/server.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized copy/test.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized copy/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized copy/test.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized copy/test.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized/server.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized/server.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized/server.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized/test.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized/test.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix-same-length-parameterized/test.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-prefix/server.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-prefix/server.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix/server.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/common-prefix/test.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/common-prefix/test.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/common-prefix/test.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/complex-router/server.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/complex-router/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/complex-router/server.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/complex-router/server.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/complex-router/test.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/complex-router/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/complex-router/test.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/complex-router/test.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/middle-layer-parameterized/server.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/middle-layer-parameterized/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/middle-layer-parameterized/server.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/middle-layer-parameterized/server.ts diff --git a/packages/node-integration-tests/suites/express/multiple-routers/middle-layer-parameterized/test.ts b/dev-packages/node-integration-tests/suites/express/multiple-routers/middle-layer-parameterized/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/multiple-routers/middle-layer-parameterized/test.ts rename to dev-packages/node-integration-tests/suites/express/multiple-routers/middle-layer-parameterized/test.ts diff --git a/packages/node-integration-tests/suites/express/sentry-trace/baggage-header-assign/test.ts b/dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-header-assign/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/sentry-trace/baggage-header-assign/test.ts rename to dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-header-assign/test.ts diff --git a/packages/node-integration-tests/suites/express/sentry-trace/baggage-header-out/server.ts b/dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-header-out/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/sentry-trace/baggage-header-out/server.ts rename to dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-header-out/server.ts diff --git a/packages/node-integration-tests/suites/express/sentry-trace/baggage-header-out/test.ts b/dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-header-out/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/sentry-trace/baggage-header-out/test.ts rename to dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-header-out/test.ts diff --git a/packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors-with-sentry-entries/server.ts b/dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors-with-sentry-entries/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors-with-sentry-entries/server.ts rename to dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors-with-sentry-entries/server.ts diff --git a/packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors-with-sentry-entries/test.ts b/dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors-with-sentry-entries/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors-with-sentry-entries/test.ts rename to dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors-with-sentry-entries/test.ts diff --git a/packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors/server.ts b/dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors/server.ts rename to dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors/server.ts diff --git a/packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors/test.ts b/dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors/test.ts rename to dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-other-vendors/test.ts diff --git a/packages/node-integration-tests/suites/express/sentry-trace/baggage-transaction-name/server.ts b/dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-transaction-name/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/sentry-trace/baggage-transaction-name/server.ts rename to dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-transaction-name/server.ts diff --git a/packages/node-integration-tests/suites/express/sentry-trace/baggage-transaction-name/test.ts b/dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-transaction-name/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/sentry-trace/baggage-transaction-name/test.ts rename to dev-packages/node-integration-tests/suites/express/sentry-trace/baggage-transaction-name/test.ts diff --git a/packages/node-integration-tests/suites/express/sentry-trace/server.ts b/dev-packages/node-integration-tests/suites/express/sentry-trace/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/sentry-trace/server.ts rename to dev-packages/node-integration-tests/suites/express/sentry-trace/server.ts diff --git a/packages/node-integration-tests/suites/express/sentry-trace/trace-header-assign/test.ts b/dev-packages/node-integration-tests/suites/express/sentry-trace/trace-header-assign/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/sentry-trace/trace-header-assign/test.ts rename to dev-packages/node-integration-tests/suites/express/sentry-trace/trace-header-assign/test.ts diff --git a/packages/node-integration-tests/suites/express/sentry-trace/trace-header-out/test.ts b/dev-packages/node-integration-tests/suites/express/sentry-trace/trace-header-out/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/sentry-trace/trace-header-out/test.ts rename to dev-packages/node-integration-tests/suites/express/sentry-trace/trace-header-out/test.ts diff --git a/packages/node-integration-tests/suites/express/tracing/server.ts b/dev-packages/node-integration-tests/suites/express/tracing/server.ts similarity index 100% rename from packages/node-integration-tests/suites/express/tracing/server.ts rename to dev-packages/node-integration-tests/suites/express/tracing/server.ts diff --git a/packages/node-integration-tests/suites/express/tracing/test.ts b/dev-packages/node-integration-tests/suites/express/tracing/test.ts similarity index 100% rename from packages/node-integration-tests/suites/express/tracing/test.ts rename to dev-packages/node-integration-tests/suites/express/tracing/test.ts diff --git a/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js similarity index 100% rename from packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js rename to dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.js diff --git a/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs similarity index 100% rename from packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs rename to dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables-caught.mjs diff --git a/packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js similarity index 100% rename from packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js rename to dev-packages/node-integration-tests/suites/public-api/LocalVariables/local-variables.js diff --git a/packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js similarity index 100% rename from packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js rename to dev-packages/node-integration-tests/suites/public-api/LocalVariables/no-local-variables.js diff --git a/packages/node-integration-tests/suites/public-api/LocalVariables/test.ts b/dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/LocalVariables/test.ts rename to dev-packages/node-integration-tests/suites/public-api/LocalVariables/test.ts diff --git a/packages/node-integration-tests/suites/public-api/OnUncaughtException/additional-listener-test-script.js b/dev-packages/node-integration-tests/suites/public-api/OnUncaughtException/additional-listener-test-script.js similarity index 100% rename from packages/node-integration-tests/suites/public-api/OnUncaughtException/additional-listener-test-script.js rename to dev-packages/node-integration-tests/suites/public-api/OnUncaughtException/additional-listener-test-script.js diff --git a/packages/node-integration-tests/suites/public-api/OnUncaughtException/log-entire-error-to-console.js b/dev-packages/node-integration-tests/suites/public-api/OnUncaughtException/log-entire-error-to-console.js similarity index 100% rename from packages/node-integration-tests/suites/public-api/OnUncaughtException/log-entire-error-to-console.js rename to dev-packages/node-integration-tests/suites/public-api/OnUncaughtException/log-entire-error-to-console.js diff --git a/packages/node-integration-tests/suites/public-api/OnUncaughtException/mimic-native-behaviour-additional-listener-test-script.js b/dev-packages/node-integration-tests/suites/public-api/OnUncaughtException/mimic-native-behaviour-additional-listener-test-script.js similarity index 100% rename from packages/node-integration-tests/suites/public-api/OnUncaughtException/mimic-native-behaviour-additional-listener-test-script.js rename to dev-packages/node-integration-tests/suites/public-api/OnUncaughtException/mimic-native-behaviour-additional-listener-test-script.js diff --git a/packages/node-integration-tests/suites/public-api/OnUncaughtException/mimic-native-behaviour-no-additional-listener-test-script.js b/dev-packages/node-integration-tests/suites/public-api/OnUncaughtException/mimic-native-behaviour-no-additional-listener-test-script.js similarity index 100% rename from packages/node-integration-tests/suites/public-api/OnUncaughtException/mimic-native-behaviour-no-additional-listener-test-script.js rename to dev-packages/node-integration-tests/suites/public-api/OnUncaughtException/mimic-native-behaviour-no-additional-listener-test-script.js diff --git a/packages/node-integration-tests/suites/public-api/OnUncaughtException/no-additional-listener-test-script.js b/dev-packages/node-integration-tests/suites/public-api/OnUncaughtException/no-additional-listener-test-script.js similarity index 100% rename from packages/node-integration-tests/suites/public-api/OnUncaughtException/no-additional-listener-test-script.js rename to dev-packages/node-integration-tests/suites/public-api/OnUncaughtException/no-additional-listener-test-script.js diff --git a/packages/node-integration-tests/suites/public-api/OnUncaughtException/test.ts b/dev-packages/node-integration-tests/suites/public-api/OnUncaughtException/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/OnUncaughtException/test.ts rename to dev-packages/node-integration-tests/suites/public-api/OnUncaughtException/test.ts diff --git a/packages/node-integration-tests/suites/public-api/addBreadcrumb/empty-obj/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/addBreadcrumb/empty-obj/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/addBreadcrumb/empty-obj/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/addBreadcrumb/empty-obj/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/addBreadcrumb/empty-obj/test.ts b/dev-packages/node-integration-tests/suites/public-api/addBreadcrumb/empty-obj/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/addBreadcrumb/empty-obj/test.ts rename to dev-packages/node-integration-tests/suites/public-api/addBreadcrumb/empty-obj/test.ts diff --git a/packages/node-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts b/dev-packages/node-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts rename to dev-packages/node-integration-tests/suites/public-api/addBreadcrumb/multiple_breadcrumbs/test.ts diff --git a/packages/node-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts b/dev-packages/node-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts rename to dev-packages/node-integration-tests/suites/public-api/addBreadcrumb/simple_breadcrumb/test.ts diff --git a/packages/node-integration-tests/suites/public-api/captureException/catched-error/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/captureException/catched-error/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/captureException/catched-error/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/captureException/catched-error/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/captureException/catched-error/test.ts b/dev-packages/node-integration-tests/suites/public-api/captureException/catched-error/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/captureException/catched-error/test.ts rename to dev-packages/node-integration-tests/suites/public-api/captureException/catched-error/test.ts diff --git a/packages/node-integration-tests/suites/public-api/captureException/empty-obj/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/captureException/empty-obj/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/captureException/empty-obj/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/captureException/empty-obj/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/captureException/empty-obj/test.ts b/dev-packages/node-integration-tests/suites/public-api/captureException/empty-obj/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/captureException/empty-obj/test.ts rename to dev-packages/node-integration-tests/suites/public-api/captureException/empty-obj/test.ts diff --git a/packages/node-integration-tests/suites/public-api/captureException/simple-error/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/captureException/simple-error/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/captureException/simple-error/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/captureException/simple-error/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/captureException/simple-error/test.ts b/dev-packages/node-integration-tests/suites/public-api/captureException/simple-error/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/captureException/simple-error/test.ts rename to dev-packages/node-integration-tests/suites/public-api/captureException/simple-error/test.ts diff --git a/packages/node-integration-tests/suites/public-api/captureMessage/simple_message/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/captureMessage/simple_message/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/captureMessage/simple_message/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/captureMessage/simple_message/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/captureMessage/simple_message/test.ts b/dev-packages/node-integration-tests/suites/public-api/captureMessage/simple_message/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/captureMessage/simple_message/test.ts rename to dev-packages/node-integration-tests/suites/public-api/captureMessage/simple_message/test.ts diff --git a/packages/node-integration-tests/suites/public-api/captureMessage/with_level/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/captureMessage/with_level/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/captureMessage/with_level/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/captureMessage/with_level/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/captureMessage/with_level/test.ts b/dev-packages/node-integration-tests/suites/public-api/captureMessage/with_level/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/captureMessage/with_level/test.ts rename to dev-packages/node-integration-tests/suites/public-api/captureMessage/with_level/test.ts diff --git a/packages/node-integration-tests/suites/public-api/configureScope/clear_scope/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/configureScope/clear_scope/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/configureScope/clear_scope/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/configureScope/clear_scope/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/configureScope/clear_scope/test.ts b/dev-packages/node-integration-tests/suites/public-api/configureScope/clear_scope/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/configureScope/clear_scope/test.ts rename to dev-packages/node-integration-tests/suites/public-api/configureScope/clear_scope/test.ts diff --git a/packages/node-integration-tests/suites/public-api/configureScope/set_properties/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/configureScope/set_properties/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/configureScope/set_properties/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/configureScope/set_properties/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/configureScope/set_properties/test.ts b/dev-packages/node-integration-tests/suites/public-api/configureScope/set_properties/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/configureScope/set_properties/test.ts rename to dev-packages/node-integration-tests/suites/public-api/configureScope/set_properties/test.ts diff --git a/packages/node-integration-tests/suites/public-api/scopes/initialScopes/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/scopes/initialScopes/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/scopes/initialScopes/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/scopes/initialScopes/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/scopes/initialScopes/test.ts b/dev-packages/node-integration-tests/suites/public-api/scopes/initialScopes/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/scopes/initialScopes/test.ts rename to dev-packages/node-integration-tests/suites/public-api/scopes/initialScopes/test.ts diff --git a/packages/node-integration-tests/suites/public-api/scopes/isolationScope/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/scopes/isolationScope/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/scopes/isolationScope/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/scopes/isolationScope/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/scopes/isolationScope/test.ts b/dev-packages/node-integration-tests/suites/public-api/scopes/isolationScope/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/scopes/isolationScope/test.ts rename to dev-packages/node-integration-tests/suites/public-api/scopes/isolationScope/test.ts diff --git a/packages/node-integration-tests/suites/public-api/setContext/multiple-contexts/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/setContext/multiple-contexts/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setContext/multiple-contexts/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/setContext/multiple-contexts/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/setContext/multiple-contexts/test.ts b/dev-packages/node-integration-tests/suites/public-api/setContext/multiple-contexts/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setContext/multiple-contexts/test.ts rename to dev-packages/node-integration-tests/suites/public-api/setContext/multiple-contexts/test.ts diff --git a/packages/node-integration-tests/suites/public-api/setContext/non-serializable-context/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/setContext/non-serializable-context/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setContext/non-serializable-context/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/setContext/non-serializable-context/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/setContext/non-serializable-context/test.ts b/dev-packages/node-integration-tests/suites/public-api/setContext/non-serializable-context/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setContext/non-serializable-context/test.ts rename to dev-packages/node-integration-tests/suites/public-api/setContext/non-serializable-context/test.ts diff --git a/packages/node-integration-tests/suites/public-api/setContext/simple-context/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/setContext/simple-context/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setContext/simple-context/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/setContext/simple-context/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/setContext/simple-context/test.ts b/dev-packages/node-integration-tests/suites/public-api/setContext/simple-context/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setContext/simple-context/test.ts rename to dev-packages/node-integration-tests/suites/public-api/setContext/simple-context/test.ts diff --git a/packages/node-integration-tests/suites/public-api/setExtra/multiple-extras/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/setExtra/multiple-extras/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setExtra/multiple-extras/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/setExtra/multiple-extras/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/setExtra/multiple-extras/test.ts b/dev-packages/node-integration-tests/suites/public-api/setExtra/multiple-extras/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setExtra/multiple-extras/test.ts rename to dev-packages/node-integration-tests/suites/public-api/setExtra/multiple-extras/test.ts diff --git a/packages/node-integration-tests/suites/public-api/setExtra/non-serializable-extra/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/setExtra/non-serializable-extra/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setExtra/non-serializable-extra/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/setExtra/non-serializable-extra/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/setExtra/non-serializable-extra/test.ts b/dev-packages/node-integration-tests/suites/public-api/setExtra/non-serializable-extra/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setExtra/non-serializable-extra/test.ts rename to dev-packages/node-integration-tests/suites/public-api/setExtra/non-serializable-extra/test.ts diff --git a/packages/node-integration-tests/suites/public-api/setExtra/simple-extra/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/setExtra/simple-extra/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setExtra/simple-extra/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/setExtra/simple-extra/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/setExtra/simple-extra/test.ts b/dev-packages/node-integration-tests/suites/public-api/setExtra/simple-extra/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setExtra/simple-extra/test.ts rename to dev-packages/node-integration-tests/suites/public-api/setExtra/simple-extra/test.ts diff --git a/packages/node-integration-tests/suites/public-api/setExtras/consecutive-calls/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/setExtras/consecutive-calls/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setExtras/consecutive-calls/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/setExtras/consecutive-calls/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/setExtras/consecutive-calls/test.ts b/dev-packages/node-integration-tests/suites/public-api/setExtras/consecutive-calls/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setExtras/consecutive-calls/test.ts rename to dev-packages/node-integration-tests/suites/public-api/setExtras/consecutive-calls/test.ts diff --git a/packages/node-integration-tests/suites/public-api/setExtras/multiple-extras/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/setExtras/multiple-extras/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setExtras/multiple-extras/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/setExtras/multiple-extras/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/setExtras/multiple-extras/test.ts b/dev-packages/node-integration-tests/suites/public-api/setExtras/multiple-extras/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setExtras/multiple-extras/test.ts rename to dev-packages/node-integration-tests/suites/public-api/setExtras/multiple-extras/test.ts diff --git a/packages/node-integration-tests/suites/public-api/setTag/with-primitives/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/setTag/with-primitives/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setTag/with-primitives/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/setTag/with-primitives/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/setTag/with-primitives/test.ts b/dev-packages/node-integration-tests/suites/public-api/setTag/with-primitives/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setTag/with-primitives/test.ts rename to dev-packages/node-integration-tests/suites/public-api/setTag/with-primitives/test.ts diff --git a/packages/node-integration-tests/suites/public-api/setTags/with-primitives/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/setTags/with-primitives/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setTags/with-primitives/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/setTags/with-primitives/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/setTags/with-primitives/test.ts b/dev-packages/node-integration-tests/suites/public-api/setTags/with-primitives/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setTags/with-primitives/test.ts rename to dev-packages/node-integration-tests/suites/public-api/setTags/with-primitives/test.ts diff --git a/packages/node-integration-tests/suites/public-api/setUser/unset_user/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/setUser/unset_user/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setUser/unset_user/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/setUser/unset_user/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/setUser/unset_user/test.ts b/dev-packages/node-integration-tests/suites/public-api/setUser/unset_user/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setUser/unset_user/test.ts rename to dev-packages/node-integration-tests/suites/public-api/setUser/unset_user/test.ts diff --git a/packages/node-integration-tests/suites/public-api/setUser/update_user/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/setUser/update_user/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setUser/update_user/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/setUser/update_user/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/setUser/update_user/test.ts b/dev-packages/node-integration-tests/suites/public-api/setUser/update_user/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/setUser/update_user/test.ts rename to dev-packages/node-integration-tests/suites/public-api/setUser/update_user/test.ts diff --git a/packages/node-integration-tests/suites/public-api/startTransaction/basic-usage/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/startTransaction/basic-usage/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/startTransaction/basic-usage/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/startTransaction/basic-usage/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/startTransaction/basic-usage/test.ts b/dev-packages/node-integration-tests/suites/public-api/startTransaction/basic-usage/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/startTransaction/basic-usage/test.ts rename to dev-packages/node-integration-tests/suites/public-api/startTransaction/basic-usage/test.ts diff --git a/packages/node-integration-tests/suites/public-api/startTransaction/with-nested-spans/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/startTransaction/with-nested-spans/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/startTransaction/with-nested-spans/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/startTransaction/with-nested-spans/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/startTransaction/with-nested-spans/test.ts b/dev-packages/node-integration-tests/suites/public-api/startTransaction/with-nested-spans/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/startTransaction/with-nested-spans/test.ts rename to dev-packages/node-integration-tests/suites/public-api/startTransaction/with-nested-spans/test.ts diff --git a/packages/node-integration-tests/suites/public-api/withScope/nested-scopes/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/withScope/nested-scopes/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/withScope/nested-scopes/scenario.ts rename to dev-packages/node-integration-tests/suites/public-api/withScope/nested-scopes/scenario.ts diff --git a/packages/node-integration-tests/suites/public-api/withScope/nested-scopes/test.ts b/dev-packages/node-integration-tests/suites/public-api/withScope/nested-scopes/test.ts similarity index 100% rename from packages/node-integration-tests/suites/public-api/withScope/nested-scopes/test.ts rename to dev-packages/node-integration-tests/suites/public-api/withScope/nested-scopes/test.ts diff --git a/packages/node-integration-tests/suites/sessions/crashed-session-aggregate/test.ts b/dev-packages/node-integration-tests/suites/sessions/crashed-session-aggregate/test.ts similarity index 100% rename from packages/node-integration-tests/suites/sessions/crashed-session-aggregate/test.ts rename to dev-packages/node-integration-tests/suites/sessions/crashed-session-aggregate/test.ts diff --git a/packages/node-integration-tests/suites/sessions/errored-session-aggregate/test.ts b/dev-packages/node-integration-tests/suites/sessions/errored-session-aggregate/test.ts similarity index 100% rename from packages/node-integration-tests/suites/sessions/errored-session-aggregate/test.ts rename to dev-packages/node-integration-tests/suites/sessions/errored-session-aggregate/test.ts diff --git a/packages/node-integration-tests/suites/sessions/exited-session-aggregate/test.ts b/dev-packages/node-integration-tests/suites/sessions/exited-session-aggregate/test.ts similarity index 100% rename from packages/node-integration-tests/suites/sessions/exited-session-aggregate/test.ts rename to dev-packages/node-integration-tests/suites/sessions/exited-session-aggregate/test.ts diff --git a/packages/node-integration-tests/suites/sessions/server.ts b/dev-packages/node-integration-tests/suites/sessions/server.ts similarity index 100% rename from packages/node-integration-tests/suites/sessions/server.ts rename to dev-packages/node-integration-tests/suites/sessions/server.ts diff --git a/packages/node-integration-tests/suites/tracing-new/apollo-graphql/scenario.ts b/dev-packages/node-integration-tests/suites/tracing-new/apollo-graphql/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/apollo-graphql/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing-new/apollo-graphql/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing-new/apollo-graphql/test.ts b/dev-packages/node-integration-tests/suites/tracing-new/apollo-graphql/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/apollo-graphql/test.ts rename to dev-packages/node-integration-tests/suites/tracing-new/apollo-graphql/test.ts diff --git a/packages/node-integration-tests/suites/tracing-new/auto-instrument/mongodb/scenario.ts b/dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mongodb/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/auto-instrument/mongodb/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mongodb/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing-new/auto-instrument/mongodb/test.ts b/dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mongodb/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/auto-instrument/mongodb/test.ts rename to dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mongodb/test.ts diff --git a/packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withConnect/scenario.ts b/dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withConnect/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withConnect/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withConnect/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withConnect/test.ts b/dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withConnect/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withConnect/test.ts rename to dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withConnect/test.ts diff --git a/packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutCallback/scenario.ts b/dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutCallback/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutCallback/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutCallback/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutCallback/test.ts b/dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutCallback/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutCallback/test.ts rename to dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutCallback/test.ts diff --git a/packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutConnect/scenario.ts b/dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutConnect/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutConnect/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutConnect/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutConnect/test.ts b/dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutConnect/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutConnect/test.ts rename to dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/mysql/withoutConnect/test.ts diff --git a/packages/node-integration-tests/suites/tracing-new/auto-instrument/pg/scenario.ts b/dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/pg/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/auto-instrument/pg/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/pg/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing-new/auto-instrument/pg/test.ts b/dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/pg/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/auto-instrument/pg/test.ts rename to dev-packages/node-integration-tests/suites/tracing-new/auto-instrument/pg/test.ts diff --git a/packages/node-integration-tests/suites/tracing-new/prisma-orm/docker-compose.yml b/dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/docker-compose.yml similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/prisma-orm/docker-compose.yml rename to dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/docker-compose.yml diff --git a/packages/node-integration-tests/suites/tracing-new/prisma-orm/package.json b/dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/package.json similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/prisma-orm/package.json rename to dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/package.json diff --git a/packages/node-integration-tests/suites/tracing-new/prisma-orm/prisma/migrations/migration_lock.toml b/dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/prisma/migrations/migration_lock.toml similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/prisma-orm/prisma/migrations/migration_lock.toml rename to dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/prisma/migrations/migration_lock.toml diff --git a/packages/node-integration-tests/suites/tracing-new/prisma-orm/prisma/migrations/sentry_test/migration.sql b/dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/prisma/migrations/sentry_test/migration.sql similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/prisma-orm/prisma/migrations/sentry_test/migration.sql rename to dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/prisma/migrations/sentry_test/migration.sql diff --git a/packages/node-integration-tests/suites/tracing-new/prisma-orm/prisma/schema.prisma b/dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/prisma/schema.prisma similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/prisma-orm/prisma/schema.prisma rename to dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/prisma/schema.prisma diff --git a/packages/node-integration-tests/suites/tracing-new/prisma-orm/scenario.ts b/dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/prisma-orm/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing-new/prisma-orm/setup.ts b/dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/setup.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/prisma-orm/setup.ts rename to dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/setup.ts diff --git a/packages/node-integration-tests/suites/tracing-new/prisma-orm/test.ts b/dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/prisma-orm/test.ts rename to dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/test.ts diff --git a/packages/node-integration-tests/suites/tracing-new/prisma-orm/yarn.lock b/dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/yarn.lock similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/prisma-orm/yarn.lock rename to dev-packages/node-integration-tests/suites/tracing-new/prisma-orm/yarn.lock diff --git a/packages/node-integration-tests/suites/tracing-new/tracePropagationTargets/scenario.ts b/dev-packages/node-integration-tests/suites/tracing-new/tracePropagationTargets/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/tracePropagationTargets/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing-new/tracePropagationTargets/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing-new/tracePropagationTargets/test.ts b/dev-packages/node-integration-tests/suites/tracing-new/tracePropagationTargets/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing-new/tracePropagationTargets/test.ts rename to dev-packages/node-integration-tests/suites/tracing-new/tracePropagationTargets/test.ts diff --git a/packages/node-integration-tests/suites/tracing/apollo-graphql/scenario.ts b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing/apollo-graphql/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing/apollo-graphql/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts rename to dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts diff --git a/packages/node-integration-tests/suites/tracing/auto-instrument/mongodb/scenario.ts b/dev-packages/node-integration-tests/suites/tracing/auto-instrument/mongodb/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing/auto-instrument/mongodb/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing/auto-instrument/mongodb/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing/auto-instrument/mongodb/test.ts b/dev-packages/node-integration-tests/suites/tracing/auto-instrument/mongodb/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing/auto-instrument/mongodb/test.ts rename to dev-packages/node-integration-tests/suites/tracing/auto-instrument/mongodb/test.ts diff --git a/packages/node-integration-tests/suites/tracing/auto-instrument/mysql/scenario.ts b/dev-packages/node-integration-tests/suites/tracing/auto-instrument/mysql/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing/auto-instrument/mysql/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing/auto-instrument/mysql/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing/auto-instrument/mysql/test.ts b/dev-packages/node-integration-tests/suites/tracing/auto-instrument/mysql/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing/auto-instrument/mysql/test.ts rename to dev-packages/node-integration-tests/suites/tracing/auto-instrument/mysql/test.ts diff --git a/packages/node-integration-tests/suites/tracing/auto-instrument/pg/scenario.ts b/dev-packages/node-integration-tests/suites/tracing/auto-instrument/pg/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing/auto-instrument/pg/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing/auto-instrument/pg/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing/auto-instrument/pg/test.ts b/dev-packages/node-integration-tests/suites/tracing/auto-instrument/pg/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing/auto-instrument/pg/test.ts rename to dev-packages/node-integration-tests/suites/tracing/auto-instrument/pg/test.ts diff --git a/packages/node-integration-tests/suites/tracing/prisma-orm/docker-compose.yml b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/docker-compose.yml similarity index 100% rename from packages/node-integration-tests/suites/tracing/prisma-orm/docker-compose.yml rename to dev-packages/node-integration-tests/suites/tracing/prisma-orm/docker-compose.yml diff --git a/packages/node-integration-tests/suites/tracing/prisma-orm/package.json b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/package.json similarity index 100% rename from packages/node-integration-tests/suites/tracing/prisma-orm/package.json rename to dev-packages/node-integration-tests/suites/tracing/prisma-orm/package.json diff --git a/packages/node-integration-tests/suites/tracing/prisma-orm/prisma/migrations/migration_lock.toml b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/prisma/migrations/migration_lock.toml similarity index 100% rename from packages/node-integration-tests/suites/tracing/prisma-orm/prisma/migrations/migration_lock.toml rename to dev-packages/node-integration-tests/suites/tracing/prisma-orm/prisma/migrations/migration_lock.toml diff --git a/packages/node-integration-tests/suites/tracing/prisma-orm/prisma/migrations/sentry_test/migration.sql b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/prisma/migrations/sentry_test/migration.sql similarity index 100% rename from packages/node-integration-tests/suites/tracing/prisma-orm/prisma/migrations/sentry_test/migration.sql rename to dev-packages/node-integration-tests/suites/tracing/prisma-orm/prisma/migrations/sentry_test/migration.sql diff --git a/packages/node-integration-tests/suites/tracing/prisma-orm/prisma/schema.prisma b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/prisma/schema.prisma similarity index 100% rename from packages/node-integration-tests/suites/tracing/prisma-orm/prisma/schema.prisma rename to dev-packages/node-integration-tests/suites/tracing/prisma-orm/prisma/schema.prisma diff --git a/packages/node-integration-tests/suites/tracing/prisma-orm/scenario.ts b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing/prisma-orm/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing/prisma-orm/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing/prisma-orm/setup.ts b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/setup.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing/prisma-orm/setup.ts rename to dev-packages/node-integration-tests/suites/tracing/prisma-orm/setup.ts diff --git a/packages/node-integration-tests/suites/tracing/prisma-orm/test.ts b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing/prisma-orm/test.ts rename to dev-packages/node-integration-tests/suites/tracing/prisma-orm/test.ts diff --git a/packages/node-integration-tests/suites/tracing/prisma-orm/yarn.lock b/dev-packages/node-integration-tests/suites/tracing/prisma-orm/yarn.lock similarity index 100% rename from packages/node-integration-tests/suites/tracing/prisma-orm/yarn.lock rename to dev-packages/node-integration-tests/suites/tracing/prisma-orm/yarn.lock diff --git a/packages/node-integration-tests/suites/tracing/tracePropagationTargets/scenario.ts b/dev-packages/node-integration-tests/suites/tracing/tracePropagationTargets/scenario.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing/tracePropagationTargets/scenario.ts rename to dev-packages/node-integration-tests/suites/tracing/tracePropagationTargets/scenario.ts diff --git a/packages/node-integration-tests/suites/tracing/tracePropagationTargets/test.ts b/dev-packages/node-integration-tests/suites/tracing/tracePropagationTargets/test.ts similarity index 100% rename from packages/node-integration-tests/suites/tracing/tracePropagationTargets/test.ts rename to dev-packages/node-integration-tests/suites/tracing/tracePropagationTargets/test.ts diff --git a/packages/node-integration-tests/tsconfig.json b/dev-packages/node-integration-tests/tsconfig.json similarity index 100% rename from packages/node-integration-tests/tsconfig.json rename to dev-packages/node-integration-tests/tsconfig.json diff --git a/packages/node-integration-tests/tsconfig.test.json b/dev-packages/node-integration-tests/tsconfig.test.json similarity index 100% rename from packages/node-integration-tests/tsconfig.test.json rename to dev-packages/node-integration-tests/tsconfig.test.json diff --git a/packages/node-integration-tests/utils/defaults/server.ts b/dev-packages/node-integration-tests/utils/defaults/server.ts similarity index 100% rename from packages/node-integration-tests/utils/defaults/server.ts rename to dev-packages/node-integration-tests/utils/defaults/server.ts diff --git a/packages/node-integration-tests/utils/index.ts b/dev-packages/node-integration-tests/utils/index.ts similarity index 100% rename from packages/node-integration-tests/utils/index.ts rename to dev-packages/node-integration-tests/utils/index.ts diff --git a/packages/node-integration-tests/utils/run-tests.ts b/dev-packages/node-integration-tests/utils/run-tests.ts similarity index 100% rename from packages/node-integration-tests/utils/run-tests.ts rename to dev-packages/node-integration-tests/utils/run-tests.ts diff --git a/packages/node-integration-tests/utils/setup-tests.ts b/dev-packages/node-integration-tests/utils/setup-tests.ts similarity index 100% rename from packages/node-integration-tests/utils/setup-tests.ts rename to dev-packages/node-integration-tests/utils/setup-tests.ts diff --git a/packages/overhead-metrics/.eslintrc.cjs b/dev-packages/overhead-metrics/.eslintrc.cjs similarity index 100% rename from packages/overhead-metrics/.eslintrc.cjs rename to dev-packages/overhead-metrics/.eslintrc.cjs diff --git a/packages/overhead-metrics/.gitignore b/dev-packages/overhead-metrics/.gitignore similarity index 100% rename from packages/overhead-metrics/.gitignore rename to dev-packages/overhead-metrics/.gitignore diff --git a/packages/overhead-metrics/README.md b/dev-packages/overhead-metrics/README.md similarity index 100% rename from packages/overhead-metrics/README.md rename to dev-packages/overhead-metrics/README.md diff --git a/packages/overhead-metrics/configs/README.md b/dev-packages/overhead-metrics/configs/README.md similarity index 100% rename from packages/overhead-metrics/configs/README.md rename to dev-packages/overhead-metrics/configs/README.md diff --git a/packages/overhead-metrics/configs/ci/collect.ts b/dev-packages/overhead-metrics/configs/ci/collect.ts similarity index 100% rename from packages/overhead-metrics/configs/ci/collect.ts rename to dev-packages/overhead-metrics/configs/ci/collect.ts diff --git a/packages/overhead-metrics/configs/ci/env.ts b/dev-packages/overhead-metrics/configs/ci/env.ts similarity index 100% rename from packages/overhead-metrics/configs/ci/env.ts rename to dev-packages/overhead-metrics/configs/ci/env.ts diff --git a/packages/overhead-metrics/configs/ci/process.ts b/dev-packages/overhead-metrics/configs/ci/process.ts similarity index 100% rename from packages/overhead-metrics/configs/ci/process.ts rename to dev-packages/overhead-metrics/configs/ci/process.ts diff --git a/packages/overhead-metrics/configs/dev/collect.ts b/dev-packages/overhead-metrics/configs/dev/collect.ts similarity index 100% rename from packages/overhead-metrics/configs/dev/collect.ts rename to dev-packages/overhead-metrics/configs/dev/collect.ts diff --git a/packages/overhead-metrics/configs/dev/env.ts b/dev-packages/overhead-metrics/configs/dev/env.ts similarity index 100% rename from packages/overhead-metrics/configs/dev/env.ts rename to dev-packages/overhead-metrics/configs/dev/env.ts diff --git a/packages/overhead-metrics/configs/dev/process.ts b/dev-packages/overhead-metrics/configs/dev/process.ts similarity index 100% rename from packages/overhead-metrics/configs/dev/process.ts rename to dev-packages/overhead-metrics/configs/dev/process.ts diff --git a/packages/overhead-metrics/package.json b/dev-packages/overhead-metrics/package.json similarity index 100% rename from packages/overhead-metrics/package.json rename to dev-packages/overhead-metrics/package.json diff --git a/packages/overhead-metrics/src/collector.ts b/dev-packages/overhead-metrics/src/collector.ts similarity index 100% rename from packages/overhead-metrics/src/collector.ts rename to dev-packages/overhead-metrics/src/collector.ts diff --git a/packages/overhead-metrics/src/perf/cpu.ts b/dev-packages/overhead-metrics/src/perf/cpu.ts similarity index 100% rename from packages/overhead-metrics/src/perf/cpu.ts rename to dev-packages/overhead-metrics/src/perf/cpu.ts diff --git a/packages/overhead-metrics/src/perf/memory.ts b/dev-packages/overhead-metrics/src/perf/memory.ts similarity index 100% rename from packages/overhead-metrics/src/perf/memory.ts rename to dev-packages/overhead-metrics/src/perf/memory.ts diff --git a/packages/overhead-metrics/src/perf/network.ts b/dev-packages/overhead-metrics/src/perf/network.ts similarity index 100% rename from packages/overhead-metrics/src/perf/network.ts rename to dev-packages/overhead-metrics/src/perf/network.ts diff --git a/packages/overhead-metrics/src/perf/sampler.ts b/dev-packages/overhead-metrics/src/perf/sampler.ts similarity index 100% rename from packages/overhead-metrics/src/perf/sampler.ts rename to dev-packages/overhead-metrics/src/perf/sampler.ts diff --git a/packages/overhead-metrics/src/results/analyzer.ts b/dev-packages/overhead-metrics/src/results/analyzer.ts similarity index 100% rename from packages/overhead-metrics/src/results/analyzer.ts rename to dev-packages/overhead-metrics/src/results/analyzer.ts diff --git a/packages/overhead-metrics/src/results/metrics-stats.ts b/dev-packages/overhead-metrics/src/results/metrics-stats.ts similarity index 100% rename from packages/overhead-metrics/src/results/metrics-stats.ts rename to dev-packages/overhead-metrics/src/results/metrics-stats.ts diff --git a/packages/overhead-metrics/src/results/pr-comment.ts b/dev-packages/overhead-metrics/src/results/pr-comment.ts similarity index 100% rename from packages/overhead-metrics/src/results/pr-comment.ts rename to dev-packages/overhead-metrics/src/results/pr-comment.ts diff --git a/packages/overhead-metrics/src/results/result.ts b/dev-packages/overhead-metrics/src/results/result.ts similarity index 100% rename from packages/overhead-metrics/src/results/result.ts rename to dev-packages/overhead-metrics/src/results/result.ts diff --git a/packages/overhead-metrics/src/results/results-set.ts b/dev-packages/overhead-metrics/src/results/results-set.ts similarity index 100% rename from packages/overhead-metrics/src/results/results-set.ts rename to dev-packages/overhead-metrics/src/results/results-set.ts diff --git a/packages/overhead-metrics/src/scenarios.ts b/dev-packages/overhead-metrics/src/scenarios.ts similarity index 100% rename from packages/overhead-metrics/src/scenarios.ts rename to dev-packages/overhead-metrics/src/scenarios.ts diff --git a/packages/overhead-metrics/src/util/console.ts b/dev-packages/overhead-metrics/src/util/console.ts similarity index 100% rename from packages/overhead-metrics/src/util/console.ts rename to dev-packages/overhead-metrics/src/util/console.ts diff --git a/packages/overhead-metrics/src/util/git.ts b/dev-packages/overhead-metrics/src/util/git.ts similarity index 100% rename from packages/overhead-metrics/src/util/git.ts rename to dev-packages/overhead-metrics/src/util/git.ts diff --git a/packages/overhead-metrics/src/util/github.ts b/dev-packages/overhead-metrics/src/util/github.ts similarity index 100% rename from packages/overhead-metrics/src/util/github.ts rename to dev-packages/overhead-metrics/src/util/github.ts diff --git a/packages/overhead-metrics/src/util/json.ts b/dev-packages/overhead-metrics/src/util/json.ts similarity index 100% rename from packages/overhead-metrics/src/util/json.ts rename to dev-packages/overhead-metrics/src/util/json.ts diff --git a/packages/overhead-metrics/src/vitals/cls.ts b/dev-packages/overhead-metrics/src/vitals/cls.ts similarity index 100% rename from packages/overhead-metrics/src/vitals/cls.ts rename to dev-packages/overhead-metrics/src/vitals/cls.ts diff --git a/packages/overhead-metrics/src/vitals/fid.ts b/dev-packages/overhead-metrics/src/vitals/fid.ts similarity index 100% rename from packages/overhead-metrics/src/vitals/fid.ts rename to dev-packages/overhead-metrics/src/vitals/fid.ts diff --git a/packages/overhead-metrics/src/vitals/index.ts b/dev-packages/overhead-metrics/src/vitals/index.ts similarity index 100% rename from packages/overhead-metrics/src/vitals/index.ts rename to dev-packages/overhead-metrics/src/vitals/index.ts diff --git a/packages/overhead-metrics/src/vitals/lcp.ts b/dev-packages/overhead-metrics/src/vitals/lcp.ts similarity index 100% rename from packages/overhead-metrics/src/vitals/lcp.ts rename to dev-packages/overhead-metrics/src/vitals/lcp.ts diff --git a/packages/overhead-metrics/test-apps/booking-app/img/house-0.jpg b/dev-packages/overhead-metrics/test-apps/booking-app/img/house-0.jpg similarity index 100% rename from packages/overhead-metrics/test-apps/booking-app/img/house-0.jpg rename to dev-packages/overhead-metrics/test-apps/booking-app/img/house-0.jpg diff --git a/packages/overhead-metrics/test-apps/booking-app/img/house-1.jpg b/dev-packages/overhead-metrics/test-apps/booking-app/img/house-1.jpg similarity index 100% rename from packages/overhead-metrics/test-apps/booking-app/img/house-1.jpg rename to dev-packages/overhead-metrics/test-apps/booking-app/img/house-1.jpg diff --git a/packages/overhead-metrics/test-apps/booking-app/img/house-2.jpg b/dev-packages/overhead-metrics/test-apps/booking-app/img/house-2.jpg similarity index 100% rename from packages/overhead-metrics/test-apps/booking-app/img/house-2.jpg rename to dev-packages/overhead-metrics/test-apps/booking-app/img/house-2.jpg diff --git a/packages/overhead-metrics/test-apps/booking-app/index.html b/dev-packages/overhead-metrics/test-apps/booking-app/index.html similarity index 100% rename from packages/overhead-metrics/test-apps/booking-app/index.html rename to dev-packages/overhead-metrics/test-apps/booking-app/index.html diff --git a/packages/overhead-metrics/test-apps/booking-app/main.js b/dev-packages/overhead-metrics/test-apps/booking-app/main.js similarity index 100% rename from packages/overhead-metrics/test-apps/booking-app/main.js rename to dev-packages/overhead-metrics/test-apps/booking-app/main.js diff --git a/packages/overhead-metrics/test-apps/booking-app/with-replay.html b/dev-packages/overhead-metrics/test-apps/booking-app/with-replay.html similarity index 100% rename from packages/overhead-metrics/test-apps/booking-app/with-replay.html rename to dev-packages/overhead-metrics/test-apps/booking-app/with-replay.html diff --git a/packages/overhead-metrics/test-apps/booking-app/with-sentry.html b/dev-packages/overhead-metrics/test-apps/booking-app/with-sentry.html similarity index 100% rename from packages/overhead-metrics/test-apps/booking-app/with-sentry.html rename to dev-packages/overhead-metrics/test-apps/booking-app/with-sentry.html diff --git a/packages/overhead-metrics/test-apps/jank/README.md b/dev-packages/overhead-metrics/test-apps/jank/README.md similarity index 100% rename from packages/overhead-metrics/test-apps/jank/README.md rename to dev-packages/overhead-metrics/test-apps/jank/README.md diff --git a/packages/overhead-metrics/test-apps/jank/app.js b/dev-packages/overhead-metrics/test-apps/jank/app.js similarity index 100% rename from packages/overhead-metrics/test-apps/jank/app.js rename to dev-packages/overhead-metrics/test-apps/jank/app.js diff --git a/packages/overhead-metrics/test-apps/jank/favicon-96x96.png b/dev-packages/overhead-metrics/test-apps/jank/favicon-96x96.png similarity index 100% rename from packages/overhead-metrics/test-apps/jank/favicon-96x96.png rename to dev-packages/overhead-metrics/test-apps/jank/favicon-96x96.png diff --git a/packages/overhead-metrics/test-apps/jank/index.html b/dev-packages/overhead-metrics/test-apps/jank/index.html similarity index 100% rename from packages/overhead-metrics/test-apps/jank/index.html rename to dev-packages/overhead-metrics/test-apps/jank/index.html diff --git a/packages/overhead-metrics/test-apps/jank/logo-1024px.png b/dev-packages/overhead-metrics/test-apps/jank/logo-1024px.png similarity index 100% rename from packages/overhead-metrics/test-apps/jank/logo-1024px.png rename to dev-packages/overhead-metrics/test-apps/jank/logo-1024px.png diff --git a/packages/overhead-metrics/test-apps/jank/styles.css b/dev-packages/overhead-metrics/test-apps/jank/styles.css similarity index 100% rename from packages/overhead-metrics/test-apps/jank/styles.css rename to dev-packages/overhead-metrics/test-apps/jank/styles.css diff --git a/packages/overhead-metrics/test-apps/jank/with-replay.html b/dev-packages/overhead-metrics/test-apps/jank/with-replay.html similarity index 100% rename from packages/overhead-metrics/test-apps/jank/with-replay.html rename to dev-packages/overhead-metrics/test-apps/jank/with-replay.html diff --git a/packages/overhead-metrics/test-apps/jank/with-sentry.html b/dev-packages/overhead-metrics/test-apps/jank/with-sentry.html similarity index 100% rename from packages/overhead-metrics/test-apps/jank/with-sentry.html rename to dev-packages/overhead-metrics/test-apps/jank/with-sentry.html diff --git a/packages/overhead-metrics/tsconfig.json b/dev-packages/overhead-metrics/tsconfig.json similarity index 100% rename from packages/overhead-metrics/tsconfig.json rename to dev-packages/overhead-metrics/tsconfig.json diff --git a/packages/rollup-utils/README.md b/dev-packages/rollup-utils/README.md similarity index 100% rename from packages/rollup-utils/README.md rename to dev-packages/rollup-utils/README.md diff --git a/packages/rollup-utils/bundleHelpers.mjs b/dev-packages/rollup-utils/bundleHelpers.mjs similarity index 100% rename from packages/rollup-utils/bundleHelpers.mjs rename to dev-packages/rollup-utils/bundleHelpers.mjs diff --git a/packages/rollup-utils/index.mjs b/dev-packages/rollup-utils/index.mjs similarity index 100% rename from packages/rollup-utils/index.mjs rename to dev-packages/rollup-utils/index.mjs diff --git a/packages/rollup-utils/npmHelpers.mjs b/dev-packages/rollup-utils/npmHelpers.mjs similarity index 100% rename from packages/rollup-utils/npmHelpers.mjs rename to dev-packages/rollup-utils/npmHelpers.mjs diff --git a/packages/rollup-utils/package.json b/dev-packages/rollup-utils/package.json similarity index 100% rename from packages/rollup-utils/package.json rename to dev-packages/rollup-utils/package.json diff --git a/packages/rollup-utils/plugins/bundlePlugins.mjs b/dev-packages/rollup-utils/plugins/bundlePlugins.mjs similarity index 100% rename from packages/rollup-utils/plugins/bundlePlugins.mjs rename to dev-packages/rollup-utils/plugins/bundlePlugins.mjs diff --git a/packages/rollup-utils/plugins/extractPolyfillsPlugin.mjs b/dev-packages/rollup-utils/plugins/extractPolyfillsPlugin.mjs similarity index 100% rename from packages/rollup-utils/plugins/extractPolyfillsPlugin.mjs rename to dev-packages/rollup-utils/plugins/extractPolyfillsPlugin.mjs diff --git a/packages/rollup-utils/plugins/index.mjs b/dev-packages/rollup-utils/plugins/index.mjs similarity index 100% rename from packages/rollup-utils/plugins/index.mjs rename to dev-packages/rollup-utils/plugins/index.mjs diff --git a/packages/rollup-utils/plugins/npmPlugins.mjs b/dev-packages/rollup-utils/plugins/npmPlugins.mjs similarity index 100% rename from packages/rollup-utils/plugins/npmPlugins.mjs rename to dev-packages/rollup-utils/plugins/npmPlugins.mjs diff --git a/packages/rollup-utils/polyfills/es5.js b/dev-packages/rollup-utils/polyfills/es5.js similarity index 100% rename from packages/rollup-utils/polyfills/es5.js rename to dev-packages/rollup-utils/polyfills/es5.js diff --git a/packages/rollup-utils/utils.mjs b/dev-packages/rollup-utils/utils.mjs similarity index 100% rename from packages/rollup-utils/utils.mjs rename to dev-packages/rollup-utils/utils.mjs diff --git a/docs/new-sdk-release-checklist.md b/docs/new-sdk-release-checklist.md index ffb101ede0fa..99c952631f01 100644 --- a/docs/new-sdk-release-checklist.md +++ b/docs/new-sdk-release-checklist.md @@ -63,7 +63,7 @@ differ slightly for other SDKs depending on how they are structured and how they correctly for CDN builds. - [ ] Make sure it is added to the - [Verdaccio config](https://github.com/getsentry/sentry-javascript/blob/develop/packages/e2e-tests/verdaccio-config/config.yaml) + [Verdaccio config](https://github.com/getsentry/sentry-javascript/blob/develop/dev-packages/e2e-tests/verdaccio-config/config.yaml) for the E2E tests - [ ] If the package you're adding is a dependency of fullstack framework (e.g. Remix or NextJS) SDKs, make sure that diff --git a/package.json b/package.json index 7a654c2ca2c2..3135af0994db 100644 --- a/package.json +++ b/package.json @@ -47,11 +47,9 @@ "packages/angular-ivy", "packages/astro", "packages/browser", - "packages/browser-integration-tests", "packages/bun", "packages/core", "packages/deno", - "packages/e2e-tests", "packages/ember", "packages/eslint-config-sdk", "packages/eslint-plugin-sdk", @@ -60,10 +58,8 @@ "packages/hub", "packages/integrations", "packages/integration-shims", - "packages/overhead-metrics", "packages/nextjs", "packages/node", - "packages/node-integration-tests", "packages/node-experimental", "packages/opentelemetry-node", "packages/opentelemetry", @@ -71,7 +67,6 @@ "packages/remix", "packages/replay", "packages/replay-worker", - "packages/rollup-utils", "packages/serverless", "packages/svelte", "packages/sveltekit", @@ -82,7 +77,12 @@ "packages/utils", "packages/vercel-edge", "packages/vue", - "packages/wasm" + "packages/wasm", + "dev-packages/browser-integration-tests", + "dev-packages/e2e-tests", + "dev-packages/node-integration-tests", + "dev-packages/overhead-metrics", + "dev-packages/rollup-utils" ], "devDependencies": { "@biomejs/biome": "^1.4.0", diff --git a/packages/nextjs/test/integration/test/client/utils/helpers.ts b/packages/nextjs/test/integration/test/client/utils/helpers.ts index 7a00d2447aa9..37cffb1cd898 100644 --- a/packages/nextjs/test/integration/test/client/utils/helpers.ts +++ b/packages/nextjs/test/integration/test/client/utils/helpers.ts @@ -1 +1 @@ -export * from '../../../../../../browser-integration-tests/utils/helpers'; +export * from '@sentry-internal/browser-integration-tests/utils/helpers'; diff --git a/packages/nextjs/test/integration/test/server/utils/helpers.ts b/packages/nextjs/test/integration/test/server/utils/helpers.ts index 7f463d894513..590590c8710d 100644 --- a/packages/nextjs/test/integration/test/server/utils/helpers.ts +++ b/packages/nextjs/test/integration/test/server/utils/helpers.ts @@ -4,7 +4,7 @@ import { AddressInfo } from 'net'; import * as path from 'path'; import { parse } from 'url'; import next from 'next'; -import { TestEnv } from '../../../../../../node-integration-tests/utils'; +import { TestEnv } from '../../../../../../../dev-packages/node-integration-tests/utils'; // Type not exported from NextJS // @ts-expect-error diff --git a/packages/remix/test/integration/test/client/utils/helpers.ts b/packages/remix/test/integration/test/client/utils/helpers.ts index 7a00d2447aa9..37cffb1cd898 100644 --- a/packages/remix/test/integration/test/client/utils/helpers.ts +++ b/packages/remix/test/integration/test/client/utils/helpers.ts @@ -1 +1 @@ -export * from '../../../../../../browser-integration-tests/utils/helpers'; +export * from '@sentry-internal/browser-integration-tests/utils/helpers'; diff --git a/packages/remix/test/integration/test/server/utils/helpers.ts b/packages/remix/test/integration/test/server/utils/helpers.ts index 3842ef778ca2..caf9d5525fd7 100644 --- a/packages/remix/test/integration/test/server/utils/helpers.ts +++ b/packages/remix/test/integration/test/server/utils/helpers.ts @@ -3,9 +3,9 @@ import { AddressInfo } from 'net'; import { createRequestHandler } from '@remix-run/express'; import { wrapExpressCreateRequestHandler } from '@sentry/remix'; import express from 'express'; -import { TestEnv } from '../../../../../../node-integration-tests/utils'; +import { TestEnv } from '../../../../../../../dev-packages/node-integration-tests/utils'; -export * from '../../../../../../node-integration-tests/utils'; +export * from '../../../../../../../dev-packages/node-integration-tests/utils'; export class RemixTestEnv extends TestEnv { private constructor(public readonly server: http.Server, public readonly url: string) { From f127479a5aba07fb4eebb856045cb4a1733d45ab Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 3 Jan 2024 10:41:02 +0100 Subject: [PATCH 29/51] ref(node): Refactor node integrations to functional syntax (#9959) Getting there... --- packages/core/src/integration.ts | 4 +- packages/node/src/index.ts | 19 +- packages/node/src/integrations/anr/index.ts | 176 +++++++++--------- packages/node/src/integrations/console.ts | 68 +++---- packages/node/src/integrations/context.ts | 93 ++++----- .../node/src/integrations/contextlines.ts | 150 +++++++-------- packages/node/src/integrations/hapi/index.ts | 68 +++---- packages/node/src/integrations/modules.ts | 48 ++--- .../src/integrations/onuncaughtexception.ts | 59 ++---- .../src/integrations/onunhandledrejection.ts | 43 ++--- packages/node/src/integrations/spotlight.ts | 52 +++--- .../contextlines.test.ts} | 12 +- 12 files changed, 346 insertions(+), 446 deletions(-) rename packages/node/test/{context-lines.test.ts => integrations/contextlines.test.ts} (88%) diff --git a/packages/core/src/integration.ts b/packages/core/src/integration.ts index d587ddb55ce8..f9be8b325782 100644 --- a/packages/core/src/integration.ts +++ b/packages/core/src/integration.ts @@ -165,7 +165,7 @@ function findIndex(arr: T[], callback: (item: T) => boolean): number { export function convertIntegrationFnToClass( name: string, fn: Fn, -): { +): Integration & { id: string; new (...args: Parameters): Integration & ReturnType & { @@ -182,7 +182,7 @@ export function convertIntegrationFnToClass( }; }, { id: name }, - ) as unknown as { + ) as unknown as Integration & { id: string; new (...args: Parameters): Integration & ReturnType & { diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index 36d2d8beac53..c1db9de54194 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -86,6 +86,7 @@ export { getModuleFromFilename } from './module'; export { enableAnrDetection } from './integrations/anr/legacy'; import { Integrations as CoreIntegrations } from '@sentry/core'; +import type { Integration, IntegrationClass } from '@sentry/types'; import * as Handlers from './handlers'; import * as NodeIntegrations from './integrations'; @@ -93,7 +94,23 @@ import * as TracingIntegrations from './tracing/integrations'; const INTEGRATIONS = { ...CoreIntegrations, - ...NodeIntegrations, + // This typecast is somehow needed for now, probably because of the convertIntegrationFnToClass TS shenanigans + // This is OK for now but should be resolved in v8 when we just pass the functional integrations directly + ...(NodeIntegrations as { + Console: IntegrationClass; + Http: typeof NodeIntegrations.Http; + OnUncaughtException: IntegrationClass; + OnUnhandledRejection: IntegrationClass; + Modules: IntegrationClass; + ContextLines: IntegrationClass; + Context: IntegrationClass; + RequestData: IntegrationClass; + LocalVariables: IntegrationClass; + Undici: typeof NodeIntegrations.Undici; + Spotlight: IntegrationClass; + Anr: IntegrationClass; + Hapi: IntegrationClass; + }), ...TracingIntegrations, }; diff --git a/packages/node/src/integrations/anr/index.ts b/packages/node/src/integrations/anr/index.ts index 70c20962fca2..47bc13a34ecd 100644 --- a/packages/node/src/integrations/anr/index.ts +++ b/packages/node/src/integrations/anr/index.ts @@ -1,7 +1,7 @@ // TODO (v8): This import can be removed once we only support Node with global URL import { URL } from 'url'; -import { getCurrentScope } from '@sentry/core'; -import type { Contexts, Event, EventHint, Integration } from '@sentry/types'; +import { convertIntegrationFnToClass, getCurrentScope } from '@sentry/core'; +import type { Contexts, Event, EventHint, IntegrationFn } from '@sentry/types'; import { dynamicRequire, logger } from '@sentry/utils'; import type { Worker, WorkerOptions } from 'worker_threads'; import type { NodeClient } from '../../client'; @@ -50,108 +50,106 @@ interface InspectorApi { url: () => string | undefined; } +const INTEGRATION_NAME = 'Anr'; + +const anrIntegration = ((options: Partial = {}) => { + return { + name: INTEGRATION_NAME, + setup(client: NodeClient) { + if (NODE_VERSION.major < 16) { + throw new Error('ANR detection requires Node 16 or later'); + } + + // setImmediate is used to ensure that all other integrations have been setup + setImmediate(() => _startWorker(client, options)); + }, + }; +}) satisfies IntegrationFn; + /** * Starts a thread to detect App Not Responding (ANR) events */ -export class Anr implements Integration { - public name: string = 'Anr'; +// eslint-disable-next-line deprecation/deprecation +export const Anr = convertIntegrationFnToClass(INTEGRATION_NAME, anrIntegration); - public constructor(private readonly _options: Partial = {}) {} +/** + * Starts the ANR worker thread + */ +async function _startWorker(client: NodeClient, _options: Partial): Promise { + const contexts = await getContexts(client); + const dsn = client.getDsn(); - /** @inheritdoc */ - public setupOnce(): void { - // Do nothing + if (!dsn) { + return; } - /** @inheritdoc */ - public setup(client: NodeClient): void { - if (NODE_VERSION.major < 16) { - throw new Error('ANR detection requires Node 16 or later'); - } + // These will not be accurate if sent later from the worker thread + delete contexts.app?.app_memory; + delete contexts.device?.free_memory; - // setImmediate is used to ensure that all other integrations have been setup - setImmediate(() => this._startWorker(client)); - } + const initOptions = client.getOptions(); - /** - * Starts the ANR worker thread - */ - private async _startWorker(client: NodeClient): Promise { - const contexts = await getContexts(client); - const dsn = client.getDsn(); + const sdkMetadata = client.getSdkMetadata() || {}; + if (sdkMetadata.sdk) { + sdkMetadata.sdk.integrations = initOptions.integrations.map(i => i.name); + } - if (!dsn) { - return; + const options: WorkerStartData = { + debug: logger.isEnabled(), + dsn, + environment: initOptions.environment || 'production', + release: initOptions.release, + dist: initOptions.dist, + sdkMetadata, + pollInterval: _options.pollInterval || DEFAULT_INTERVAL, + anrThreshold: _options.anrThreshold || DEFAULT_HANG_THRESHOLD, + captureStackTrace: !!_options.captureStackTrace, + contexts, + }; + + if (options.captureStackTrace) { + // eslint-disable-next-line @typescript-eslint/no-var-requires + const inspector: InspectorApi = require('inspector'); + if (!inspector.url()) { + inspector.open(0); } + } - // These will not be accurate if sent later from the worker thread - delete contexts.app?.app_memory; - delete contexts.device?.free_memory; - - const initOptions = client.getOptions(); - - const sdkMetadata = client.getSdkMetadata() || {}; - if (sdkMetadata.sdk) { - sdkMetadata.sdk.integrations = initOptions.integrations.map(i => i.name); + const { Worker } = getWorkerThreads(); + + const worker = new Worker(new URL(`data:application/javascript;base64,${base64WorkerScript}`), { + workerData: options, + }); + // Ensure this thread can't block app exit + worker.unref(); + + const timer = setInterval(() => { + try { + const currentSession = getCurrentScope().getSession(); + // We need to copy the session object and remove the toJSON method so it can be sent to the worker + // serialized without making it a SerializedSession + const session = currentSession ? { ...currentSession, toJSON: undefined } : undefined; + // message the worker to tell it the main event loop is still running + worker.postMessage({ session }); + } catch (_) { + // } + }, options.pollInterval); - const options: WorkerStartData = { - debug: logger.isEnabled(), - dsn, - environment: initOptions.environment || 'production', - release: initOptions.release, - dist: initOptions.dist, - sdkMetadata, - pollInterval: this._options.pollInterval || DEFAULT_INTERVAL, - anrThreshold: this._options.anrThreshold || DEFAULT_HANG_THRESHOLD, - captureStackTrace: !!this._options.captureStackTrace, - contexts, - }; - - if (options.captureStackTrace) { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const inspector: InspectorApi = require('inspector'); - if (!inspector.url()) { - inspector.open(0); - } + worker.on('message', (msg: string) => { + if (msg === 'session-ended') { + log('ANR event sent from ANR worker. Clearing session in this thread.'); + getCurrentScope().setSession(undefined); } + }); - const { Worker } = getWorkerThreads(); - - const worker = new Worker(new URL(`data:application/javascript;base64,${base64WorkerScript}`), { - workerData: options, - }); - // Ensure this thread can't block app exit - worker.unref(); - - const timer = setInterval(() => { - try { - const currentSession = getCurrentScope().getSession(); - // We need to copy the session object and remove the toJSON method so it can be sent to the worker - // serialized without making it a SerializedSession - const session = currentSession ? { ...currentSession, toJSON: undefined } : undefined; - // message the worker to tell it the main event loop is still running - worker.postMessage({ session }); - } catch (_) { - // - } - }, options.pollInterval); + worker.once('error', (err: Error) => { + clearInterval(timer); + log('ANR worker error', err); + }); - worker.on('message', (msg: string) => { - if (msg === 'session-ended') { - log('ANR event sent from ANR worker. Clearing session in this thread.'); - getCurrentScope().setSession(undefined); - } - }); - - worker.once('error', (err: Error) => { - clearInterval(timer); - log('ANR worker error', err); - }); - - worker.once('exit', (code: number) => { - clearInterval(timer); - log('ANR worker exit', code); - }); - } + worker.once('exit', (code: number) => { + clearInterval(timer); + log('ANR worker exit', code); + }); } diff --git a/packages/node/src/integrations/console.ts b/packages/node/src/integrations/console.ts index 008d3fba591b..d0243d7e3985 100644 --- a/packages/node/src/integrations/console.ts +++ b/packages/node/src/integrations/console.ts @@ -1,45 +1,35 @@ import * as util from 'util'; -import { addBreadcrumb, getClient } from '@sentry/core'; -import type { Client, Integration } from '@sentry/types'; +import { addBreadcrumb, convertIntegrationFnToClass, getClient } from '@sentry/core'; +import type { IntegrationFn } from '@sentry/types'; import { addConsoleInstrumentationHandler, severityLevelFromString } from '@sentry/utils'; -/** Console module integration */ -export class Console implements Integration { - /** - * @inheritDoc - */ - public static id: string = 'Console'; - - /** - * @inheritDoc - */ - public name: string = Console.id; +const INTEGRATION_NAME = 'Console'; - /** - * @inheritDoc - */ - public setupOnce(): void { - // noop - } +const consoleIntegration = (() => { + return { + name: INTEGRATION_NAME, + setup(client) { + addConsoleInstrumentationHandler(({ args, level }) => { + if (getClient() !== client) { + return; + } - /** @inheritdoc */ - public setup(client: Client): void { - addConsoleInstrumentationHandler(({ args, level }) => { - if (getClient() !== client) { - return; - } + addBreadcrumb( + { + category: 'console', + level: severityLevelFromString(level), + message: util.format.apply(undefined, args), + }, + { + input: [...args], + level, + }, + ); + }); + }, + }; +}) satisfies IntegrationFn; - addBreadcrumb( - { - category: 'console', - level: severityLevelFromString(level), - message: util.format.apply(undefined, args), - }, - { - input: [...args], - level, - }, - ); - }); - } -} +/** Console module integration */ +// eslint-disable-next-line deprecation/deprecation +export const Console = convertIntegrationFnToClass(INTEGRATION_NAME, consoleIntegration); diff --git a/packages/node/src/integrations/context.ts b/packages/node/src/integrations/context.ts index ee565c8676e7..2b16ec6a4527 100644 --- a/packages/node/src/integrations/context.ts +++ b/packages/node/src/integrations/context.ts @@ -1,9 +1,10 @@ +/* eslint-disable max-lines */ import { execFile } from 'child_process'; import { readFile, readdir } from 'fs'; import * as os from 'os'; import { join } from 'path'; import { promisify } from 'util'; -/* eslint-disable max-lines */ +import { convertIntegrationFnToClass } from '@sentry/core'; import type { AppContext, CloudResourceContext, @@ -11,7 +12,7 @@ import type { CultureContext, DeviceContext, Event, - Integration, + IntegrationFn, OsContext, } from '@sentry/types'; @@ -19,6 +20,8 @@ import type { export const readFileAsync = promisify(readFile); export const readDirAsync = promisify(readdir); +const INTEGRATION_NAME = 'Context'; + interface DeviceContextOptions { cpu?: boolean; memory?: boolean; @@ -32,52 +35,24 @@ interface ContextOptions { cloudResource?: boolean; } -/** Add node modules / packages to the event */ -export class Context implements Integration { - /** - * @inheritDoc - */ - public static id: string = 'Context'; - - /** - * @inheritDoc - */ - public name: string = Context.id; - - /** - * Caches context so it's only evaluated once - */ - private _cachedContext: Promise | undefined; - - public constructor( - private readonly _options: ContextOptions = { - app: true, - os: true, - device: true, - culture: true, - cloudResource: true, - }, - ) {} - - /** @inheritDoc */ - public setupOnce(_addGlobaleventProcessor: unknown, _getCurrentHub: unknown): void { - // noop - } +const contextIntegration = ((options: ContextOptions = {}) => { + let cachedContext: Promise | undefined; - /** @inheritDoc */ - public processEvent(event: Event): Promise { - return this.addContext(event); - } + const _options = { + app: true, + os: true, + device: true, + culture: true, + cloudResource: true, + ...options, + }; - /** - * Processes an event and adds context. - */ - public async addContext(event: Event): Promise { - if (this._cachedContext === undefined) { - this._cachedContext = this._getContexts(); + async function addContext(event: Event): Promise { + if (cachedContext === undefined) { + cachedContext = _getContexts(); } - const updatedContext = _updateContext(await this._cachedContext); + const updatedContext = _updateContext(await cachedContext); event.contexts = { ...event.contexts, @@ -91,25 +66,22 @@ export class Context implements Integration { return event; } - /** - * Gets the contexts for the current environment - */ - private async _getContexts(): Promise { + async function _getContexts(): Promise { const contexts: Contexts = {}; - if (this._options.os) { + if (_options.os) { contexts.os = await getOsContext(); } - if (this._options.app) { + if (_options.app) { contexts.app = getAppContext(); } - if (this._options.device) { - contexts.device = getDeviceContext(this._options.device); + if (_options.device) { + contexts.device = getDeviceContext(_options.device); } - if (this._options.culture) { + if (_options.culture) { const culture = getCultureContext(); if (culture) { @@ -117,13 +89,24 @@ export class Context implements Integration { } } - if (this._options.cloudResource) { + if (_options.cloudResource) { contexts.cloud_resource = getCloudResourceContext(); } return contexts; } -} + + return { + name: INTEGRATION_NAME, + processEvent(event) { + return addContext(event); + }, + }; +}) satisfies IntegrationFn; + +/** Add node modules / packages to the event */ +// eslint-disable-next-line deprecation/deprecation +export const Context = convertIntegrationFnToClass(INTEGRATION_NAME, contextIntegration); /** * Updates the context with dynamic values that can change diff --git a/packages/node/src/integrations/contextlines.ts b/packages/node/src/integrations/contextlines.ts index 2cc9375a879a..0a961ddbc259 100644 --- a/packages/node/src/integrations/contextlines.ts +++ b/packages/node/src/integrations/contextlines.ts @@ -1,9 +1,11 @@ import { readFile } from 'fs'; -import type { Event, EventProcessor, Hub, Integration, StackFrame } from '@sentry/types'; +import { convertIntegrationFnToClass } from '@sentry/core'; +import type { Event, IntegrationFn, StackFrame } from '@sentry/types'; import { LRUMap, addContextToFrame } from '@sentry/utils'; const FILE_CONTENT_CACHE = new LRUMap(100); const DEFAULT_LINES_OF_CONTEXT = 7; +const INTEGRATION_NAME = 'ContextLines'; // TODO: Replace with promisify when minimum supported node >= v8 function readTextFileAsync(path: string): Promise { @@ -33,102 +35,80 @@ interface ContextLinesOptions { frameContextLines?: number; } -/** Add node modules / packages to the event */ -export class ContextLines implements Integration { - /** - * @inheritDoc - */ - public static id: string = 'ContextLines'; - - /** - * @inheritDoc - */ - public name: string = ContextLines.id; - - public constructor(private readonly _options: ContextLinesOptions = {}) {} +const contextLinesIntegration = ((options: ContextLinesOptions = {}) => { + const contextLines = options.frameContextLines !== undefined ? options.frameContextLines : DEFAULT_LINES_OF_CONTEXT; - /** Get's the number of context lines to add */ - private get _contextLines(): number { - return this._options.frameContextLines !== undefined ? this._options.frameContextLines : DEFAULT_LINES_OF_CONTEXT; - } - - /** - * @inheritDoc - */ - public setupOnce(_addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void { - // noop - } - - /** @inheritDoc */ - public processEvent(event: Event): Promise { - return this.addSourceContext(event); - } + return { + name: INTEGRATION_NAME, + processEvent(event) { + return addSourceContext(event, contextLines); + }, + }; +}) satisfies IntegrationFn; - /** Processes an event and adds context lines */ - public async addSourceContext(event: Event): Promise { - // keep a lookup map of which files we've already enqueued to read, - // so we don't enqueue the same file multiple times which would cause multiple i/o reads - const enqueuedReadSourceFileTasks: Record = {}; - const readSourceFileTasks: Promise[] = []; - - if (this._contextLines > 0 && event.exception?.values) { - for (const exception of event.exception.values) { - if (!exception.stacktrace?.frames) { - continue; - } +/** Add node modules / packages to the event */ +// eslint-disable-next-line deprecation/deprecation +export const ContextLines = convertIntegrationFnToClass(INTEGRATION_NAME, contextLinesIntegration); + +async function addSourceContext(event: Event, contextLines: number): Promise { + // keep a lookup map of which files we've already enqueued to read, + // so we don't enqueue the same file multiple times which would cause multiple i/o reads + const enqueuedReadSourceFileTasks: Record = {}; + const readSourceFileTasks: Promise[] = []; + + if (contextLines > 0 && event.exception?.values) { + for (const exception of event.exception.values) { + if (!exception.stacktrace?.frames) { + continue; + } - // We want to iterate in reverse order as calling cache.get will bump the file in our LRU cache. - // This ends up prioritizes source context for frames at the top of the stack instead of the bottom. - for (let i = exception.stacktrace.frames.length - 1; i >= 0; i--) { - const frame = exception.stacktrace.frames[i]; - // Call cache.get to bump the file to the top of the cache and ensure we have not already - // enqueued a read operation for this filename - if ( - frame.filename && - !enqueuedReadSourceFileTasks[frame.filename] && - !FILE_CONTENT_CACHE.get(frame.filename) - ) { - readSourceFileTasks.push(_readSourceFile(frame.filename)); - enqueuedReadSourceFileTasks[frame.filename] = 1; - } + // We want to iterate in reverse order as calling cache.get will bump the file in our LRU cache. + // This ends up prioritizes source context for frames at the top of the stack instead of the bottom. + for (let i = exception.stacktrace.frames.length - 1; i >= 0; i--) { + const frame = exception.stacktrace.frames[i]; + // Call cache.get to bump the file to the top of the cache and ensure we have not already + // enqueued a read operation for this filename + if (frame.filename && !enqueuedReadSourceFileTasks[frame.filename] && !FILE_CONTENT_CACHE.get(frame.filename)) { + readSourceFileTasks.push(_readSourceFile(frame.filename)); + enqueuedReadSourceFileTasks[frame.filename] = 1; } } } + } - // check if files to read > 0, if so, await all of them to be read before adding source contexts. - // Normally, Promise.all here could be short circuited if one of the promises rejects, but we - // are guarding from that by wrapping the i/o read operation in a try/catch. - if (readSourceFileTasks.length > 0) { - await Promise.all(readSourceFileTasks); - } + // check if files to read > 0, if so, await all of them to be read before adding source contexts. + // Normally, Promise.all here could be short circuited if one of the promises rejects, but we + // are guarding from that by wrapping the i/o read operation in a try/catch. + if (readSourceFileTasks.length > 0) { + await Promise.all(readSourceFileTasks); + } - // Perform the same loop as above, but this time we can assume all files are in the cache - // and attempt to add source context to frames. - if (this._contextLines > 0 && event.exception?.values) { - for (const exception of event.exception.values) { - if (exception.stacktrace && exception.stacktrace.frames) { - await this.addSourceContextToFrames(exception.stacktrace.frames); - } + // Perform the same loop as above, but this time we can assume all files are in the cache + // and attempt to add source context to frames. + if (contextLines > 0 && event.exception?.values) { + for (const exception of event.exception.values) { + if (exception.stacktrace && exception.stacktrace.frames) { + await addSourceContextToFrames(exception.stacktrace.frames, contextLines); } } - - return event; } - /** Adds context lines to frames */ - public addSourceContextToFrames(frames: StackFrame[]): void { - for (const frame of frames) { - // Only add context if we have a filename and it hasn't already been added - if (frame.filename && frame.context_line === undefined) { - const sourceFileLines = FILE_CONTENT_CACHE.get(frame.filename); - - if (sourceFileLines) { - try { - addContextToFrame(sourceFileLines, frame, this._contextLines); - } catch (e) { - // anomaly, being defensive in case - // unlikely to ever happen in practice but can definitely happen in theory - } + return event; +} + +/** Adds context lines to frames */ +function addSourceContextToFrames(frames: StackFrame[], contextLines: number): void { + for (const frame of frames) { + // Only add context if we have a filename and it hasn't already been added + if (frame.filename && frame.context_line === undefined) { + const sourceFileLines = FILE_CONTENT_CACHE.get(frame.filename); + + if (sourceFileLines) { + try { + addContextToFrame(sourceFileLines, frame, contextLines); + } catch (e) { + // anomaly, being defensive in case + // unlikely to ever happen in practice but can definitely happen in theory } } } diff --git a/packages/node/src/integrations/hapi/index.ts b/packages/node/src/integrations/hapi/index.ts index d63b831da4e2..15ff63be5f70 100644 --- a/packages/node/src/integrations/hapi/index.ts +++ b/packages/node/src/integrations/hapi/index.ts @@ -2,11 +2,12 @@ import { SDK_VERSION, captureException, continueTrace, + convertIntegrationFnToClass, getActiveTransaction, getCurrentScope, startTransaction, } from '@sentry/core'; -import type { Integration } from '@sentry/types'; +import type { IntegrationFn } from '@sentry/types'; import { dynamicSamplingContextToSentryBaggageHeader, fill } from '@sentry/utils'; import type { Boom, RequestEvent, ResponseObject, Server } from './types'; @@ -128,45 +129,32 @@ export type HapiOptions = { server?: Record; }; +const INTEGRATION_NAME = 'Hapi'; + +const hapiIntegration = ((options: HapiOptions = {}) => { + const server = options.server as undefined | Server; + + return { + name: INTEGRATION_NAME, + setupOnce() { + if (!server) { + return; + } + + fill(server, 'start', (originalStart: () => void) => { + return async function (this: Server) { + await this.register(hapiTracingPlugin); + await this.register(hapiErrorPlugin); + const result = originalStart.apply(this); + return result; + }; + }); + }, + }; +}) satisfies IntegrationFn; + /** * Hapi Framework Integration */ -export class Hapi implements Integration { - /** - * @inheritDoc - */ - public static id: string = 'Hapi'; - - /** - * @inheritDoc - */ - public name: string; - - public _hapiServer: Server | undefined; - - public constructor(options?: HapiOptions) { - if (options?.server) { - const server = options.server as unknown as Server; - - this._hapiServer = server; - } - - this.name = Hapi.id; - } - - /** @inheritDoc */ - public setupOnce(): void { - if (!this._hapiServer) { - return; - } - - fill(this._hapiServer, 'start', (originalStart: () => void) => { - return async function (this: Server) { - await this.register(hapiTracingPlugin); - await this.register(hapiErrorPlugin); - const result = originalStart.apply(this); - return result; - }; - }); - } -} +// eslint-disable-next-line deprecation/deprecation +export const Hapi = convertIntegrationFnToClass(INTEGRATION_NAME, hapiIntegration); diff --git a/packages/node/src/integrations/modules.ts b/packages/node/src/integrations/modules.ts index cc8ecf621bb9..ad6549dd3b3b 100644 --- a/packages/node/src/integrations/modules.ts +++ b/packages/node/src/integrations/modules.ts @@ -1,9 +1,12 @@ import { existsSync, readFileSync } from 'fs'; import { dirname, join } from 'path'; -import type { Event, EventProcessor, Hub, Integration } from '@sentry/types'; +import { convertIntegrationFnToClass } from '@sentry/core'; +import type { IntegrationFn } from '@sentry/types'; let moduleCache: { [key: string]: string }; +const INTEGRATION_NAME = 'Modules'; + /** Extract information about paths */ function getPaths(): string[] { try { @@ -73,33 +76,20 @@ function _getModules(): { [key: string]: string } { return moduleCache; } -/** Add node modules / packages to the event */ -export class Modules implements Integration { - /** - * @inheritDoc - */ - public static id: string = 'Modules'; - - /** - * @inheritDoc - */ - public name: string = Modules.id; - - /** - * @inheritDoc - */ - public setupOnce(_addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void { - // noop - } - - /** @inheritdoc */ - public processEvent(event: Event): Event { - return { - ...event, - modules: { +const modulesIntegration = (() => { + return { + name: INTEGRATION_NAME, + processEvent(event) { + event.modules = { ...event.modules, ..._getModules(), - }, - }; - } -} + }; + + return event; + }, + }; +}) satisfies IntegrationFn; + +/** Add node modules / packages to the event */ +// eslint-disable-next-line deprecation/deprecation +export const Modules = convertIntegrationFnToClass(INTEGRATION_NAME, modulesIntegration); diff --git a/packages/node/src/integrations/onuncaughtexception.ts b/packages/node/src/integrations/onuncaughtexception.ts index d6e1b50a4eb9..e9c724f89e7f 100644 --- a/packages/node/src/integrations/onuncaughtexception.ts +++ b/packages/node/src/integrations/onuncaughtexception.ts @@ -1,6 +1,6 @@ -import { captureException } from '@sentry/core'; +import { captureException, convertIntegrationFnToClass } from '@sentry/core'; import { getClient } from '@sentry/core'; -import type { Integration } from '@sentry/types'; +import type { IntegrationFn } from '@sentry/types'; import { logger } from '@sentry/utils'; import type { NodeClient } from '../client'; @@ -38,50 +38,25 @@ interface OnUncaughtExceptionOptions { onFatalError?(this: void, firstError: Error, secondError?: Error): void; } -/** Global Exception handler */ -export class OnUncaughtException implements Integration { - /** - * @inheritDoc - */ - public static id: string = 'OnUncaughtException'; +const INTEGRATION_NAME = 'OnUncaughtException'; - /** - * @inheritDoc - */ - public name: string = OnUncaughtException.id; - - // CAREFUL: Please think twice before updating the way _options looks because the Next.js SDK depends on it in `index.server.ts` - private readonly _options: OnUncaughtExceptionOptions; - - /** - * @inheritDoc - */ - public constructor(options: Partial = {}) { - this._options = { - exitEvenIfOtherHandlersAreRegistered: true, - ...options, - }; - } +const onUncaughtExceptionIntegration = ((options: Partial = {}) => { + const _options = { + exitEvenIfOtherHandlersAreRegistered: true, + ...options, + }; - /** - * @deprecated This does nothing anymore. - */ - public readonly handler: (error: Error) => void = () => { - // noop + return { + name: INTEGRATION_NAME, + setup(client: NodeClient) { + global.process.on('uncaughtException', makeErrorHandler(client, _options)); + }, }; +}) satisfies IntegrationFn; - /** - * @inheritDoc - */ - public setupOnce(): void { - // noop - } - - /** @inheritdoc */ - public setup(client: NodeClient): void { - global.process.on('uncaughtException', makeErrorHandler(client, this._options)); - } -} +/** Global Exception handler */ +// eslint-disable-next-line deprecation/deprecation +export const OnUncaughtException = convertIntegrationFnToClass(INTEGRATION_NAME, onUncaughtExceptionIntegration); type ErrorHandler = { _errorHandler: boolean } & ((error: Error) => void); diff --git a/packages/node/src/integrations/onunhandledrejection.ts b/packages/node/src/integrations/onunhandledrejection.ts index cc5209233761..85caecf9cafc 100644 --- a/packages/node/src/integrations/onunhandledrejection.ts +++ b/packages/node/src/integrations/onunhandledrejection.ts @@ -1,5 +1,5 @@ -import { captureException, getClient } from '@sentry/core'; -import type { Client, Integration } from '@sentry/types'; +import { captureException, convertIntegrationFnToClass, getClient } from '@sentry/core'; +import type { Client, IntegrationFn } from '@sentry/types'; import { consoleSandbox } from '@sentry/utils'; import { logAndExitProcess } from './utils/errorhandling'; @@ -14,35 +14,22 @@ interface OnUnhandledRejectionOptions { mode: UnhandledRejectionMode; } -/** Global Promise Rejection handler */ -export class OnUnhandledRejection implements Integration { - /** - * @inheritDoc - */ - public static id: string = 'OnUnhandledRejection'; - - /** - * @inheritDoc - */ - public name: string = OnUnhandledRejection.id; +const INTEGRATION_NAME = 'OnUnhandledRejection'; - /** - * @inheritDoc - */ - public constructor(private readonly _options: OnUnhandledRejectionOptions = { mode: 'warn' }) {} +const onUnhandledRejectionIntegration = ((options: Partial = {}) => { + const mode = options.mode || 'warn'; - /** - * @inheritDoc - */ - public setupOnce(): void { - // noop - } + return { + name: INTEGRATION_NAME, + setup(client) { + global.process.on('unhandledRejection', makeUnhandledPromiseHandler(client, { mode })); + }, + }; +}) satisfies IntegrationFn; - /** @inheritdoc */ - public setup(client: Client): void { - global.process.on('unhandledRejection', makeUnhandledPromiseHandler(client, this._options)); - } -} +/** Global Promise Rejection handler */ +// eslint-disable-next-line deprecation/deprecation +export const OnUnhandledRejection = convertIntegrationFnToClass(INTEGRATION_NAME, onUnhandledRejectionIntegration); /** * Send an exception with reason diff --git a/packages/node/src/integrations/spotlight.ts b/packages/node/src/integrations/spotlight.ts index 55fabc284cad..10afd2245e9a 100644 --- a/packages/node/src/integrations/spotlight.ts +++ b/packages/node/src/integrations/spotlight.ts @@ -1,6 +1,7 @@ import * as http from 'http'; import { URL } from 'url'; -import type { Client, Envelope, Integration } from '@sentry/types'; +import { convertIntegrationFnToClass } from '@sentry/core'; +import type { Client, Envelope, IntegrationFn } from '@sentry/types'; import { logger, serializeEnvelope } from '@sentry/utils'; type SpotlightConnectionOptions = { @@ -11,6 +12,24 @@ type SpotlightConnectionOptions = { sidecarUrl?: string; }; +const INTEGRATION_NAME = 'Spotlight'; + +const spotlightIntegration = ((options: Partial = {}) => { + const _options = { + sidecarUrl: options.sidecarUrl || 'http://localhost:8969/stream', + }; + + return { + name: INTEGRATION_NAME, + setup(client) { + if (typeof process === 'object' && process.env && process.env.NODE_ENV !== 'development') { + logger.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?"); + } + connectToSpotlight(client, _options); + }, + }; +}) satisfies IntegrationFn; + /** * Use this integration to send errors and transactions to Spotlight. * @@ -18,35 +37,8 @@ type SpotlightConnectionOptions = { * * Important: This integration only works with Node 18 or newer */ -export class Spotlight implements Integration { - public static id = 'Spotlight'; - public name = Spotlight.id; - - private readonly _options: Required; - - public constructor(options?: SpotlightConnectionOptions) { - this._options = { - sidecarUrl: options?.sidecarUrl || 'http://localhost:8969/stream', - }; - } - - /** - * JSDoc - */ - public setupOnce(): void { - // empty but otherwise TS complains - } - - /** - * Sets up forwarding envelopes to the Spotlight Sidecar - */ - public setup(client: Client): void { - if (typeof process === 'object' && process.env && process.env.NODE_ENV !== 'development') { - logger.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?"); - } - connectToSpotlight(client, this._options); - } -} +// eslint-disable-next-line deprecation/deprecation +export const Spotlight = convertIntegrationFnToClass(INTEGRATION_NAME, spotlightIntegration); function connectToSpotlight(client: Client, options: Required): void { const spotlightUrl = parseSidecarUrl(options.sidecarUrl); diff --git a/packages/node/test/context-lines.test.ts b/packages/node/test/integrations/contextlines.test.ts similarity index 88% rename from packages/node/test/context-lines.test.ts rename to packages/node/test/integrations/contextlines.test.ts index c65b8db295d5..dda78689e711 100644 --- a/packages/node/test/context-lines.test.ts +++ b/packages/node/test/integrations/contextlines.test.ts @@ -1,17 +1,17 @@ import * as fs from 'fs'; -import type { StackFrame } from '@sentry/types'; +import type { Event, Integration, StackFrame } from '@sentry/types'; import { parseStackFrames } from '@sentry/utils'; -import { ContextLines, resetFileContentCache } from '../src/integrations/contextlines'; -import { defaultStackParser } from '../src/sdk'; -import { getError } from './helper/error'; +import { ContextLines, resetFileContentCache } from '../../src/integrations/contextlines'; +import { defaultStackParser } from '../../src/sdk'; +import { getError } from '../helper/error'; describe('ContextLines', () => { let readFileSpy: jest.SpyInstance; - let contextLines: ContextLines; + let contextLines: Integration & { processEvent: (event: Event) => Promise }; async function addContext(frames: StackFrame[]): Promise { - await contextLines.addSourceContext({ exception: { values: [{ stacktrace: { frames } }] } }); + await contextLines.processEvent({ exception: { values: [{ stacktrace: { frames } }] } }); } beforeEach(() => { From 16c4dbe8f367dd034dc1fe634a36733c3cf8f67d Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 3 Jan 2024 11:27:45 +0100 Subject: [PATCH 30/51] feat(core): Deprecate span `toContext()` and `updateWithContext()` (#10030) These APIs are not really used, and are not compatible with OpenTelemetry. So let's deprecate them for removal in v8. Unless somebody knows a reason why we still need something like this? --- MIGRATION.md | 7 +++++++ packages/core/src/tracing/transaction.ts | 2 ++ packages/types/src/span.ts | 10 ++++++++-- packages/types/src/transaction.ts | 10 ++++++++-- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 101f9de4469d..7f4c04044bf2 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -8,6 +8,13 @@ npx @sentry/migr8@latest This will let you select which updates to run, and automatically update your code. Make sure to still review all code changes! +## Deprecated fields on `Span` and `Transaction` + +In v8, the Span class is heavily reworked. The following properties & methods are thus deprecated: + +* `span.toContext()`: Access the fields directly instead. +* `span.updateWithContext(newSpanContext)`: Update the fields directly instead. + ## Deprecate `pushScope` & `popScope` in favor of `withScope` Instead of manually pushing/popping a scope, you should use `Sentry.withScope(callback: (scope: Scope))` instead. diff --git a/packages/core/src/tracing/transaction.ts b/packages/core/src/tracing/transaction.ts index 59591971d24e..d16a15d7db41 100644 --- a/packages/core/src/tracing/transaction.ts +++ b/packages/core/src/tracing/transaction.ts @@ -149,6 +149,7 @@ export class Transaction extends SpanClass implements TransactionInterface { * @inheritDoc */ public toContext(): TransactionContext { + // eslint-disable-next-line deprecation/deprecation const spanContext = super.toContext(); return dropUndefinedKeys({ @@ -162,6 +163,7 @@ export class Transaction extends SpanClass implements TransactionInterface { * @inheritDoc */ public updateWithContext(transactionContext: TransactionContext): this { + // eslint-disable-next-line deprecation/deprecation super.updateWithContext(transactionContext); this.name = transactionContext.name || ''; diff --git a/packages/types/src/span.ts b/packages/types/src/span.ts index e8dcc92d9d4a..6a639b4fcab5 100644 --- a/packages/types/src/span.ts +++ b/packages/types/src/span.ts @@ -221,10 +221,16 @@ export interface Span extends SpanContext { /** Return a traceparent compatible header string */ toTraceparent(): string; - /** Returns the current span properties as a `SpanContext` */ + /** + * Returns the current span properties as a `SpanContext`. + * @deprecated Use `toJSON()` or access the fields directly instead. + */ toContext(): SpanContext; - /** Updates the current span with a new `SpanContext` */ + /** + * Updates the current span with a new `SpanContext`. + * @deprecated Update the fields directly instead. + */ updateWithContext(spanContext: SpanContext): this; /** Convert the object to JSON for w. spans array info only */ diff --git a/packages/types/src/transaction.ts b/packages/types/src/transaction.ts index fc682dc0b16a..a4bee40983a5 100644 --- a/packages/types/src/transaction.ts +++ b/packages/types/src/transaction.ts @@ -102,10 +102,16 @@ export interface Transaction extends TransactionContext, Omit Date: Wed, 3 Jan 2024 11:32:03 +0100 Subject: [PATCH 31/51] chore(biome): Add `useRegexLiterals` rule (#10010) Add the [useRegexLiterals](https://biomejs.dev/linter/rules/use-regex-literals/) rule to our biome config which will flag unnecessary usage of the `RegExp` constructor where a static regex could be used instead. --- biome.json | 5 +++-- packages/serverless/test/google-cloud-http.test.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/biome.json b/biome.json index ee621463f01c..8d1b11d84859 100644 --- a/biome.json +++ b/biome.json @@ -22,7 +22,8 @@ "noControlCharactersInRegex": "error" }, "nursery": { - "noUnusedImports": "error" + "noUnusedImports": "error", + "useRegexLiterals": "error" }, "performance": { "all": true, @@ -30,7 +31,7 @@ "noDelete": "off" } }, - "ignore": [".vscode/*", "**/*.json"] + "ignore": [".vscode/*", "**/*.json", ".next/**/*", ".svelte-kit/**/*"] }, "files": { "ignoreUnknown": true diff --git a/packages/serverless/test/google-cloud-http.test.ts b/packages/serverless/test/google-cloud-http.test.ts index 8296ab4e1d88..b285a9a862c8 100644 --- a/packages/serverless/test/google-cloud-http.test.ts +++ b/packages/serverless/test/google-cloud-http.test.ts @@ -49,7 +49,7 @@ describe('GoogleCloudHttp tracing', () => { '{"kind":"bigquery#job","configuration":{"query":{"query":"SELECT true AS foo","destinationTable":{"projectId":"project-id","datasetId":"_7b1eed9bef45ab5fb7345c3d6f662cd767e5ab3e","tableId":"anon101ee25adad33d4f09179679ae9144ad436a210e"},"writeDisposition":"WRITE_TRUNCATE","priority":"INTERACTIVE","useLegacySql":false},"jobType":"QUERY"},"jobReference":{"projectId":"project-id","jobId":"8874c5d5-9cfe-4daa-8390-b0504b97b429","location":"US"},"statistics":{"creationTime":"1603072686488","startTime":"1603072686756","query":{"statementType":"SELECT"}},"status":{"state":"RUNNING"}}', ); nock('https://bigquery.googleapis.com') - .get(new RegExp('^/bigquery/v2/projects/project-id/queries/.+$')) + .get(/^\/bigquery\/v2\/projects\/project-id\/queries\/.+$/) .query(true) .reply( 200, @@ -67,7 +67,7 @@ describe('GoogleCloudHttp tracing', () => { expect(SentryNode.fakeTransaction.startChild).toBeCalledWith({ op: 'http.client.bigquery', origin: 'auto.http.serverless', - description: expect.stringMatching(new RegExp('^GET /queries/.+')), + description: expect.stringMatching(/^GET \/queries\/.+/), }); }); }); From e5f342818026d6d537af6754b3d8892dea757a54 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 3 Jan 2024 12:07:45 +0100 Subject: [PATCH 32/51] feat(core): Add `span.updateName()` and deprecate `span.setName()` (#10018) You can call `span.setMetadata()` if you need to update the source. This aligns with the OTEL API for spans. --- MIGRATION.md | 1 + packages/angular/src/tracing.ts | 3 +- packages/angular/test/tracing.test.ts | 10 ++++--- packages/core/src/tracing/span.ts | 14 +++++++-- packages/core/src/tracing/transaction.ts | 15 ++++++++-- packages/core/test/lib/tracing/span.test.ts | 25 +++++++++++++++- .../core/test/lib/tracing/transaction.test.ts | 29 +++++++++++++++++- packages/node/src/handlers.ts | 3 +- .../opentelemetry-node/src/spanprocessor.ts | 3 +- packages/react/src/reactrouter.tsx | 3 +- packages/react/src/reactrouterv6.tsx | 4 ++- packages/react/test/reactrouterv4.test.tsx | 30 +++++++++++-------- packages/react/test/reactrouterv5.test.tsx | 29 ++++++++++-------- packages/react/test/reactrouterv6.4.test.tsx | 16 ++++++---- packages/react/test/reactrouterv6.test.tsx | 21 ++++++++----- packages/remix/src/client/performance.tsx | 3 +- packages/sveltekit/src/client/router.ts | 3 +- packages/sveltekit/test/client/router.test.ts | 8 +++-- .../src/node/integrations/express.ts | 4 ++- packages/tracing/test/span.test.ts | 2 +- packages/tracing/test/transaction.test.ts | 11 +++++++ packages/types/src/span.ts | 7 +++++ packages/utils/src/requestdata.ts | 4 ++- packages/vue/src/router.ts | 3 +- packages/vue/test/router.test.ts | 10 ++++--- 25 files changed, 194 insertions(+), 67 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 7f4c04044bf2..98d92427c03f 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -14,6 +14,7 @@ In v8, the Span class is heavily reworked. The following properties & methods ar * `span.toContext()`: Access the fields directly instead. * `span.updateWithContext(newSpanContext)`: Update the fields directly instead. +* `span.setName(newName)`: Use `span.updateName(newName)` instead. ## Deprecate `pushScope` & `popScope` in favor of `withScope` diff --git a/packages/angular/src/tracing.ts b/packages/angular/src/tracing.ts index 3138f1be1c53..e65ecd84d8df 100644 --- a/packages/angular/src/tracing.ts +++ b/packages/angular/src/tracing.ts @@ -118,7 +118,8 @@ export class TraceService implements OnDestroy { const transaction = getActiveTransaction(); // TODO (v8 / #5416): revisit the source condition. Do we want to make the parameterized route the default? if (transaction && transaction.metadata.source === 'url') { - transaction.setName(route, 'route'); + transaction.updateName(route); + transaction.setMetadata({ source: 'route' }); } }), ); diff --git a/packages/angular/test/tracing.test.ts b/packages/angular/test/tracing.test.ts index 37ef01348699..695e3d7af564 100644 --- a/packages/angular/test/tracing.test.ts +++ b/packages/angular/test/tracing.test.ts @@ -10,7 +10,8 @@ let transaction: any; const defaultStartTransaction = (ctx: any) => { transaction = { ...ctx, - setName: jest.fn(name => (transaction.name = name)), + updateName: jest.fn(name => (transaction.name = name)), + setMetadata: jest.fn(), }; return transaction; @@ -110,7 +111,7 @@ describe('Angular Tracing', () => { ...ctx.metadata, source: 'custom', }, - setName: jest.fn(name => (transaction.name = name)), + updateName: jest.fn(name => (transaction.name = name)), }; return transaction; @@ -137,7 +138,7 @@ describe('Angular Tracing', () => { metadata: { source: 'url' }, }); - expect(transaction.setName).toHaveBeenCalledTimes(0); + expect(transaction.updateName).toHaveBeenCalledTimes(0); expect(transaction.name).toEqual(url); expect(transaction.metadata.source).toBe('custom'); @@ -327,7 +328,8 @@ describe('Angular Tracing', () => { origin: 'auto.navigation.angular', metadata: { source: 'url' }, }); - expect(transaction.setName).toHaveBeenCalledWith(result, 'route'); + expect(transaction.updateName).toHaveBeenCalledWith(result); + expect(transaction.setMetadata).toHaveBeenCalledWith({ source: 'route' }); env.destroy(); }); diff --git a/packages/core/src/tracing/span.ts b/packages/core/src/tracing/span.ts index 6e484ec92ddc..29584f65858d 100644 --- a/packages/core/src/tracing/span.ts +++ b/packages/core/src/tracing/span.ts @@ -176,9 +176,11 @@ export class Span implements SpanInterface { public get name(): string { return this.description || ''; } - /** Update the name of the span. */ + /** + * Update the name of the span. + */ public set name(name: string) { - this.setName(name); + this.updateName(name); } /** @@ -267,11 +269,17 @@ export class Span implements SpanInterface { return this; } + /** @inheritdoc */ + public setName(name: string): void { + this.updateName(name); + } + /** * @inheritDoc */ - public setName(name: string): void { + public updateName(name: string): this { this.description = name; + return this; } /** diff --git a/packages/core/src/tracing/transaction.ts b/packages/core/src/tracing/transaction.ts index d16a15d7db41..339d8d51e740 100644 --- a/packages/core/src/tracing/transaction.ts +++ b/packages/core/src/tracing/transaction.ts @@ -82,19 +82,30 @@ export class Transaction extends SpanClass implements TransactionInterface { return this._name; } - /** Setter for `name` property, which also sets `source` as custom */ + /** + * Setter for `name` property, which also sets `source` as custom. + */ public set name(newName: string) { + // eslint-disable-next-line deprecation/deprecation this.setName(newName); } /** - * JSDoc + * Setter for `name` property, which also sets `source` on the metadata. + * + * @deprecated Use `updateName()` and `setMetadata()` instead. */ public setName(name: string, source: TransactionMetadata['source'] = 'custom'): void { this._name = name; this.metadata.source = source; } + /** @inheritdoc */ + public updateName(name: string): this { + this._name = name; + return this; + } + /** * Attaches SpanRecorder to the span itself * @param maxlen maximum number of spans that can be recorded diff --git a/packages/core/test/lib/tracing/span.test.ts b/packages/core/test/lib/tracing/span.test.ts index 512141358dd4..c0b13df647f6 100644 --- a/packages/core/test/lib/tracing/span.test.ts +++ b/packages/core/test/lib/tracing/span.test.ts @@ -19,7 +19,7 @@ describe('span', () => { expect(span.description).toEqual(undefined); }); - it('allows to update the name', () => { + it('allows to update the name via setter', () => { const span = new Span({ name: 'span name' }); expect(span.name).toEqual('span name'); expect(span.description).toEqual('span name'); @@ -30,6 +30,29 @@ describe('span', () => { expect(span.description).toEqual('new name'); }); + it('allows to update the name via setName', () => { + const span = new Span({ name: 'span name' }); + expect(span.name).toEqual('span name'); + expect(span.description).toEqual('span name'); + + // eslint-disable-next-line deprecation/deprecation + span.setName('new name'); + + expect(span.name).toEqual('new name'); + expect(span.description).toEqual('new name'); + }); + + it('allows to update the name via updateName', () => { + const span = new Span({ name: 'span name' }); + expect(span.name).toEqual('span name'); + expect(span.description).toEqual('span name'); + + span.updateName('new name'); + + expect(span.name).toEqual('new name'); + expect(span.description).toEqual('new name'); + }); + describe('setAttribute', () => { it('allows to set attributes', () => { const span = new Span(); diff --git a/packages/core/test/lib/tracing/transaction.test.ts b/packages/core/test/lib/tracing/transaction.test.ts index b9218eae77cb..3be3d7dccfcc 100644 --- a/packages/core/test/lib/tracing/transaction.test.ts +++ b/packages/core/test/lib/tracing/transaction.test.ts @@ -6,12 +6,39 @@ describe('transaction', () => { expect(transaction.name).toEqual('span name'); }); - it('allows to update the name', () => { + it('allows to update the name via setter', () => { const transaction = new Transaction({ name: 'span name' }); + transaction.setMetadata({ source: 'route' }); expect(transaction.name).toEqual('span name'); transaction.name = 'new name'; expect(transaction.name).toEqual('new name'); + expect(transaction.metadata.source).toEqual('custom'); + }); + + it('allows to update the name via setName', () => { + const transaction = new Transaction({ name: 'span name' }); + transaction.setMetadata({ source: 'route' }); + expect(transaction.name).toEqual('span name'); + + transaction.setMetadata({ source: 'route' }); + + // eslint-disable-next-line deprecation/deprecation + transaction.setName('new name'); + + expect(transaction.name).toEqual('new name'); + expect(transaction.metadata.source).toEqual('custom'); + }); + + it('allows to update the name via updateName', () => { + const transaction = new Transaction({ name: 'span name' }); + transaction.setMetadata({ source: 'route' }); + expect(transaction.name).toEqual('span name'); + + transaction.updateName('new name'); + + expect(transaction.name).toEqual('new name'); + expect(transaction.metadata.source).toEqual('route'); }); }); diff --git a/packages/node/src/handlers.ts b/packages/node/src/handlers.ts index 857e6c4892d5..9a4bb08bfb4b 100644 --- a/packages/node/src/handlers.ts +++ b/packages/node/src/handlers.ts @@ -329,7 +329,8 @@ export function trpcMiddleware(options: SentryTrpcMiddlewareOptions = {}) { const sentryTransaction = getCurrentScope().getTransaction(); if (sentryTransaction) { - sentryTransaction.setName(`trpc/${path}`, 'route'); + sentryTransaction.updateName(`trpc/${path}`); + sentryTransaction.setMetadata({ source: 'route' }); sentryTransaction.op = 'rpc.server'; const trpcContext: Record = { diff --git a/packages/opentelemetry-node/src/spanprocessor.ts b/packages/opentelemetry-node/src/spanprocessor.ts index f220d5893e93..bb2372a3c2b4 100644 --- a/packages/opentelemetry-node/src/spanprocessor.ts +++ b/packages/opentelemetry-node/src/spanprocessor.ts @@ -216,7 +216,8 @@ function updateTransactionWithOtelData(transaction: Transaction, otelSpan: OtelS transaction.setStatus(mapOtelStatus(otelSpan)); transaction.op = op; - transaction.setName(description, source); + transaction.updateName(description); + transaction.setMetadata({ source }); } function convertOtelTimeToSeconds([seconds, nano]: [number, number]): number { diff --git a/packages/react/src/reactrouter.tsx b/packages/react/src/reactrouter.tsx index 3234cdc7871d..8a42c5ff96f1 100644 --- a/packages/react/src/reactrouter.tsx +++ b/packages/react/src/reactrouter.tsx @@ -165,7 +165,8 @@ export function withSentryRouting

, R extends React const WrappedRoute: React.FC

= (props: P) => { if (activeTransaction && props && props.computedMatch && props.computedMatch.isExact) { - activeTransaction.setName(props.computedMatch.path, 'route'); + activeTransaction.updateName(props.computedMatch.path); + activeTransaction.setMetadata({ source: 'route' }); } // @ts-expect-error Setting more specific React Component typing for `R` generic above diff --git a/packages/react/src/reactrouterv6.tsx b/packages/react/src/reactrouterv6.tsx index 14c975a90105..920a6b4f8a0d 100644 --- a/packages/react/src/reactrouterv6.tsx +++ b/packages/react/src/reactrouterv6.tsx @@ -134,7 +134,9 @@ function updatePageloadTransaction( : (_matchRoutes(routes, location, basename) as unknown as RouteMatch[]); if (activeTransaction && branches) { - activeTransaction.setName(...getNormalizedName(routes, location, branches, basename)); + const [name, source] = getNormalizedName(routes, location, branches, basename); + activeTransaction.updateName(name); + activeTransaction.setMetadata({ source }); } } diff --git a/packages/react/test/reactrouterv4.test.tsx b/packages/react/test/reactrouterv4.test.tsx index a17c885b5edf..2b06b3a196a5 100644 --- a/packages/react/test/reactrouterv4.test.tsx +++ b/packages/react/test/reactrouterv4.test.tsx @@ -12,7 +12,7 @@ describe('React Router v4', () => { startTransactionOnPageLoad?: boolean; startTransactionOnLocationChange?: boolean; routes?: RouteConfig[]; - }): [jest.Mock, any, { mockSetName: jest.Mock; mockFinish: jest.Mock }] { + }): [jest.Mock, any, { mockUpdateName: jest.Mock; mockFinish: jest.Mock; mockSetMetadata: jest.Mock }] { const options = { matchPath: _opts && _opts.routes !== undefined ? matchPath : undefined, routes: undefined, @@ -22,14 +22,17 @@ describe('React Router v4', () => { }; const history = createMemoryHistory(); const mockFinish = jest.fn(); - const mockSetName = jest.fn(); - const mockStartTransaction = jest.fn().mockReturnValue({ setName: mockSetName, end: mockFinish }); + const mockUpdateName = jest.fn(); + const mockSetMetadata = jest.fn(); + const mockStartTransaction = jest + .fn() + .mockReturnValue({ updateName: mockUpdateName, end: mockFinish, setMetadata: mockSetMetadata }); reactRouterV4Instrumentation(history, options.routes, options.matchPath)( mockStartTransaction, options.startTransactionOnPageLoad, options.startTransactionOnLocationChange, ); - return [mockStartTransaction, history, { mockSetName, mockFinish }]; + return [mockStartTransaction, history, { mockUpdateName, mockFinish, mockSetMetadata }]; } it('starts a pageload transaction when instrumentation is started', () => { @@ -166,7 +169,7 @@ describe('React Router v4', () => { }); it('normalizes transaction name with custom Route', () => { - const [mockStartTransaction, history, { mockSetName }] = createInstrumentation(); + const [mockStartTransaction, history, { mockUpdateName, mockSetMetadata }] = createInstrumentation(); const SentryRoute = withSentryRouting(Route); const { getByText } = render( @@ -191,12 +194,13 @@ describe('React Router v4', () => { tags: { 'routing.instrumentation': 'react-router-v4' }, metadata: { source: 'url' }, }); - expect(mockSetName).toHaveBeenCalledTimes(2); - expect(mockSetName).toHaveBeenLastCalledWith('/users/:userid', 'route'); + expect(mockUpdateName).toHaveBeenCalledTimes(2); + expect(mockUpdateName).toHaveBeenLastCalledWith('/users/:userid'); + expect(mockSetMetadata).toHaveBeenCalledWith({ source: 'route' }); }); it('normalizes nested transaction names with custom Route', () => { - const [mockStartTransaction, history, { mockSetName }] = createInstrumentation(); + const [mockStartTransaction, history, { mockUpdateName, mockSetMetadata }] = createInstrumentation(); const SentryRoute = withSentryRouting(Route); const { getByText } = render( @@ -221,8 +225,9 @@ describe('React Router v4', () => { tags: { 'routing.instrumentation': 'react-router-v4' }, metadata: { source: 'url' }, }); - expect(mockSetName).toHaveBeenCalledTimes(2); - expect(mockSetName).toHaveBeenLastCalledWith('/organizations/:orgid/v1/:teamid', 'route'); + expect(mockUpdateName).toHaveBeenCalledTimes(2); + expect(mockUpdateName).toHaveBeenLastCalledWith('/organizations/:orgid/v1/:teamid'); + expect(mockSetMetadata).toHaveBeenLastCalledWith({ source: 'route' }); act(() => { history.push('/organizations/543'); @@ -237,8 +242,9 @@ describe('React Router v4', () => { tags: { 'routing.instrumentation': 'react-router-v4' }, metadata: { source: 'url' }, }); - expect(mockSetName).toHaveBeenCalledTimes(3); - expect(mockSetName).toHaveBeenLastCalledWith('/organizations/:orgid', 'route'); + expect(mockUpdateName).toHaveBeenCalledTimes(3); + expect(mockUpdateName).toHaveBeenLastCalledWith('/organizations/:orgid'); + expect(mockSetMetadata).toHaveBeenLastCalledWith({ source: 'route' }); }); it('matches with route object', () => { diff --git a/packages/react/test/reactrouterv5.test.tsx b/packages/react/test/reactrouterv5.test.tsx index 104374201722..fba57df9a5f8 100644 --- a/packages/react/test/reactrouterv5.test.tsx +++ b/packages/react/test/reactrouterv5.test.tsx @@ -12,7 +12,7 @@ describe('React Router v5', () => { startTransactionOnPageLoad?: boolean; startTransactionOnLocationChange?: boolean; routes?: RouteConfig[]; - }): [jest.Mock, any, { mockSetName: jest.Mock; mockFinish: jest.Mock }] { + }): [jest.Mock, any, { mockUpdateName: jest.Mock; mockFinish: jest.Mock; mockSetMetadata: jest.Mock }] { const options = { matchPath: _opts && _opts.routes !== undefined ? matchPath : undefined, routes: undefined, @@ -22,14 +22,17 @@ describe('React Router v5', () => { }; const history = createMemoryHistory(); const mockFinish = jest.fn(); - const mockSetName = jest.fn(); - const mockStartTransaction = jest.fn().mockReturnValue({ setName: mockSetName, end: mockFinish }); + const mockUpdateName = jest.fn(); + const mockSetMetadata = jest.fn(); + const mockStartTransaction = jest + .fn() + .mockReturnValue({ updateName: mockUpdateName, end: mockFinish, setMetadata: mockSetMetadata }); reactRouterV5Instrumentation(history, options.routes, options.matchPath)( mockStartTransaction, options.startTransactionOnPageLoad, options.startTransactionOnLocationChange, ); - return [mockStartTransaction, history, { mockSetName, mockFinish }]; + return [mockStartTransaction, history, { mockUpdateName, mockFinish, mockSetMetadata }]; } it('starts a pageload transaction when instrumentation is started', () => { @@ -166,7 +169,7 @@ describe('React Router v5', () => { }); it('normalizes transaction name with custom Route', () => { - const [mockStartTransaction, history, { mockSetName }] = createInstrumentation(); + const [mockStartTransaction, history, { mockUpdateName, mockSetMetadata }] = createInstrumentation(); const SentryRoute = withSentryRouting(Route); const { getByText } = render( @@ -191,12 +194,13 @@ describe('React Router v5', () => { tags: { 'routing.instrumentation': 'react-router-v5' }, metadata: { source: 'url' }, }); - expect(mockSetName).toHaveBeenCalledTimes(2); - expect(mockSetName).toHaveBeenLastCalledWith('/users/:userid', 'route'); + expect(mockUpdateName).toHaveBeenCalledTimes(2); + expect(mockUpdateName).toHaveBeenLastCalledWith('/users/:userid'); + expect(mockSetMetadata).toHaveBeenLastCalledWith({ source: 'route' }); }); it('normalizes nested transaction names with custom Route', () => { - const [mockStartTransaction, history, { mockSetName }] = createInstrumentation(); + const [mockStartTransaction, history, { mockUpdateName, mockSetMetadata }] = createInstrumentation(); const SentryRoute = withSentryRouting(Route); const { getByText } = render( @@ -222,8 +226,9 @@ describe('React Router v5', () => { tags: { 'routing.instrumentation': 'react-router-v5' }, metadata: { source: 'url' }, }); - expect(mockSetName).toHaveBeenCalledTimes(2); - expect(mockSetName).toHaveBeenLastCalledWith('/organizations/:orgid/v1/:teamid', 'route'); + expect(mockUpdateName).toHaveBeenCalledTimes(2); + expect(mockUpdateName).toHaveBeenLastCalledWith('/organizations/:orgid/v1/:teamid'); + expect(mockSetMetadata).toHaveBeenLastCalledWith({ source: 'route' }); act(() => { history.push('/organizations/543'); @@ -238,8 +243,8 @@ describe('React Router v5', () => { tags: { 'routing.instrumentation': 'react-router-v5' }, metadata: { source: 'url' }, }); - expect(mockSetName).toHaveBeenCalledTimes(3); - expect(mockSetName).toHaveBeenLastCalledWith('/organizations/:orgid', 'route'); + expect(mockUpdateName).toHaveBeenCalledTimes(3); + expect(mockUpdateName).toHaveBeenLastCalledWith('/organizations/:orgid'); }); it('matches with route object', () => { diff --git a/packages/react/test/reactrouterv6.4.test.tsx b/packages/react/test/reactrouterv6.4.test.tsx index 5c2c9e7b3d5b..a89bb50e1f82 100644 --- a/packages/react/test/reactrouterv6.4.test.tsx +++ b/packages/react/test/reactrouterv6.4.test.tsx @@ -25,7 +25,7 @@ describe('React Router v6.4', () => { function createInstrumentation(_opts?: { startTransactionOnPageLoad?: boolean; startTransactionOnLocationChange?: boolean; - }): [jest.Mock, { mockSetName: jest.Mock; mockFinish: jest.Mock }] { + }): [jest.Mock, { mockUpdateName: jest.Mock; mockFinish: jest.Mock; mockSetMetadata: jest.Mock }] { const options = { matchPath: _opts ? matchPath : undefined, startTransactionOnLocationChange: true, @@ -33,8 +33,11 @@ describe('React Router v6.4', () => { ..._opts, }; const mockFinish = jest.fn(); - const mockSetName = jest.fn(); - const mockStartTransaction = jest.fn().mockReturnValue({ setName: mockSetName, end: mockFinish }); + const mockUpdateName = jest.fn(); + const mockSetMetadata = jest.fn(); + const mockStartTransaction = jest + .fn() + .mockReturnValue({ updateName: mockUpdateName, end: mockFinish, setMetadata: mockSetMetadata }); reactRouterV6Instrumentation( React.useEffect, @@ -43,7 +46,7 @@ describe('React Router v6.4', () => { createRoutesFromChildren, matchRoutes, )(mockStartTransaction, options.startTransactionOnPageLoad, options.startTransactionOnLocationChange); - return [mockStartTransaction, { mockSetName, mockFinish }]; + return [mockStartTransaction, { mockUpdateName, mockFinish, mockSetMetadata }]; } describe('wrapCreateBrowserRouter', () => { @@ -243,7 +246,7 @@ describe('React Router v6.4', () => { }); it('updates pageload transaction to a parameterized route', () => { - const [mockStartTransaction, { mockSetName }] = createInstrumentation(); + const [mockStartTransaction, { mockUpdateName, mockSetMetadata }] = createInstrumentation(); const sentryCreateBrowserRouter = wrapCreateBrowserRouter(createMemoryRouter as CreateRouterFunction); const router = sentryCreateBrowserRouter( @@ -268,7 +271,8 @@ describe('React Router v6.4', () => { render(); expect(mockStartTransaction).toHaveBeenCalledTimes(1); - expect(mockSetName).toHaveBeenLastCalledWith('/about/:page', 'route'); + expect(mockUpdateName).toHaveBeenLastCalledWith('/about/:page'); + expect(mockSetMetadata).toHaveBeenCalledWith({ source: 'route' }); }); it('works with `basename` option', () => { diff --git a/packages/react/test/reactrouterv6.test.tsx b/packages/react/test/reactrouterv6.test.tsx index fd6ad444125e..965ce134bb74 100644 --- a/packages/react/test/reactrouterv6.test.tsx +++ b/packages/react/test/reactrouterv6.test.tsx @@ -21,7 +21,7 @@ describe('React Router v6', () => { function createInstrumentation(_opts?: { startTransactionOnPageLoad?: boolean; startTransactionOnLocationChange?: boolean; - }): [jest.Mock, { mockSetName: jest.Mock; mockFinish: jest.Mock }] { + }): [jest.Mock, { mockUpdateName: jest.Mock; mockFinish: jest.Mock; mockSetMetadata: jest.Mock }] { const options = { matchPath: _opts ? matchPath : undefined, startTransactionOnLocationChange: true, @@ -29,8 +29,11 @@ describe('React Router v6', () => { ..._opts, }; const mockFinish = jest.fn(); - const mockSetName = jest.fn(); - const mockStartTransaction = jest.fn().mockReturnValue({ setName: mockSetName, end: mockFinish }); + const mockUpdateName = jest.fn(); + const mockSetMetadata = jest.fn(); + const mockStartTransaction = jest + .fn() + .mockReturnValue({ updateName: mockUpdateName, end: mockFinish, setMetadata: mockSetMetadata }); reactRouterV6Instrumentation( React.useEffect, @@ -39,7 +42,7 @@ describe('React Router v6', () => { createRoutesFromChildren, matchRoutes, )(mockStartTransaction, options.startTransactionOnPageLoad, options.startTransactionOnLocationChange); - return [mockStartTransaction, { mockSetName, mockFinish }]; + return [mockStartTransaction, { mockUpdateName, mockFinish, mockSetMetadata }]; } describe('withSentryReactRouterV6Routing', () => { @@ -542,7 +545,7 @@ describe('React Router v6', () => { }); it('does not add double slashes to URLS', () => { - const [mockStartTransaction, { mockSetName }] = createInstrumentation(); + const [mockStartTransaction, { mockUpdateName, mockSetMetadata }] = createInstrumentation(); const wrappedUseRoutes = wrapUseRoutes(useRoutes); const Routes = () => @@ -584,11 +587,12 @@ describe('React Router v6', () => { expect(mockStartTransaction).toHaveBeenCalledTimes(1); // should be /tests not //tests - expect(mockSetName).toHaveBeenLastCalledWith('/tests', 'route'); + expect(mockUpdateName).toHaveBeenLastCalledWith('/tests'); + expect(mockSetMetadata).toHaveBeenCalledWith({ source: 'route' }); }); it('handles wildcard routes properly', () => { - const [mockStartTransaction, { mockSetName }] = createInstrumentation(); + const [mockStartTransaction, { mockUpdateName, mockSetMetadata }] = createInstrumentation(); const wrappedUseRoutes = wrapUseRoutes(useRoutes); const Routes = () => @@ -629,7 +633,8 @@ describe('React Router v6', () => { ); expect(mockStartTransaction).toHaveBeenCalledTimes(1); - expect(mockSetName).toHaveBeenLastCalledWith('/tests/:testId/*', 'route'); + expect(mockUpdateName).toHaveBeenLastCalledWith('/tests/:testId/*'); + expect(mockSetMetadata).toHaveBeenCalledWith({ source: 'route' }); }); }); }); diff --git a/packages/remix/src/client/performance.tsx b/packages/remix/src/client/performance.tsx index af6344165b6a..597f6daae48f 100644 --- a/packages/remix/src/client/performance.tsx +++ b/packages/remix/src/client/performance.tsx @@ -125,7 +125,8 @@ export function withSentry

, R extends React.Co _useEffect(() => { if (activeTransaction && matches && matches.length) { - activeTransaction.setName(matches[matches.length - 1].id, 'route'); + activeTransaction.updateName(matches[matches.length - 1].id); + activeTransaction.setMetadata({ source: 'route' }); } isBaseLocation = true; diff --git a/packages/sveltekit/src/client/router.ts b/packages/sveltekit/src/client/router.ts index ede1ace4ae75..0d327335326b 100644 --- a/packages/sveltekit/src/client/router.ts +++ b/packages/sveltekit/src/client/router.ts @@ -56,7 +56,8 @@ function instrumentPageload(startTransactionFn: (context: TransactionContext) => const routeId = page.route && page.route.id; if (pageloadTransaction && routeId) { - pageloadTransaction.setName(routeId, 'route'); + pageloadTransaction.updateName(routeId); + pageloadTransaction.setMetadata({ source: 'route' }); } }); } diff --git a/packages/sveltekit/test/client/router.test.ts b/packages/sveltekit/test/client/router.test.ts index 10e8a0aa0744..648e5344e6c8 100644 --- a/packages/sveltekit/test/client/router.test.ts +++ b/packages/sveltekit/test/client/router.test.ts @@ -26,7 +26,8 @@ describe('sveltekitRoutingInstrumentation', () => { const mockedStartTransaction = vi.fn().mockImplementation(txnCtx => { returnedTransaction = { ...txnCtx, - setName: vi.fn(), + updateName: vi.fn(), + setMetadata: vi.fn(), startChild: vi.fn().mockImplementation(ctx => { return { ...mockedRoutingSpan, ...ctx }; }), @@ -68,8 +69,9 @@ describe('sveltekitRoutingInstrumentation', () => { page.set({ route: { id: 'testRoute' } }); // This should update the transaction name with the parameterized route: - expect(returnedTransaction?.setName).toHaveBeenCalledTimes(1); - expect(returnedTransaction?.setName).toHaveBeenCalledWith('testRoute', 'route'); + expect(returnedTransaction?.updateName).toHaveBeenCalledTimes(1); + expect(returnedTransaction?.updateName).toHaveBeenCalledWith('testRoute'); + expect(returnedTransaction?.setMetadata).toHaveBeenCalledWith({ source: 'route' }); }); it("doesn't start a pageload transaction if `startTransactionOnPageLoad` is false", () => { diff --git a/packages/tracing-internal/src/node/integrations/express.ts b/packages/tracing-internal/src/node/integrations/express.ts index d1f609bd658d..7754fff3ad5b 100644 --- a/packages/tracing-internal/src/node/integrations/express.ts +++ b/packages/tracing-internal/src/node/integrations/express.ts @@ -376,7 +376,9 @@ function instrumentRouter(appOrRouter: ExpressRouter): void { // Therefore, we fall back to setting the final route to '/' in this case. const finalRoute = req._reconstructedRoute || '/'; - transaction.setName(...extractPathForTransaction(req, { path: true, method: true, customRoute: finalRoute })); + const [name, source] = extractPathForTransaction(req, { path: true, method: true, customRoute: finalRoute }); + transaction.updateName(name); + transaction.setMetadata({ source }); } } diff --git a/packages/tracing/test/span.test.ts b/packages/tracing/test/span.test.ts index 7920420dbfbe..011af5ba10d5 100644 --- a/packages/tracing/test/span.test.ts +++ b/packages/tracing/test/span.test.ts @@ -86,7 +86,7 @@ describe('Span', () => { test('setName', () => { const span = new Span({}); expect(span.description).toBeUndefined(); - span.setName('foo'); + span.updateName('foo'); expect(span.description).toBe('foo'); }); }); diff --git a/packages/tracing/test/transaction.test.ts b/packages/tracing/test/transaction.test.ts index 64691385f533..12c6c799883a 100644 --- a/packages/tracing/test/transaction.test.ts +++ b/packages/tracing/test/transaction.test.ts @@ -61,6 +61,17 @@ describe('`Transaction` class', () => { expect(transaction.metadata.source).toEqual('route'); }); }); + + describe('`updateName` method', () => { + it('does not change the source', () => { + const transaction = new Transaction({ name: 'dogpark' }); + transaction.setMetadata({ source: 'route' }); + transaction.updateName('ballpit'); + + expect(transaction.name).toEqual('ballpit'); + expect(transaction.metadata.source).toEqual('route'); + }); + }); }); describe('setContext', () => { diff --git a/packages/types/src/span.ts b/packages/types/src/span.ts index 6a639b4fcab5..3614961e7182 100644 --- a/packages/types/src/span.ts +++ b/packages/types/src/span.ts @@ -204,9 +204,16 @@ export interface Span extends SpanContext { /** * Set the name of the span. + * + * @deprecated Use `updateName()` instead. */ setName(name: string): void; + /** + * Update the name of the span. + */ + updateName(name: string): this; + /** * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`. * Also the `sampled` decision will be inherited. diff --git a/packages/utils/src/requestdata.ts b/packages/utils/src/requestdata.ts index 5860932994d4..f2ffeaf621a1 100644 --- a/packages/utils/src/requestdata.ts +++ b/packages/utils/src/requestdata.ts @@ -74,7 +74,9 @@ export function addRequestDataToTransaction( if (!transaction) return; if (!transaction.metadata.source || transaction.metadata.source === 'url') { // Attempt to grab a parameterized route off of the request - transaction.setName(...extractPathForTransaction(req, { path: true, method: true })); + const [name, source] = extractPathForTransaction(req, { path: true, method: true }); + transaction.updateName(name); + transaction.setMetadata({ source }); } transaction.setData('url', req.originalUrl || req.url); if (req.baseUrl) { diff --git a/packages/vue/src/router.ts b/packages/vue/src/router.ts index 2f8ab7b30c1a..70117e960fe2 100644 --- a/packages/vue/src/router.ts +++ b/packages/vue/src/router.ts @@ -111,7 +111,8 @@ export function vueRouterInstrumentation( const pageloadTransaction = getActiveTransaction(); if (pageloadTransaction) { if (pageloadTransaction.metadata.source !== 'custom') { - pageloadTransaction.setName(transactionName, transactionSource); + pageloadTransaction.updateName(transactionName); + pageloadTransaction.setMetadata({ source: transactionSource }); } pageloadTransaction.setData('params', data.params); pageloadTransaction.setData('query', data.query); diff --git a/packages/vue/test/router.test.ts b/packages/vue/test/router.test.ts index da1e962c9645..2e937e02f154 100644 --- a/packages/vue/test/router.test.ts +++ b/packages/vue/test/router.test.ts @@ -126,8 +126,9 @@ describe('vueRouterInstrumentation()', () => { 'should return instrumentation that instruments VueRouter.beforeEach(%s, %s) for pageloads', (fromKey, toKey, transactionName, transactionSource) => { const mockedTxn = { - setName: jest.fn(), + updateName: jest.fn(), setData: jest.fn(), + setMetadata: jest.fn(), metadata: {}, }; const customMockStartTxn = { ...mockStartTransaction }.mockImplementation(_ => { @@ -163,7 +164,8 @@ describe('vueRouterInstrumentation()', () => { beforeEachCallback(to, from, mockNext); expect(mockVueRouter.beforeEach).toHaveBeenCalledTimes(1); - expect(mockedTxn.setName).toHaveBeenCalledWith(transactionName, transactionSource); + expect(mockedTxn.updateName).toHaveBeenCalledWith(transactionName); + expect(mockedTxn.setMetadata).toHaveBeenCalledWith({ source: transactionSource }); expect(mockedTxn.setData).toHaveBeenNthCalledWith(1, 'params', to.params); expect(mockedTxn.setData).toHaveBeenNthCalledWith(2, 'query', to.query); @@ -237,7 +239,7 @@ describe('vueRouterInstrumentation()', () => { it("doesn't overwrite a pageload transaction name it was set to custom before the router resolved the route", () => { const mockedTxn = { - setName: jest.fn(), + updateName: jest.fn(), setData: jest.fn(), name: '', metadata: { @@ -279,7 +281,7 @@ describe('vueRouterInstrumentation()', () => { expect(mockVueRouter.beforeEach).toHaveBeenCalledTimes(1); - expect(mockedTxn.setName).not.toHaveBeenCalled(); + expect(mockedTxn.updateName).not.toHaveBeenCalled(); expect(mockedTxn.metadata.source).toEqual('custom'); expect(mockedTxn.name).toEqual('customTxnName'); }); From 23ef22b115c8868861896cc9003bd4bb6afb0690 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Wed, 3 Jan 2024 06:21:34 -0500 Subject: [PATCH 33/51] fix(utils): use correct typeof URL validation (#10028) --- packages/utils/src/requestdata.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utils/src/requestdata.ts b/packages/utils/src/requestdata.ts index f2ffeaf621a1..0249b7a2b481 100644 --- a/packages/utils/src/requestdata.ts +++ b/packages/utils/src/requestdata.ts @@ -365,7 +365,7 @@ function extractQueryParams( try { return ( req.query || - (typeof URL !== undefined && new URL(originalUrl).search.slice(1)) || + (typeof URL !== 'undefined' && new URL(originalUrl).search.slice(1)) || // In Node 8, `URL` isn't in the global scope, so we have to use the built-in module from Node (deps && deps.url && deps.url.parse(originalUrl).query) || undefined From 38eb964442117c2f194b05764a0da6e46da068eb Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 3 Jan 2024 13:49:47 +0100 Subject: [PATCH 34/51] feat(core): Deprecate `span.toTraceparent()` in favor of `spanToTraceHeader()` util (#10031) Instead, there is a new util `spanToTraceHeader(span)` which can be used. This is done to align the Span schema with OpenTelemetry. Open question: Do we need to re-export this from all our packages, so users can also use this directly? --- MIGRATION.md | 1 + packages/astro/src/server/meta.ts | 4 ++-- packages/astro/test/server/meta.test.ts | 12 +++++++++--- packages/core/src/index.ts | 1 + packages/core/src/tracing/hubextensions.ts | 3 ++- packages/core/src/tracing/span.ts | 5 +++-- packages/core/src/utils/spanUtils.ts | 9 +++++++++ packages/core/test/lib/utils/spanUtils.test.ts | 13 +++++++++++++ .../src/common/wrapAppGetInitialPropsWithSentry.ts | 4 ++-- .../common/wrapErrorGetInitialPropsWithSentry.ts | 4 ++-- .../src/common/wrapGetInitialPropsWithSentry.ts | 4 ++-- .../src/common/wrapGetServerSidePropsWithSentry.ts | 4 ++-- packages/node/src/integrations/hapi/index.ts | 3 ++- packages/node/src/integrations/http.ts | 3 ++- packages/node/src/integrations/undici/index.ts | 3 ++- packages/node/test/integrations/undici.test.ts | 3 ++- packages/opentelemetry-node/src/propagator.ts | 3 ++- packages/remix/src/utils/instrumentServer.ts | 11 +++++++++-- packages/sveltekit/src/server/handle.ts | 4 ++-- packages/tracing-internal/src/browser/request.ts | 10 ++++++++-- packages/tracing-internal/src/common/fetch.ts | 10 ++++++++-- packages/types/src/span.ts | 5 ++++- 22 files changed, 89 insertions(+), 30 deletions(-) create mode 100644 packages/core/src/utils/spanUtils.ts create mode 100644 packages/core/test/lib/utils/spanUtils.test.ts diff --git a/MIGRATION.md b/MIGRATION.md index 98d92427c03f..0d8396cd6229 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -15,6 +15,7 @@ In v8, the Span class is heavily reworked. The following properties & methods ar * `span.toContext()`: Access the fields directly instead. * `span.updateWithContext(newSpanContext)`: Update the fields directly instead. * `span.setName(newName)`: Use `span.updateName(newName)` instead. +* `span.toTraceparent()`: use `spanToTraceHeader(span)` util instead. ## Deprecate `pushScope` & `popScope` in favor of `withScope` diff --git a/packages/astro/src/server/meta.ts b/packages/astro/src/server/meta.ts index 643565e7afaa..bdc0d89d4f80 100644 --- a/packages/astro/src/server/meta.ts +++ b/packages/astro/src/server/meta.ts @@ -1,4 +1,4 @@ -import { getDynamicSamplingContextFromClient } from '@sentry/core'; +import { getDynamicSamplingContextFromClient, spanToTraceHeader } from '@sentry/core'; import type { Client, Scope, Span } from '@sentry/types'; import { TRACEPARENT_REGEXP, @@ -30,7 +30,7 @@ export function getTracingMetaTags( const { dsc, sampled, traceId } = scope.getPropagationContext(); const transaction = span?.transaction; - const sentryTrace = span ? span.toTraceparent() : generateSentryTraceHeader(traceId, undefined, sampled); + const sentryTrace = span ? spanToTraceHeader(span) : generateSentryTraceHeader(traceId, undefined, sampled); const dynamicSamplingContext = transaction ? transaction.getDynamicSamplingContext() diff --git a/packages/astro/test/server/meta.test.ts b/packages/astro/test/server/meta.test.ts index 279f36395107..69caef326936 100644 --- a/packages/astro/test/server/meta.test.ts +++ b/packages/astro/test/server/meta.test.ts @@ -4,7 +4,9 @@ import { vi } from 'vitest'; import { getTracingMetaTags, isValidBaggageString } from '../../src/server/meta'; const mockedSpan = { - toTraceparent: () => '12345678901234567890123456789012-1234567890123456-1', + sampled: true, + traceId: '12345678901234567890123456789012', + spanId: '1234567890123456', transaction: { getDynamicSamplingContext: () => ({ environment: 'production', @@ -68,7 +70,9 @@ describe('getTracingMetaTags', () => { const tags = getTracingMetaTags( // @ts-expect-error - only passing a partial span object { - toTraceparent: () => '12345678901234567890123456789012-1234567890123456-1', + sampled: true, + traceId: '12345678901234567890123456789012', + spanId: '1234567890123456', transaction: undefined, }, mockedScope, @@ -89,7 +93,9 @@ describe('getTracingMetaTags', () => { const tags = getTracingMetaTags( // @ts-expect-error - only passing a partial span object { - toTraceparent: () => '12345678901234567890123456789012-1234567890123456-1', + sampled: true, + traceId: '12345678901234567890123456789012', + spanId: '1234567890123456', transaction: undefined, }, mockedScope, diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 3954dc6a7005..385352470b34 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -69,6 +69,7 @@ export { prepareEvent } from './utils/prepareEvent'; export { createCheckInEnvelope } from './checkin'; export { hasTracingEnabled } from './utils/hasTracingEnabled'; export { isSentryRequestUrl } from './utils/isSentryRequestUrl'; +export { spanToTraceHeader } from './utils/spanUtils'; export { DEFAULT_ENVIRONMENT } from './constants'; export { ModuleMetadata } from './integrations/metadata'; export { RequestData } from './integrations/requestdata'; diff --git a/packages/core/src/tracing/hubextensions.ts b/packages/core/src/tracing/hubextensions.ts index 7cd8286860b2..7047a54f1d72 100644 --- a/packages/core/src/tracing/hubextensions.ts +++ b/packages/core/src/tracing/hubextensions.ts @@ -4,6 +4,7 @@ import { logger } from '@sentry/utils'; import { DEBUG_BUILD } from '../debug-build'; import type { Hub } from '../hub'; import { getMainCarrier } from '../hub'; +import { spanToTraceHeader } from '../utils/spanUtils'; import { registerErrorInstrumentation } from './errors'; import { IdleTransaction } from './idletransaction'; import { sampleTransaction } from './sampling'; @@ -16,7 +17,7 @@ function traceHeaders(this: Hub): { [key: string]: string } { return span ? { - 'sentry-trace': span.toTraceparent(), + 'sentry-trace': spanToTraceHeader(span), } : {}; } diff --git a/packages/core/src/tracing/span.ts b/packages/core/src/tracing/span.ts index 29584f65858d..a3496c5d01d0 100644 --- a/packages/core/src/tracing/span.ts +++ b/packages/core/src/tracing/span.ts @@ -10,9 +10,10 @@ import type { TraceContext, Transaction, } from '@sentry/types'; -import { dropUndefinedKeys, generateSentryTraceHeader, logger, timestampInSeconds, uuid4 } from '@sentry/utils'; +import { dropUndefinedKeys, logger, timestampInSeconds, uuid4 } from '@sentry/utils'; import { DEBUG_BUILD } from '../debug-build'; +import { spanToTraceHeader } from '../utils/spanUtils'; import { ensureTimestampInSeconds } from './utils'; /** @@ -320,7 +321,7 @@ export class Span implements SpanInterface { * @inheritDoc */ public toTraceparent(): string { - return generateSentryTraceHeader(this.traceId, this.spanId, this.sampled); + return spanToTraceHeader(this); } /** diff --git a/packages/core/src/utils/spanUtils.ts b/packages/core/src/utils/spanUtils.ts new file mode 100644 index 000000000000..17385fb59c3c --- /dev/null +++ b/packages/core/src/utils/spanUtils.ts @@ -0,0 +1,9 @@ +import type { Span } from '@sentry/types'; +import { generateSentryTraceHeader } from '@sentry/utils'; + +/** + * Convert a Span to a Sentry trace header. + */ +export function spanToTraceHeader(span: Span): string { + return generateSentryTraceHeader(span.traceId, span.spanId, span.sampled); +} diff --git a/packages/core/test/lib/utils/spanUtils.test.ts b/packages/core/test/lib/utils/spanUtils.test.ts new file mode 100644 index 000000000000..c2ed4dd0d4cd --- /dev/null +++ b/packages/core/test/lib/utils/spanUtils.test.ts @@ -0,0 +1,13 @@ +import { TRACEPARENT_REGEXP } from '@sentry/utils'; +import { Span, spanToTraceHeader } from '../../../src'; + +describe('spanToTraceHeader', () => { + test('simple', () => { + const span = new Span(); + expect(spanToTraceHeader(span)).toMatch(TRACEPARENT_REGEXP); + }); + test('with sample', () => { + const span = new Span({ sampled: true }); + expect(spanToTraceHeader(span)).toMatch(TRACEPARENT_REGEXP); + }); +}); diff --git a/packages/nextjs/src/common/wrapAppGetInitialPropsWithSentry.ts b/packages/nextjs/src/common/wrapAppGetInitialPropsWithSentry.ts index eddf7f4e25e4..cd6cc4934493 100644 --- a/packages/nextjs/src/common/wrapAppGetInitialPropsWithSentry.ts +++ b/packages/nextjs/src/common/wrapAppGetInitialPropsWithSentry.ts @@ -1,4 +1,4 @@ -import { addTracingExtensions, getClient, getCurrentScope } from '@sentry/core'; +import { addTracingExtensions, getClient, getCurrentScope, spanToTraceHeader } from '@sentry/core'; import { dynamicSamplingContextToSentryBaggageHeader } from '@sentry/utils'; import type App from 'next/app'; @@ -63,7 +63,7 @@ export function wrapAppGetInitialPropsWithSentry(origAppGetInitialProps: AppGetI } if (requestTransaction) { - appGetInitialProps.pageProps._sentryTraceData = requestTransaction.toTraceparent(); + appGetInitialProps.pageProps._sentryTraceData = spanToTraceHeader(requestTransaction); const dynamicSamplingContext = requestTransaction.getDynamicSamplingContext(); appGetInitialProps.pageProps._sentryBaggage = diff --git a/packages/nextjs/src/common/wrapErrorGetInitialPropsWithSentry.ts b/packages/nextjs/src/common/wrapErrorGetInitialPropsWithSentry.ts index 0e4601886cee..b26e4a2434c3 100644 --- a/packages/nextjs/src/common/wrapErrorGetInitialPropsWithSentry.ts +++ b/packages/nextjs/src/common/wrapErrorGetInitialPropsWithSentry.ts @@ -1,4 +1,4 @@ -import { addTracingExtensions, getClient, getCurrentScope } from '@sentry/core'; +import { addTracingExtensions, getClient, getCurrentScope, spanToTraceHeader } from '@sentry/core'; import { dynamicSamplingContextToSentryBaggageHeader } from '@sentry/utils'; import type { NextPageContext } from 'next'; import type { ErrorProps } from 'next/error'; @@ -55,7 +55,7 @@ export function wrapErrorGetInitialPropsWithSentry( const requestTransaction = getTransactionFromRequest(req) ?? getCurrentScope().getTransaction(); if (requestTransaction) { - errorGetInitialProps._sentryTraceData = requestTransaction.toTraceparent(); + errorGetInitialProps._sentryTraceData = spanToTraceHeader(requestTransaction); const dynamicSamplingContext = requestTransaction.getDynamicSamplingContext(); errorGetInitialProps._sentryBaggage = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext); diff --git a/packages/nextjs/src/common/wrapGetInitialPropsWithSentry.ts b/packages/nextjs/src/common/wrapGetInitialPropsWithSentry.ts index 510cbae5684c..df4e3febfefc 100644 --- a/packages/nextjs/src/common/wrapGetInitialPropsWithSentry.ts +++ b/packages/nextjs/src/common/wrapGetInitialPropsWithSentry.ts @@ -1,4 +1,4 @@ -import { addTracingExtensions, getClient, getCurrentScope } from '@sentry/core'; +import { addTracingExtensions, getClient, getCurrentScope, spanToTraceHeader } from '@sentry/core'; import { dynamicSamplingContextToSentryBaggageHeader } from '@sentry/utils'; import type { NextPage } from 'next'; @@ -51,7 +51,7 @@ export function wrapGetInitialPropsWithSentry(origGetInitialProps: GetInitialPro const requestTransaction = getTransactionFromRequest(req) ?? getCurrentScope().getTransaction(); if (requestTransaction) { - initialProps._sentryTraceData = requestTransaction.toTraceparent(); + initialProps._sentryTraceData = spanToTraceHeader(requestTransaction); const dynamicSamplingContext = requestTransaction.getDynamicSamplingContext(); initialProps._sentryBaggage = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext); diff --git a/packages/nextjs/src/common/wrapGetServerSidePropsWithSentry.ts b/packages/nextjs/src/common/wrapGetServerSidePropsWithSentry.ts index f93c7193418e..c74f9db7292b 100644 --- a/packages/nextjs/src/common/wrapGetServerSidePropsWithSentry.ts +++ b/packages/nextjs/src/common/wrapGetServerSidePropsWithSentry.ts @@ -1,4 +1,4 @@ -import { addTracingExtensions, getClient, getCurrentScope } from '@sentry/core'; +import { addTracingExtensions, getClient, getCurrentScope, spanToTraceHeader } from '@sentry/core'; import { dynamicSamplingContextToSentryBaggageHeader } from '@sentry/utils'; import type { GetServerSideProps } from 'next'; @@ -48,7 +48,7 @@ export function wrapGetServerSidePropsWithSentry( if (serverSideProps && 'props' in serverSideProps) { const requestTransaction = getTransactionFromRequest(req) ?? getCurrentScope().getTransaction(); if (requestTransaction) { - serverSideProps.props._sentryTraceData = requestTransaction.toTraceparent(); + serverSideProps.props._sentryTraceData = spanToTraceHeader(requestTransaction); const dynamicSamplingContext = requestTransaction.getDynamicSamplingContext(); serverSideProps.props._sentryBaggage = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext); diff --git a/packages/node/src/integrations/hapi/index.ts b/packages/node/src/integrations/hapi/index.ts index 15ff63be5f70..732839d3995c 100644 --- a/packages/node/src/integrations/hapi/index.ts +++ b/packages/node/src/integrations/hapi/index.ts @@ -5,6 +5,7 @@ import { convertIntegrationFnToClass, getActiveTransaction, getCurrentScope, + spanToTraceHeader, startTransaction, } from '@sentry/core'; import type { IntegrationFn } from '@sentry/types'; @@ -93,7 +94,7 @@ export const hapiTracingPlugin = { if (request.response && isResponseObject(request.response) && transaction) { const response = request.response as ResponseObject; - response.header('sentry-trace', transaction.toTraceparent()); + response.header('sentry-trace', spanToTraceHeader(transaction)); const dynamicSamplingContext = dynamicSamplingContextToSentryBaggageHeader( transaction.getDynamicSamplingContext(), diff --git a/packages/node/src/integrations/http.ts b/packages/node/src/integrations/http.ts index f0734142a3e1..61046eb8f38d 100644 --- a/packages/node/src/integrations/http.ts +++ b/packages/node/src/integrations/http.ts @@ -1,6 +1,7 @@ import type * as http from 'http'; import type * as https from 'https'; import type { Hub } from '@sentry/core'; +import { spanToTraceHeader } from '@sentry/core'; import { addBreadcrumb, getClient, getCurrentScope } from '@sentry/core'; import { getCurrentHub, getDynamicSamplingContextFromClient, isSentryRequestUrl } from '@sentry/core'; import type { @@ -260,7 +261,7 @@ function _createWrappedRequestMethodFactory( if (shouldAttachTraceData(rawRequestUrl)) { if (requestSpan) { - const sentryTraceHeader = requestSpan.toTraceparent(); + const sentryTraceHeader = spanToTraceHeader(requestSpan); const dynamicSamplingContext = requestSpan?.transaction?.getDynamicSamplingContext(); addHeadersToRequestOptions(requestOptions, requestUrl, sentryTraceHeader, dynamicSamplingContext); } else { diff --git a/packages/node/src/integrations/undici/index.ts b/packages/node/src/integrations/undici/index.ts index d7111a6076de..117ef602ac38 100644 --- a/packages/node/src/integrations/undici/index.ts +++ b/packages/node/src/integrations/undici/index.ts @@ -5,6 +5,7 @@ import { getCurrentScope, getDynamicSamplingContextFromClient, isSentryRequestUrl, + spanToTraceHeader, } from '@sentry/core'; import type { EventProcessor, Integration, Span } from '@sentry/types'; import { @@ -183,7 +184,7 @@ export class Undici implements Integration { const dynamicSamplingContext = span?.transaction?.getDynamicSamplingContext(); const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext); - setHeadersOnRequest(request, span.toTraceparent(), sentryBaggageHeader); + setHeadersOnRequest(request, spanToTraceHeader(span), sentryBaggageHeader); } else { const { traceId, sampled, dsc } = scope.getPropagationContext(); const sentryTrace = generateSentryTraceHeader(traceId, undefined, sampled); diff --git a/packages/node/test/integrations/undici.test.ts b/packages/node/test/integrations/undici.test.ts index 27cde77fdcc3..078d90c98721 100644 --- a/packages/node/test/integrations/undici.test.ts +++ b/packages/node/test/integrations/undici.test.ts @@ -1,5 +1,6 @@ import * as http from 'http'; import type { Transaction } from '@sentry/core'; +import { spanToTraceHeader } from '@sentry/core'; import { Hub, makeMain, runWithAsyncContext } from '@sentry/core'; import type { fetch as FetchType } from 'undici'; @@ -207,7 +208,7 @@ conditionalTest({ min: 16 })('Undici integration', () => { expect(transaction.spanRecorder?.spans.length).toBe(2); const span = transaction.spanRecorder?.spans[1]; - expect(requestHeaders['sentry-trace']).toEqual(span?.toTraceparent()); + expect(requestHeaders['sentry-trace']).toEqual(spanToTraceHeader(span!)); expect(requestHeaders['baggage']).toEqual( `sentry-environment=production,sentry-public_key=0,sentry-trace_id=${transaction.traceId},sentry-sample_rate=1,sentry-transaction=test-transaction`, ); diff --git a/packages/opentelemetry-node/src/propagator.ts b/packages/opentelemetry-node/src/propagator.ts index a8154c21e088..ce0f295ce720 100644 --- a/packages/opentelemetry-node/src/propagator.ts +++ b/packages/opentelemetry-node/src/propagator.ts @@ -1,6 +1,7 @@ import type { Baggage, Context, TextMapGetter, TextMapSetter } from '@opentelemetry/api'; import { TraceFlags, isSpanContextValid, propagation, trace } from '@opentelemetry/api'; import { W3CBaggagePropagator, isTracingSuppressed } from '@opentelemetry/core'; +import { spanToTraceHeader } from '@sentry/core'; import { SENTRY_BAGGAGE_KEY_PREFIX, baggageHeaderToDynamicSamplingContext, @@ -32,7 +33,7 @@ export class SentryPropagator extends W3CBaggagePropagator { const span = getSentrySpan(spanContext.spanId); if (span) { - setter.set(carrier, SENTRY_TRACE_HEADER, span.toTraceparent()); + setter.set(carrier, SENTRY_TRACE_HEADER, spanToTraceHeader(span)); if (span.transaction) { const dynamicSamplingContext = span.transaction.getDynamicSamplingContext(); diff --git a/packages/remix/src/utils/instrumentServer.ts b/packages/remix/src/utils/instrumentServer.ts index 62d820a30eeb..f557542e64ce 100644 --- a/packages/remix/src/utils/instrumentServer.ts +++ b/packages/remix/src/utils/instrumentServer.ts @@ -1,5 +1,12 @@ /* eslint-disable max-lines */ -import { getActiveTransaction, getClient, getCurrentScope, hasTracingEnabled, runWithAsyncContext } from '@sentry/core'; +import { + getActiveTransaction, + getClient, + getCurrentScope, + hasTracingEnabled, + runWithAsyncContext, + spanToTraceHeader, +} from '@sentry/core'; import type { Hub } from '@sentry/node'; import { captureException, getCurrentHub } from '@sentry/node'; import type { Transaction, TransactionSource, WrappedFunction } from '@sentry/types'; @@ -293,7 +300,7 @@ function getTraceAndBaggage(): { const dynamicSamplingContext = transaction.getDynamicSamplingContext(); return { - sentryTrace: span.toTraceparent(), + sentryTrace: spanToTraceHeader(span), sentryBaggage: dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext), }; } diff --git a/packages/sveltekit/src/server/handle.ts b/packages/sveltekit/src/server/handle.ts index c999e7ad6fe9..540de96c6de9 100644 --- a/packages/sveltekit/src/server/handle.ts +++ b/packages/sveltekit/src/server/handle.ts @@ -1,4 +1,4 @@ -import { getCurrentScope } from '@sentry/core'; +import { getCurrentScope, spanToTraceHeader } from '@sentry/core'; import { getActiveTransaction, runWithAsyncContext, startSpan } from '@sentry/core'; import { captureException } from '@sentry/node'; /* eslint-disable @sentry-internal/sdk/no-optional-chaining */ @@ -97,7 +97,7 @@ export function addSentryCodeToPage(options: SentryHandleOptions): NonNullable { const transaction = getActiveTransaction(); if (transaction) { - const traceparentData = transaction.toTraceparent(); + const traceparentData = spanToTraceHeader(transaction); const dynamicSamplingContext = dynamicSamplingContextToSentryBaggageHeader( transaction.getDynamicSamplingContext(), ); diff --git a/packages/tracing-internal/src/browser/request.ts b/packages/tracing-internal/src/browser/request.ts index cc77ca4889f9..b85d54c96622 100644 --- a/packages/tracing-internal/src/browser/request.ts +++ b/packages/tracing-internal/src/browser/request.ts @@ -1,5 +1,11 @@ /* eslint-disable max-lines */ -import { getClient, getCurrentScope, getDynamicSamplingContextFromClient, hasTracingEnabled } from '@sentry/core'; +import { + getClient, + getCurrentScope, + getDynamicSamplingContextFromClient, + hasTracingEnabled, + spanToTraceHeader, +} from '@sentry/core'; import type { HandlerDataXhr, SentryWrappedXMLHttpRequest, Span } from '@sentry/types'; import { BAGGAGE_HEADER_NAME, @@ -291,7 +297,7 @@ export function xhrCallback( const transaction = span && span.transaction; const dynamicSamplingContext = transaction && transaction.getDynamicSamplingContext(); const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext); - setHeaderOnXhr(xhr, span.toTraceparent(), sentryBaggageHeader); + setHeaderOnXhr(xhr, spanToTraceHeader(span), sentryBaggageHeader); } else { const client = getClient(); const { traceId, sampled, dsc } = scope.getPropagationContext(); diff --git a/packages/tracing-internal/src/common/fetch.ts b/packages/tracing-internal/src/common/fetch.ts index 2150518ea570..dfc81bff05f7 100644 --- a/packages/tracing-internal/src/common/fetch.ts +++ b/packages/tracing-internal/src/common/fetch.ts @@ -1,4 +1,10 @@ -import { getClient, getCurrentScope, getDynamicSamplingContextFromClient, hasTracingEnabled } from '@sentry/core'; +import { + getClient, + getCurrentScope, + getDynamicSamplingContextFromClient, + hasTracingEnabled, + spanToTraceHeader, +} from '@sentry/core'; import type { Client, HandlerDataFetch, Scope, Span, SpanOrigin } from '@sentry/types'; import { BAGGAGE_HEADER_NAME, @@ -128,7 +134,7 @@ export function addTracingHeadersToFetchRequest( const { traceId, sampled, dsc } = scope.getPropagationContext(); - const sentryTraceHeader = span ? span.toTraceparent() : generateSentryTraceHeader(traceId, undefined, sampled); + const sentryTraceHeader = span ? spanToTraceHeader(span) : generateSentryTraceHeader(traceId, undefined, sampled); const dynamicSamplingContext = transaction ? transaction.getDynamicSamplingContext() : dsc diff --git a/packages/types/src/span.ts b/packages/types/src/span.ts index 3614961e7182..8fd384f4ba11 100644 --- a/packages/types/src/span.ts +++ b/packages/types/src/span.ts @@ -225,7 +225,10 @@ export interface Span extends SpanContext { */ isSuccess(): boolean; - /** Return a traceparent compatible header string */ + /** + * Return a traceparent compatible header string. + * @deprecated Use `spanToTraceHeader()` instead. + */ toTraceparent(): string; /** From 848e6adff0515ea070ce25eec36000ffda1c89dc Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 3 Jan 2024 15:29:56 +0100 Subject: [PATCH 35/51] feat(core): Deprecate `span.getTraceContext()` (#10032) Instead, you can use a new `spanToTraceContext(span)` util function. --- MIGRATION.md | 1 + packages/core/src/server-runtime-client.ts | 3 ++- packages/core/src/tracing/span.ts | 14 ++--------- packages/core/src/tracing/transaction.ts | 3 ++- .../core/src/utils/applyScopeDataToEvent.ts | 3 ++- packages/core/src/utils/spanUtils.ts | 23 +++++++++++++++++-- packages/hub/test/scope.test.ts | 10 ++++---- packages/types/src/span.ts | 18 ++++++--------- 8 files changed, 42 insertions(+), 33 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 0d8396cd6229..7a3853e996bc 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -16,6 +16,7 @@ In v8, the Span class is heavily reworked. The following properties & methods ar * `span.updateWithContext(newSpanContext)`: Update the fields directly instead. * `span.setName(newName)`: Use `span.updateName(newName)` instead. * `span.toTraceparent()`: use `spanToTraceHeader(span)` util instead. +* `span.getTraceContext()`: Use `spanToTraceContext(span)` utility function instead. ## Deprecate `pushScope` & `popScope` in favor of `withScope` diff --git a/packages/core/src/server-runtime-client.ts b/packages/core/src/server-runtime-client.ts index 66d846c23911..68e1eb065d89 100644 --- a/packages/core/src/server-runtime-client.ts +++ b/packages/core/src/server-runtime-client.ts @@ -21,6 +21,7 @@ import { MetricsAggregator } from './metrics/aggregator'; import type { Scope } from './scope'; import { SessionFlusher } from './sessionflusher'; import { addTracingExtensions, getDynamicSamplingContextFromClient } from './tracing'; +import { spanToTraceContext } from './utils/spanUtils'; export interface ServerRuntimeClientOptions extends ClientOptions { platform?: string; @@ -256,7 +257,7 @@ export class ServerRuntimeClient< const span = scope.getSpan(); if (span) { const samplingContext = span.transaction ? span.transaction.getDynamicSamplingContext() : undefined; - return [samplingContext, span.getTraceContext()]; + return [samplingContext, spanToTraceContext(span)]; } const { traceId, spanId, parentSpanId, dsc } = scope.getPropagationContext(); diff --git a/packages/core/src/tracing/span.ts b/packages/core/src/tracing/span.ts index a3496c5d01d0..e30f6e416675 100644 --- a/packages/core/src/tracing/span.ts +++ b/packages/core/src/tracing/span.ts @@ -13,7 +13,7 @@ import type { import { dropUndefinedKeys, logger, timestampInSeconds, uuid4 } from '@sentry/utils'; import { DEBUG_BUILD } from '../debug-build'; -import { spanToTraceHeader } from '../utils/spanUtils'; +import { spanToTraceContext, spanToTraceHeader } from '../utils/spanUtils'; import { ensureTimestampInSeconds } from './utils'; /** @@ -366,17 +366,7 @@ export class Span implements SpanInterface { * @inheritDoc */ public getTraceContext(): TraceContext { - return dropUndefinedKeys({ - data: this._getData(), - description: this.description, - op: this.op, - parent_span_id: this.parentSpanId, - span_id: this.spanId, - status: this.status, - tags: Object.keys(this.tags).length > 0 ? this.tags : undefined, - trace_id: this.traceId, - origin: this.origin, - }); + return spanToTraceContext(this); } /** diff --git a/packages/core/src/tracing/transaction.ts b/packages/core/src/tracing/transaction.ts index 339d8d51e740..4652ab160143 100644 --- a/packages/core/src/tracing/transaction.ts +++ b/packages/core/src/tracing/transaction.ts @@ -14,6 +14,7 @@ import { dropUndefinedKeys, logger, timestampInSeconds } from '@sentry/utils'; import { DEBUG_BUILD } from '../debug-build'; import type { Hub } from '../hub'; import { getCurrentHub } from '../hub'; +import { spanToTraceContext } from '../utils/spanUtils'; import { getDynamicSamplingContextFromClient } from './dynamicSamplingContext'; import { Span as SpanClass, SpanRecorder } from './span'; import { ensureTimestampInSeconds } from './utils'; @@ -283,7 +284,7 @@ export class Transaction extends SpanClass implements TransactionInterface { contexts: { ...this._contexts, // We don't want to override trace context - trace: this.getTraceContext(), + trace: spanToTraceContext(this), }, spans: finishedSpans, start_timestamp: this.startTimestamp, diff --git a/packages/core/src/utils/applyScopeDataToEvent.ts b/packages/core/src/utils/applyScopeDataToEvent.ts index 1dab87aea866..96a85740ef64 100644 --- a/packages/core/src/utils/applyScopeDataToEvent.ts +++ b/packages/core/src/utils/applyScopeDataToEvent.ts @@ -1,5 +1,6 @@ import type { Breadcrumb, Event, PropagationContext, ScopeData, Span } from '@sentry/types'; import { arrayify } from '@sentry/utils'; +import { spanToTraceContext } from './spanUtils'; /** * Applies data from the scope to the event and runs all event processors on it. @@ -161,7 +162,7 @@ function applySdkMetadataToEvent( } function applySpanToEvent(event: Event, span: Span): void { - event.contexts = { trace: span.getTraceContext(), ...event.contexts }; + event.contexts = { trace: spanToTraceContext(span), ...event.contexts }; const transaction = span.transaction; if (transaction) { event.sdkProcessingMetadata = { diff --git a/packages/core/src/utils/spanUtils.ts b/packages/core/src/utils/spanUtils.ts index 17385fb59c3c..2dae21a78fca 100644 --- a/packages/core/src/utils/spanUtils.ts +++ b/packages/core/src/utils/spanUtils.ts @@ -1,5 +1,24 @@ -import type { Span } from '@sentry/types'; -import { generateSentryTraceHeader } from '@sentry/utils'; +import type { Span, TraceContext } from '@sentry/types'; +import { dropUndefinedKeys, generateSentryTraceHeader } from '@sentry/utils'; + +/** + * Convert a span to a trace context, which can be sent as the `trace` context in an event. + */ +export function spanToTraceContext(span: Span): TraceContext { + const { data, description, op, parent_span_id, span_id, status, tags, trace_id, origin } = span.toJSON(); + + return dropUndefinedKeys({ + data, + description, + op, + parent_span_id, + span_id, + status, + tags, + trace_id, + origin, + }); +} /** * Convert a Span to a Sentry trace header. diff --git a/packages/hub/test/scope.test.ts b/packages/hub/test/scope.test.ts index a2be18b0526d..4cb8694b9cca 100644 --- a/packages/hub/test/scope.test.ts +++ b/packages/hub/test/scope.test.ts @@ -361,12 +361,12 @@ describe('Scope', () => { const scope = new Scope(); const span = { fake: 'span', - getTraceContext: () => ({ a: 'b' }), + toJSON: () => ({ origin: 'manual' }), } as any; scope.setSpan(span); const event: Event = {}; const processedEvent = await scope.applyToEvent(event); - expect((processedEvent!.contexts!.trace as any).a).toEqual('b'); + expect(processedEvent!.contexts!.trace as any).toEqual({ origin: 'manual' }); }); test('existing trace context in event should take precedence', async () => { @@ -374,7 +374,7 @@ describe('Scope', () => { const scope = new Scope(); const span = { fake: 'span', - getTraceContext: () => ({ a: 'b' }), + toJSON: () => ({ a: 'b' }), } as any; scope.setSpan(span); const event: Event = { @@ -392,7 +392,7 @@ describe('Scope', () => { const scope = new Scope(); const transaction = { fake: 'span', - getTraceContext: () => ({ a: 'b' }), + toJSON: () => ({ a: 'b' }), name: 'fake transaction', getDynamicSamplingContext: () => ({}), } as any; @@ -410,7 +410,7 @@ describe('Scope', () => { const transaction = { name: 'fake transaction', getDynamicSamplingContext: () => ({}) }; const span = { fake: 'span', - getTraceContext: () => ({ a: 'b' }), + toJSON: () => ({ a: 'b' }), transaction, } as any; scope.setSpan(span); diff --git a/packages/types/src/span.ts b/packages/types/src/span.ts index 8fd384f4ba11..3e625dc7dd9f 100644 --- a/packages/types/src/span.ts +++ b/packages/types/src/span.ts @@ -1,3 +1,4 @@ +import type { TraceContext } from './context'; import type { Instrumenter } from './instrumenter'; import type { Primitive } from './misc'; import type { Transaction } from './transaction'; @@ -243,17 +244,11 @@ export interface Span extends SpanContext { */ updateWithContext(spanContext: SpanContext): this; - /** Convert the object to JSON for w. spans array info only */ - getTraceContext(): { - data?: { [key: string]: any }; - description?: string; - op?: string; - parent_span_id?: string; - span_id: string; - status?: string; - tags?: { [key: string]: Primitive }; - trace_id: string; - }; + /** + * Convert the object to JSON for w. spans array info only. + * @deprecated Use `spanToTraceContext()` util function instead. + */ + getTraceContext(): TraceContext; /** Convert the object to JSON */ toJSON(): { @@ -267,5 +262,6 @@ export interface Span extends SpanContext { tags?: { [key: string]: Primitive }; timestamp?: number; trace_id: string; + origin?: SpanOrigin; }; } From 651ef4a693077059e46a73ee2f3d779b238b1590 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 3 Jan 2024 16:21:22 +0100 Subject: [PATCH 36/51] ref: Deprecate `deepReadDirSync` (#10016) --- packages/astro/src/index.server.ts | 1 + packages/nextjs/test/buildProcess/tests/nft.test.ts | 1 + packages/node-experimental/src/index.ts | 1 + packages/node/src/index.ts | 1 + packages/node/src/utils.ts | 1 + packages/node/test/utils.test.ts | 4 ++++ packages/remix/src/index.server.ts | 1 + packages/serverless/src/index.ts | 1 + packages/sveltekit/src/server/index.ts | 1 + 9 files changed, 12 insertions(+) diff --git a/packages/astro/src/index.server.ts b/packages/astro/src/index.server.ts index 73dce6f0fa7f..5dd9f1047431 100644 --- a/packages/astro/src/index.server.ts +++ b/packages/astro/src/index.server.ts @@ -54,6 +54,7 @@ export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData, + // eslint-disable-next-line deprecation/deprecation deepReadDirSync, Integrations, Handlers, diff --git a/packages/nextjs/test/buildProcess/tests/nft.test.ts b/packages/nextjs/test/buildProcess/tests/nft.test.ts index fb208a9cae0c..84226f79d446 100644 --- a/packages/nextjs/test/buildProcess/tests/nft.test.ts +++ b/packages/nextjs/test/buildProcess/tests/nft.test.ts @@ -33,6 +33,7 @@ it('excludes build-time SDK dependencies from nft files', () => { expect(rollupEntries.length).toEqual(0); // We don't want to accidentally remove the wrappers + // eslint-disable-next-line deprecation/deprecation const wrapperFiles = deepReadDirSync('src/config/wrappers/').filter(filename => filename !== 'types.ts'); expect(sentryWrapperEntries.length).toEqual(wrapperFiles.length); }); diff --git a/packages/node-experimental/src/index.ts b/packages/node-experimental/src/index.ts index c6771601c16f..b9ab8b0ce1ef 100644 --- a/packages/node-experimental/src/index.ts +++ b/packages/node-experimental/src/index.ts @@ -49,6 +49,7 @@ export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData, + // eslint-disable-next-line deprecation/deprecation deepReadDirSync, getModuleFromFilename, close, diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index c1db9de54194..d4297b768484 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -80,6 +80,7 @@ export { NodeClient } from './client'; export { makeNodeTransport } from './transports'; export { defaultIntegrations, init, defaultStackParser, getSentryRelease } from './sdk'; export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData } from '@sentry/utils'; +// eslint-disable-next-line deprecation/deprecation export { deepReadDirSync } from './utils'; export { getModuleFromFilename } from './module'; // eslint-disable-next-line deprecation/deprecation diff --git a/packages/node/src/utils.ts b/packages/node/src/utils.ts index 0ff47acf92c7..475709208ed9 100644 --- a/packages/node/src/utils.ts +++ b/packages/node/src/utils.ts @@ -7,6 +7,7 @@ import * as path from 'path'; * @param targetDir Absolute or relative path of the directory to scan. All returned paths will be relative to this * directory. * @returns Array holding all relative paths + * @deprecated This function will be removed in the next major version. */ export function deepReadDirSync(targetDir: string): string[] { const targetDirAbsPath = path.resolve(targetDir); diff --git a/packages/node/test/utils.test.ts b/packages/node/test/utils.test.ts index 0a62cf011c92..bcee236c070c 100644 --- a/packages/node/test/utils.test.ts +++ b/packages/node/test/utils.test.ts @@ -25,6 +25,7 @@ describe('deepReadDirSync', () => { ].map(p => (process.platform === 'win32' ? p.replace(/\//g, '\\') : p)); // compare sets so that order doesn't matter + // eslint-disable-next-line deprecation/deprecation expect(new Set(deepReadDirSync('./test/fixtures/testDeepReadDirSync'))).toEqual(new Set(expected)); }); @@ -35,6 +36,7 @@ describe('deepReadDirSync', () => { fs.mkdtemp(`${tmpDir}${path.sep}`, (err, dirPath) => { if (err) throw err; try { + // eslint-disable-next-line deprecation/deprecation expect(deepReadDirSync(dirPath)).toEqual([]); done(); } catch (error) { @@ -44,10 +46,12 @@ describe('deepReadDirSync', () => { }); it('errors if directory does not exist', () => { + // eslint-disable-next-line deprecation/deprecation expect(() => deepReadDirSync('./IDontExist')).toThrowError('Directory does not exist.'); }); it('errors if given path is not a directory', () => { + // eslint-disable-next-line deprecation/deprecation expect(() => deepReadDirSync('package.json')).toThrowError('it is not a directory'); }); }); diff --git a/packages/remix/src/index.server.ts b/packages/remix/src/index.server.ts index c62b3c9c729c..785285ecdaf1 100644 --- a/packages/remix/src/index.server.ts +++ b/packages/remix/src/index.server.ts @@ -53,6 +53,7 @@ export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData, + // eslint-disable-next-line deprecation/deprecation deepReadDirSync, Integrations, Handlers, diff --git a/packages/serverless/src/index.ts b/packages/serverless/src/index.ts index 77f355e1e8af..ff961df37019 100644 --- a/packages/serverless/src/index.ts +++ b/packages/serverless/src/index.ts @@ -55,6 +55,7 @@ export { DEFAULT_USER_INCLUDES, addRequestDataToEvent, extractRequestData, + // eslint-disable-next-line deprecation/deprecation deepReadDirSync, Handlers, Integrations, diff --git a/packages/sveltekit/src/server/index.ts b/packages/sveltekit/src/server/index.ts index b5d7d64a58a3..16556479511e 100644 --- a/packages/sveltekit/src/server/index.ts +++ b/packages/sveltekit/src/server/index.ts @@ -51,6 +51,7 @@ export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData, + // eslint-disable-next-line deprecation/deprecation deepReadDirSync, Integrations, Handlers, From 25356d2a15fd3724b67fa1974eaa975a855cb1e6 Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Wed, 3 Jan 2024 16:32:34 +0100 Subject: [PATCH 37/51] fix(node): Anr should not block exit (#10035) --- .../suites/anr/should-exit.js | 19 +++++++++++++++++++ .../node-integration-tests/suites/anr/test.ts | 14 ++++++++++++++ packages/node/src/integrations/anr/index.ts | 6 ++++++ 3 files changed, 39 insertions(+) create mode 100644 dev-packages/node-integration-tests/suites/anr/should-exit.js diff --git a/dev-packages/node-integration-tests/suites/anr/should-exit.js b/dev-packages/node-integration-tests/suites/anr/should-exit.js new file mode 100644 index 000000000000..cee261e8ccb3 --- /dev/null +++ b/dev-packages/node-integration-tests/suites/anr/should-exit.js @@ -0,0 +1,19 @@ +const Sentry = require('@sentry/node'); + +function configureSentry() { + Sentry.init({ + dsn: 'https://public@dsn.ingest.sentry.io/1337', + release: '1.0', + debug: true, + autoSessionTracking: false, + integrations: [new Sentry.Integrations.Anr({ captureStackTrace: true })], + }); +} + +async function main() { + configureSentry(); + await new Promise(resolve => setTimeout(resolve, 1000)); + process.exit(0); +} + +main(); diff --git a/dev-packages/node-integration-tests/suites/anr/test.ts b/dev-packages/node-integration-tests/suites/anr/test.ts index 011a0371a5d9..3e5e7c9643eb 100644 --- a/dev-packages/node-integration-tests/suites/anr/test.ts +++ b/dev-packages/node-integration-tests/suites/anr/test.ts @@ -115,6 +115,20 @@ conditionalTest({ min: 16 })('should report ANR when event loop blocked', () => }); }); + test('can exit', done => { + const testScriptPath = path.resolve(__dirname, 'should-exit.js'); + let hasClosed = false; + + setTimeout(() => { + expect(hasClosed).toBe(true); + done(); + }, 5_000); + + childProcess.exec(`node ${testScriptPath}`, { encoding: 'utf8' }, (_, stdout) => { + hasClosed = true; + }); + }); + test('With session', done => { expect.assertions(9); diff --git a/packages/node/src/integrations/anr/index.ts b/packages/node/src/integrations/anr/index.ts index 47bc13a34ecd..a6837a3a6752 100644 --- a/packages/node/src/integrations/anr/index.ts +++ b/packages/node/src/integrations/anr/index.ts @@ -123,6 +123,10 @@ async function _startWorker(client: NodeClient, _options: Partial): Pro // Ensure this thread can't block app exit worker.unref(); + process.on('exit', () => { + worker.terminate(); + }); + const timer = setInterval(() => { try { const currentSession = getCurrentScope().getSession(); @@ -135,6 +139,8 @@ async function _startWorker(client: NodeClient, _options: Partial): Pro // } }, options.pollInterval); + // Timer should not block exit + timer.unref(); worker.on('message', (msg: string) => { if (msg === 'session-ended') { From 011ba71efb03d780c8a718f8995e1c5439ca1837 Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Wed, 3 Jan 2024 16:33:07 +0100 Subject: [PATCH 38/51] fix(node): ANR fixes and additions (#9998) This PR makes a few fixes and additions to the ANR feature. - Stops passing the `sdk` property with the event since `enhanceEventWithSdkInfo` results in duplicate integrations/packages being sent! - Allows the passings of `staticTags` to attach to ANR events - Required by Electron SDK to tag the source `process/origin/environment` - Could also be useful for other users - Optionally enable normalising of stack frame paths to the app root - Required for Electron - Soon required for Node with #9072 The path normalisation code (and tests) are from the Electron SDK and is well tested on all platforms. However, it will only be called when `appRootPath` is supplied. If/when we add path normalisation to Node, it will have a default which can be overridden. The Electron SDK will then wrap the Node Anr integration something like this: ```ts class Anr extends NodeAnr { public constructor(options: Partial = {}) { super({ ...options, staticTags: { 'event.environment': 'javascript', 'event.origin': 'electron', 'event.process': 'browser', ...options.tags, }, appRootPath: app.getAppPath(), }); } } ``` --- packages/node/src/integrations/anr/common.ts | 12 +++- packages/node/src/integrations/anr/index.ts | 2 + packages/node/src/integrations/anr/worker.ts | 33 ++++++++-- packages/utils/src/normalize.ts | 30 +++++++++ packages/utils/test/normalize-url.test.ts | 64 ++++++++++++++++++++ 5 files changed, 134 insertions(+), 7 deletions(-) create mode 100644 packages/utils/test/normalize-url.test.ts diff --git a/packages/node/src/integrations/anr/common.ts b/packages/node/src/integrations/anr/common.ts index 38583dfacaaf..b548fa6bf5c1 100644 --- a/packages/node/src/integrations/anr/common.ts +++ b/packages/node/src/integrations/anr/common.ts @@ -1,4 +1,4 @@ -import type { Contexts, DsnComponents, SdkMetadata } from '@sentry/types'; +import type { Contexts, DsnComponents, Primitive, SdkMetadata } from '@sentry/types'; export interface Options { /** @@ -21,6 +21,16 @@ export interface Options { * This uses the node debugger which enables the inspector API and opens the required ports. */ captureStackTrace: boolean; + /** + * Tags to include with ANR events. + */ + staticTags: { [key: string]: Primitive }; + /** + * @ignore Internal use only. + * + * If this is supplied, stack frame filenames will be rewritten to be relative to this path. + */ + appRootPath: string | undefined; } export interface WorkerStartData extends Options { diff --git a/packages/node/src/integrations/anr/index.ts b/packages/node/src/integrations/anr/index.ts index a6837a3a6752..cbc0c47cbfc7 100644 --- a/packages/node/src/integrations/anr/index.ts +++ b/packages/node/src/integrations/anr/index.ts @@ -101,9 +101,11 @@ async function _startWorker(client: NodeClient, _options: Partial): Pro release: initOptions.release, dist: initOptions.dist, sdkMetadata, + appRootPath: _options.appRootPath, pollInterval: _options.pollInterval || DEFAULT_INTERVAL, anrThreshold: _options.anrThreshold || DEFAULT_HANG_THRESHOLD, captureStackTrace: !!_options.captureStackTrace, + staticTags: _options.staticTags || {}, contexts, }; diff --git a/packages/node/src/integrations/anr/worker.ts b/packages/node/src/integrations/anr/worker.ts index 142fe0d608e7..e2292ce0aff0 100644 --- a/packages/node/src/integrations/anr/worker.ts +++ b/packages/node/src/integrations/anr/worker.ts @@ -6,7 +6,7 @@ import { updateSession, } from '@sentry/core'; import type { Event, Session, StackFrame, TraceContext } from '@sentry/types'; -import { callFrameToStackFrame, stripSentryFramesAndReverse, watchdogTimer } from '@sentry/utils'; +import { callFrameToStackFrame, normalizeUrlToBase, stripSentryFramesAndReverse, watchdogTimer } from '@sentry/utils'; import { Session as InspectorSession } from 'inspector'; import { parentPort, workerData } from 'worker_threads'; import { makeNodeTransport } from '../../transports'; @@ -56,6 +56,28 @@ async function sendAbnormalSession(): Promise { log('Started'); +function prepareStackFrames(stackFrames: StackFrame[] | undefined): StackFrame[] | undefined { + if (!stackFrames) { + return undefined; + } + + // Strip Sentry frames and reverse the stack frames so they are in the correct order + const strippedFrames = stripSentryFramesAndReverse(stackFrames); + + // If we have an app root path, rewrite the filenames to be relative to the app root + if (options.appRootPath) { + for (const frame of strippedFrames) { + if (!frame.filename) { + continue; + } + + frame.filename = normalizeUrlToBase(frame.filename, options.appRootPath); + } + } + + return strippedFrames; +} + async function sendAnrEvent(frames?: StackFrame[], traceContext?: TraceContext): Promise { if (hasSentAnrEvent) { return; @@ -68,7 +90,6 @@ async function sendAnrEvent(frames?: StackFrame[], traceContext?: TraceContext): log('Sending event'); const event: Event = { - sdk: options.sdkMetadata.sdk, contexts: { ...options.contexts, trace: traceContext }, release: options.release, environment: options.environment, @@ -80,13 +101,13 @@ async function sendAnrEvent(frames?: StackFrame[], traceContext?: TraceContext): { type: 'ApplicationNotResponding', value: `Application Not Responding for at least ${options.anrThreshold} ms`, - stacktrace: { frames }, + stacktrace: { frames: prepareStackFrames(frames) }, // This ensures the UI doesn't say 'Crashed in' for the stack trace mechanism: { type: 'ANR' }, }, ], }, - tags: { 'process.name': 'ANR' }, + tags: options.staticTags, }; log(JSON.stringify(event)); @@ -130,8 +151,8 @@ if (options.captureStackTrace) { // copy the frames const callFrames = [...event.params.callFrames]; - const stackFrames = stripSentryFramesAndReverse( - callFrames.map(frame => callFrameToStackFrame(frame, scripts.get(frame.location.scriptId), () => undefined)), + const stackFrames = callFrames.map(frame => + callFrameToStackFrame(frame, scripts.get(frame.location.scriptId), () => undefined), ); // Evaluate a script in the currently paused context diff --git a/packages/utils/src/normalize.ts b/packages/utils/src/normalize.ts index 5445cc33ba58..18820ecdc989 100644 --- a/packages/utils/src/normalize.ts +++ b/packages/utils/src/normalize.ts @@ -277,3 +277,33 @@ function utf8Length(value: string): number { function jsonSize(value: any): number { return utf8Length(JSON.stringify(value)); } + +/** + * Normalizes URLs in exceptions and stacktraces to a base path so Sentry can fingerprint + * across platforms and working directory. + * + * @param url The URL to be normalized. + * @param basePath The application base path. + * @returns The normalized URL. + */ +export function normalizeUrlToBase(url: string, basePath: string): string { + const escapedBase = basePath + // Backslash to forward + .replace(/\\/g, '/') + // Escape RegExp special characters + .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&'); + + let newUrl = url; + try { + newUrl = decodeURI(url); + } catch (_Oo) { + // Sometime this breaks + } + return ( + newUrl + .replace(/\\/g, '/') + .replace(/webpack:\/?/g, '') // Remove intermediate base path + // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor + .replace(new RegExp(`(file://)?/*${escapedBase}/*`, 'ig'), 'app:///') + ); +} diff --git a/packages/utils/test/normalize-url.test.ts b/packages/utils/test/normalize-url.test.ts new file mode 100644 index 000000000000..5df2bb5d6e35 --- /dev/null +++ b/packages/utils/test/normalize-url.test.ts @@ -0,0 +1,64 @@ +import { normalizeUrlToBase } from '../src/normalize'; + +describe('normalizeUrlToBase()', () => { + it('Example app on Windows', () => { + const base = 'c:/Users/Username/sentry-electron/example'; + + expect(normalizeUrlToBase('C:\\Users\\Username\\sentry-electron\\example\\renderer.js', base)).toEqual( + 'app:///renderer.js', + ); + + expect( + normalizeUrlToBase('C:\\Users\\Username\\sentry-electron\\example\\sub-directory\\renderer.js', base), + ).toEqual('app:///sub-directory/renderer.js'); + + expect(normalizeUrlToBase('file:///C:/Users/Username/sentry-electron/example/index.html', base)).toEqual( + 'app:///index.html', + ); + }); + + it('Example app with parentheses', () => { + const base = 'c:/Users/Username/sentry-electron (beta)/example'; + + expect(normalizeUrlToBase('C:\\Users\\Username\\sentry-electron%20(beta)\\example\\renderer.js', base)).toEqual( + 'app:///renderer.js', + ); + + expect( + normalizeUrlToBase('C:\\Users\\Username\\sentry-electron%20(beta)\\example\\sub-directory\\renderer.js', base), + ).toEqual('app:///sub-directory/renderer.js'); + + expect(normalizeUrlToBase('file:///C:/Users/Username/sentry-electron%20(beta)/example/index.html', base)).toEqual( + 'app:///index.html', + ); + }); + + it('Asar packaged app in Windows Program Files', () => { + const base = 'C:/Program Files/My App/resources/app.asar'; + + expect(normalizeUrlToBase('/C:/Program%20Files/My%20App/resources/app.asar/dist/bundle-app.js', base)).toEqual( + 'app:///dist/bundle-app.js', + ); + + expect(normalizeUrlToBase('file:///C:/Program%20Files/My%20App/resources/app.asar/index.html', base)).toEqual( + 'app:///index.html', + ); + + expect(normalizeUrlToBase('file:///C:/Program%20Files/My%20App/resources/app.asar/a/index.html', base)).toEqual( + 'app:///a/index.html', + ); + }); + + it('Webpack builds', () => { + const base = '/home/haza/Desktop/foo/app/'; + expect( + normalizeUrlToBase('/home/haza/Desktop/foo/app/webpack:/electron/src/common/models/ipc-request.ts', base), + ).toEqual('app:///electron/src/common/models/ipc-request.ts'); + }); + + it('Only modifies file URLS', () => { + const base = 'c:/Users/Username/sentry-electron/example'; + expect(normalizeUrlToBase('https://some.host/index.html', base)).toEqual('https://some.host/index.html'); + expect(normalizeUrlToBase('http://localhost:43288/index.html', base)).toEqual('http://localhost:43288/index.html'); + }); +}); From 5cbe28be8b2beb39a33c33956099417eb9258246 Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Wed, 3 Jan 2024 16:37:45 +0100 Subject: [PATCH 39/51] feat(node): Instrumentation for `cron` library (#9999) ```ts import * as Sentry from '@sentry/node'; import { CronJob } from 'cron'; const CronJobWithCheckIn = Sentry.cron.instrumentCron(CronJob, 'my-cron-job'); // use the constructor const job = new CronJobWithCheckIn('* * * * *', () => { console.log('You will see this message every minute'); }); // or from const job = CronJobWithCheckIn.from({ cronTime: '* * * * *', onTick: () => { console.log('You will see this message every minute'); }); ``` --- packages/node/src/cron/common.ts | 50 ++++++++++++++ packages/node/src/cron/cron.ts | 115 +++++++++++++++++++++++++++++++ packages/node/src/index.ts | 7 ++ packages/node/test/cron.test.ts | 81 ++++++++++++++++++++++ 4 files changed, 253 insertions(+) create mode 100644 packages/node/src/cron/common.ts create mode 100644 packages/node/src/cron/cron.ts create mode 100644 packages/node/test/cron.test.ts diff --git a/packages/node/src/cron/common.ts b/packages/node/src/cron/common.ts new file mode 100644 index 000000000000..c710d154fdd5 --- /dev/null +++ b/packages/node/src/cron/common.ts @@ -0,0 +1,50 @@ +const replacements: [string, string][] = [ + ['january', '1'], + ['february', '2'], + ['march', '3'], + ['april', '4'], + ['may', '5'], + ['june', '6'], + ['july', '7'], + ['august', '8'], + ['september', '9'], + ['october', '10'], + ['november', '11'], + ['december', '12'], + ['jan', '1'], + ['feb', '2'], + ['mar', '3'], + ['apr', '4'], + ['may', '5'], + ['jun', '6'], + ['jul', '7'], + ['aug', '8'], + ['sep', '9'], + ['oct', '10'], + ['nov', '11'], + ['dec', '12'], + ['sunday', '0'], + ['monday', '1'], + ['tuesday', '2'], + ['wednesday', '3'], + ['thursday', '4'], + ['friday', '5'], + ['saturday', '6'], + ['sun', '0'], + ['mon', '1'], + ['tue', '2'], + ['wed', '3'], + ['thu', '4'], + ['fri', '5'], + ['sat', '6'], +]; + +/** + * Replaces names in cron expressions + */ +export function replaceCronNames(cronExpression: string): string { + return replacements.reduce( + (acc, [name, replacement]) => acc.replace(new RegExp(name, 'gi'), replacement), + cronExpression, + ); +} diff --git a/packages/node/src/cron/cron.ts b/packages/node/src/cron/cron.ts new file mode 100644 index 000000000000..a8b42ec0fed7 --- /dev/null +++ b/packages/node/src/cron/cron.ts @@ -0,0 +1,115 @@ +import { withMonitor } from '@sentry/core'; +import { replaceCronNames } from './common'; + +export type CronJobParams = { + cronTime: string | Date; + onTick: (context: unknown, onComplete?: unknown) => void | Promise; + onComplete?: () => void | Promise; + start?: boolean | null; + context?: unknown; + runOnInit?: boolean | null; + utcOffset?: number; + timeZone?: string; + unrefTimeout?: boolean | null; +}; + +export type CronJob = { + // +}; + +export type CronJobConstructor = { + from: (param: CronJobParams) => CronJob; + + new ( + cronTime: CronJobParams['cronTime'], + onTick: CronJobParams['onTick'], + onComplete?: CronJobParams['onComplete'], + start?: CronJobParams['start'], + timeZone?: CronJobParams['timeZone'], + context?: CronJobParams['context'], + runOnInit?: CronJobParams['runOnInit'], + utcOffset?: CronJobParams['utcOffset'], + unrefTimeout?: CronJobParams['unrefTimeout'], + ): CronJob; +}; + +const ERROR_TEXT = 'Automatic instrumentation of CronJob only supports crontab string'; + +/** + * Instruments the `cron` library to send a check-in event to Sentry for each job execution. + * + * ```ts + * import * as Sentry from '@sentry/node'; + * import { CronJob } from 'cron'; + * + * const CronJobWithCheckIn = Sentry.cron.instrumentCron(CronJob, 'my-cron-job'); + * + * // use the constructor + * const job = new CronJobWithCheckIn('* * * * *', () => { + * console.log('You will see this message every minute'); + * }); + * + * // or from + * const job = CronJobWithCheckIn.from({ cronTime: '* * * * *', onTick: () => { + * console.log('You will see this message every minute'); + * }); + * ``` + */ +export function instrumentCron(lib: T & CronJobConstructor, monitorSlug: string): T { + return new Proxy(lib, { + construct(target, args: ConstructorParameters) { + const [cronTime, onTick, onComplete, start, timeZone, ...rest] = args; + + if (typeof cronTime !== 'string') { + throw new Error(ERROR_TEXT); + } + + const cronString = replaceCronNames(cronTime); + + function monitoredTick(context: unknown, onComplete?: unknown): void | Promise { + return withMonitor( + monitorSlug, + () => { + return onTick(context, onComplete); + }, + { + schedule: { type: 'crontab', value: cronString }, + ...(timeZone ? { timeZone } : {}), + }, + ); + } + + return new target(cronTime, monitoredTick, onComplete, start, timeZone, ...rest); + }, + get(target, prop: keyof CronJobConstructor) { + if (prop === 'from') { + return (param: CronJobParams) => { + const { cronTime, onTick, timeZone } = param; + + if (typeof cronTime !== 'string') { + throw new Error(ERROR_TEXT); + } + + const cronString = replaceCronNames(cronTime); + + param.onTick = (context: unknown, onComplete?: unknown) => { + return withMonitor( + monitorSlug, + () => { + return onTick(context, onComplete); + }, + { + schedule: { type: 'crontab', value: cronString }, + ...(timeZone ? { timeZone } : {}), + }, + ); + }; + + return target.from(param); + }; + } else { + return target[prop]; + } + }, + }); +} diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index d4297b768484..140bbabf3bdc 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -118,3 +118,10 @@ const INTEGRATIONS = { export { INTEGRATIONS as Integrations, Handlers }; export { hapiErrorPlugin } from './integrations/hapi'; + +import { instrumentCron } from './cron/cron'; + +/** Methods to instrument cron libraries for Sentry check-ins */ +export const cron = { + instrumentCron, +}; diff --git a/packages/node/test/cron.test.ts b/packages/node/test/cron.test.ts new file mode 100644 index 000000000000..9d4b082e9c22 --- /dev/null +++ b/packages/node/test/cron.test.ts @@ -0,0 +1,81 @@ +import * as SentryCore from '@sentry/core'; + +import { cron } from '../src'; +import type { CronJob, CronJobParams } from '../src/cron/cron'; + +describe('cron', () => { + let withMonitorSpy: jest.SpyInstance; + + beforeEach(() => { + withMonitorSpy = jest.spyOn(SentryCore, 'withMonitor'); + }); + + afterEach(() => { + jest.restoreAllMocks(); + }); + + describe('cron', () => { + class CronJobMock { + constructor( + cronTime: CronJobParams['cronTime'], + onTick: CronJobParams['onTick'], + _onComplete?: CronJobParams['onComplete'], + _start?: CronJobParams['start'], + _timeZone?: CronJobParams['timeZone'], + _context?: CronJobParams['context'], + _runOnInit?: CronJobParams['runOnInit'], + _utcOffset?: CronJobParams['utcOffset'], + _unrefTimeout?: CronJobParams['unrefTimeout'], + ) { + expect(cronTime).toBe('* * * Jan,Sep Sun'); + expect(onTick).toBeInstanceOf(Function); + setImmediate(() => onTick(undefined, undefined)); + } + + static from(params: CronJobParams): CronJob { + return new CronJobMock( + params.cronTime, + params.onTick, + params.onComplete, + params.start, + params.timeZone, + params.context, + params.runOnInit, + params.utcOffset, + params.unrefTimeout, + ); + } + } + + test('new CronJob()', done => { + expect.assertions(4); + + const CronJobWithCheckIn = cron.instrumentCron(CronJobMock, 'my-cron-job'); + + const _ = new CronJobWithCheckIn('* * * Jan,Sep Sun', () => { + expect(withMonitorSpy).toHaveBeenCalledTimes(1); + expect(withMonitorSpy).toHaveBeenLastCalledWith('my-cron-job', expect.anything(), { + schedule: { type: 'crontab', value: '* * * 1,9 0' }, + }); + done(); + }); + }); + + test('CronJob.from()', done => { + expect.assertions(4); + + const CronJobWithCheckIn = cron.instrumentCron(CronJobMock, 'my-cron-job'); + + const _ = CronJobWithCheckIn.from({ + cronTime: '* * * Jan,Sep Sun', + onTick: () => { + expect(withMonitorSpy).toHaveBeenCalledTimes(1); + expect(withMonitorSpy).toHaveBeenLastCalledWith('my-cron-job', expect.anything(), { + schedule: { type: 'crontab', value: '* * * 1,9 0' }, + }); + done(); + }, + }); + }); + }); +}); From da7c95939f9dc36abcf6c4cabd08ad4fdbb7d920 Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Wed, 3 Jan 2024 17:56:19 +0100 Subject: [PATCH 40/51] feat(node): Instrumentation for `node-cron` library (#9904) ### Usage ```ts import * as Sentry from "@sentry/node"; import cron from "node-cron"; const cronWithCheckIn = Sentry.cron.instrumentNodeCron(cron); cronWithCheckIn.schedule( "* * * * *", () => { console.log("running a task every minute"); }, { name: "my-cron-job" }, ); ``` --- packages/astro/src/index.server.ts | 1 + packages/bun/src/index.ts | 2 +- packages/node/src/cron/common.ts | 1 + packages/node/src/cron/node-cron.ts | 61 ++++++++++++++++++++++++++ packages/node/src/index.ts | 2 + packages/node/test/cron.test.ts | 48 +++++++++++++++++++- packages/remix/src/index.server.ts | 1 + packages/sveltekit/src/server/index.ts | 1 + 8 files changed, 115 insertions(+), 2 deletions(-) create mode 100644 packages/node/src/cron/node-cron.ts diff --git a/packages/astro/src/index.server.ts b/packages/astro/src/index.server.ts index 5dd9f1047431..04d00134880b 100644 --- a/packages/astro/src/index.server.ts +++ b/packages/astro/src/index.server.ts @@ -66,6 +66,7 @@ export { startInactiveSpan, startSpanManual, continueTrace, + cron, } from '@sentry/node'; // We can still leave this for the carrier init and type exports diff --git a/packages/bun/src/index.ts b/packages/bun/src/index.ts index bc29dcd908b5..215f91e2cdd8 100644 --- a/packages/bun/src/index.ts +++ b/packages/bun/src/index.ts @@ -73,7 +73,7 @@ export { metrics, } from '@sentry/core'; export type { SpanStatusType } from '@sentry/core'; -export { autoDiscoverNodePerformanceMonitoringIntegrations } from '@sentry/node'; +export { autoDiscoverNodePerformanceMonitoringIntegrations, cron } from '@sentry/node'; export { BunClient } from './client'; export { defaultIntegrations, init } from './sdk'; diff --git a/packages/node/src/cron/common.ts b/packages/node/src/cron/common.ts index c710d154fdd5..0fa8c1c18d23 100644 --- a/packages/node/src/cron/common.ts +++ b/packages/node/src/cron/common.ts @@ -44,6 +44,7 @@ const replacements: [string, string][] = [ */ export function replaceCronNames(cronExpression: string): string { return replacements.reduce( + // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor (acc, [name, replacement]) => acc.replace(new RegExp(name, 'gi'), replacement), cronExpression, ); diff --git a/packages/node/src/cron/node-cron.ts b/packages/node/src/cron/node-cron.ts new file mode 100644 index 000000000000..ba3a3b555965 --- /dev/null +++ b/packages/node/src/cron/node-cron.ts @@ -0,0 +1,61 @@ +import { withMonitor } from '@sentry/core'; +import { replaceCronNames } from './common'; + +export interface NodeCronOptions { + name?: string; + timezone?: string; +} + +export interface NodeCron { + schedule: (cronExpression: string, callback: () => void, options?: NodeCronOptions) => unknown; +} + +/** + * Wraps the `node-cron` library with check-in monitoring. + * + * ```ts + * import * as Sentry from "@sentry/node"; + * import cron from "node-cron"; + * + * const cronWithCheckIn = Sentry.cron.instrumentNodeCron(cron); + * + * cronWithCheckIn.schedule( + * "* * * * *", + * () => { + * console.log("running a task every minute"); + * }, + * { name: "my-cron-job" }, + * ); + * ``` + */ +export function instrumentNodeCron(lib: Partial & T): T { + return new Proxy(lib, { + get(target, prop: keyof NodeCron) { + if (prop === 'schedule' && target.schedule) { + // When 'get' is called for schedule, return a proxied version of the schedule function + return new Proxy(target.schedule, { + apply(target, thisArg, argArray: Parameters) { + const [expression, _, options] = argArray; + + if (!options?.name) { + throw new Error('Missing "name" for scheduled job. A name is required for Sentry check-in monitoring.'); + } + + return withMonitor( + options.name, + () => { + return target.apply(thisArg, argArray); + }, + { + schedule: { type: 'crontab', value: replaceCronNames(expression) }, + timezone: options?.timezone, + }, + ); + }, + }); + } else { + return target[prop]; + } + }, + }); +} diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index 140bbabf3bdc..258e65590f9b 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -120,8 +120,10 @@ export { INTEGRATIONS as Integrations, Handlers }; export { hapiErrorPlugin } from './integrations/hapi'; import { instrumentCron } from './cron/cron'; +import { instrumentNodeCron } from './cron/node-cron'; /** Methods to instrument cron libraries for Sentry check-ins */ export const cron = { instrumentCron, + instrumentNodeCron, }; diff --git a/packages/node/test/cron.test.ts b/packages/node/test/cron.test.ts index 9d4b082e9c22..3c8bb1a66a4c 100644 --- a/packages/node/test/cron.test.ts +++ b/packages/node/test/cron.test.ts @@ -2,8 +2,9 @@ import * as SentryCore from '@sentry/core'; import { cron } from '../src'; import type { CronJob, CronJobParams } from '../src/cron/cron'; +import type { NodeCron, NodeCronOptions } from '../src/cron/node-cron'; -describe('cron', () => { +describe('cron check-ins', () => { let withMonitorSpy: jest.SpyInstance; beforeEach(() => { @@ -78,4 +79,49 @@ describe('cron', () => { }); }); }); + + describe('node-cron', () => { + test('calls withMonitor', done => { + expect.assertions(5); + + const nodeCron: NodeCron = { + schedule: (expression: string, callback: () => void, options?: NodeCronOptions): unknown => { + expect(expression).toBe('* * * Jan,Sep Sun'); + expect(callback).toBeInstanceOf(Function); + expect(options?.name).toBe('my-cron-job'); + return callback(); + }, + }; + + const cronWithCheckIn = cron.instrumentNodeCron(nodeCron); + + cronWithCheckIn.schedule( + '* * * Jan,Sep Sun', + () => { + expect(withMonitorSpy).toHaveBeenCalledTimes(1); + expect(withMonitorSpy).toHaveBeenLastCalledWith('my-cron-job', expect.anything(), { + schedule: { type: 'crontab', value: '* * * 1,9 0' }, + }); + done(); + }, + { name: 'my-cron-job' }, + ); + }); + + test('throws without supplied name', () => { + const nodeCron: NodeCron = { + schedule: (): unknown => { + return undefined; + }, + }; + + const cronWithCheckIn = cron.instrumentNodeCron(nodeCron); + + expect(() => { + cronWithCheckIn.schedule('* * * * *', () => { + // + }); + }).toThrowError('Missing "name" for scheduled job. A name is required for Sentry check-in monitoring.'); + }); + }); }); diff --git a/packages/remix/src/index.server.ts b/packages/remix/src/index.server.ts index 785285ecdaf1..6d4d9fee5626 100644 --- a/packages/remix/src/index.server.ts +++ b/packages/remix/src/index.server.ts @@ -57,6 +57,7 @@ export { deepReadDirSync, Integrations, Handlers, + cron, } from '@sentry/node'; // Keeping the `*` exports for backwards compatibility and types diff --git a/packages/sveltekit/src/server/index.ts b/packages/sveltekit/src/server/index.ts index 16556479511e..a7395e3cfb18 100644 --- a/packages/sveltekit/src/server/index.ts +++ b/packages/sveltekit/src/server/index.ts @@ -63,6 +63,7 @@ export { startInactiveSpan, startSpanManual, continueTrace, + cron, } from '@sentry/node'; // We can still leave this for the carrier init and type exports From 3acb7e4df7cea7cc1ebc0c341a6a0fd75d716d64 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Thu, 4 Jan 2024 03:40:39 -0500 Subject: [PATCH 41/51] fix(astro): handle commonjs related issues (#10042) --- packages/astro/src/integration/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/integration/index.ts b/packages/astro/src/integration/index.ts index 0ee4b3676590..142a0b0b3019 100644 --- a/packages/astro/src/integration/index.ts +++ b/packages/astro/src/integration/index.ts @@ -88,7 +88,7 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => { updateConfig({ vite: { ssr: { - noExternal: ['@sentry/astro', '@sentry/node'], + noExternal: ['@sentry/astro'], }, }, }); From a696aefc443871eadef0547ee468a149f29fab3f Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Thu, 4 Jan 2024 11:34:37 +0100 Subject: [PATCH 42/51] feat(core): Deprecate `trace` in favor of `startSpan` (#10012) Also add a `handleCallbackErrors` utility to replace this. We've been using this in a few places, and since it has a bit of a different usage than `startSpan` I had to add a new utility to properly make this work. The upside is that we now can ensure to use the same implementation for this "maybe promise" handling everywhere! --------- Co-authored-by: Luca Forstner --- packages/astro/src/index.server.ts | 1 + packages/browser/src/index.ts | 1 + packages/bun/src/index.ts | 1 + packages/core/src/index.ts | 1 + packages/core/src/tracing/index.ts | 1 + packages/core/src/tracing/trace.ts | 123 ++++---------- .../core/src/utils/handleCallbackErrors.ts | 63 ++++++++ .../lib/utils/handleCallbackErrors.test.ts | 150 ++++++++++++++++++ packages/deno/src/index.ts | 1 + .../src/common/utils/edgeWrapperUtils.ts | 31 ++-- .../common/withServerActionInstrumentation.ts | 12 +- .../wrapGenerationFunctionWithSentry.ts | 28 ++-- .../src/common/wrapRouteHandlerWithSentry.ts | 40 +++-- .../common/wrapServerComponentWithSentry.ts | 54 ++++--- .../nextjs/test/edge/edgeWrapperUtils.test.ts | 7 +- .../nextjs/test/edge/withSentryAPI.test.ts | 12 +- packages/node-experimental/src/index.ts | 1 + packages/node/src/index.ts | 1 + packages/opentelemetry/src/trace.ts | 64 ++------ packages/remix/src/index.server.ts | 1 + .../src/gcpfunction/cloud_events.ts | 23 +-- packages/serverless/src/gcpfunction/events.ts | 23 +-- packages/serverless/src/gcpfunction/http.ts | 24 +-- packages/sveltekit/src/client/load.ts | 7 +- packages/sveltekit/src/server/index.ts | 1 + packages/sveltekit/test/client/load.test.ts | 22 ++- .../src/node/integrations/prisma.ts | 4 +- .../test/integrations/node/prisma.test.ts | 18 +-- packages/vercel-edge/src/index.ts | 1 + 29 files changed, 418 insertions(+), 298 deletions(-) create mode 100644 packages/core/src/utils/handleCallbackErrors.ts create mode 100644 packages/core/test/lib/utils/handleCallbackErrors.test.ts diff --git a/packages/astro/src/index.server.ts b/packages/astro/src/index.server.ts index 04d00134880b..9b442fedee5c 100644 --- a/packages/astro/src/index.server.ts +++ b/packages/astro/src/index.server.ts @@ -41,6 +41,7 @@ export { setTags, setUser, spanStatusfromHttpCode, + // eslint-disable-next-line deprecation/deprecation trace, withScope, autoDiscoverNodePerformanceMonitoringIntegrations, diff --git a/packages/browser/src/index.ts b/packages/browser/src/index.ts index e357c05f14f1..d9afa470b2ba 100644 --- a/packages/browser/src/index.ts +++ b/packages/browser/src/index.ts @@ -48,6 +48,7 @@ export { extractTraceparentData, getActiveTransaction, spanStatusfromHttpCode, + // eslint-disable-next-line deprecation/deprecation trace, makeMultiplexedTransport, ModuleMetadata, diff --git a/packages/bun/src/index.ts b/packages/bun/src/index.ts index 215f91e2cdd8..b2e8e4e0eb25 100644 --- a/packages/bun/src/index.ts +++ b/packages/bun/src/index.ts @@ -60,6 +60,7 @@ export { setTags, setUser, spanStatusfromHttpCode, + // eslint-disable-next-line deprecation/deprecation trace, withScope, captureCheckIn, diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 385352470b34..bc49c8802dad 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -69,6 +69,7 @@ export { prepareEvent } from './utils/prepareEvent'; export { createCheckInEnvelope } from './checkin'; export { hasTracingEnabled } from './utils/hasTracingEnabled'; export { isSentryRequestUrl } from './utils/isSentryRequestUrl'; +export { handleCallbackErrors } from './utils/handleCallbackErrors'; export { spanToTraceHeader } from './utils/spanUtils'; export { DEFAULT_ENVIRONMENT } from './constants'; export { ModuleMetadata } from './integrations/metadata'; diff --git a/packages/core/src/tracing/index.ts b/packages/core/src/tracing/index.ts index fcb208a797aa..759a42cbdfe0 100644 --- a/packages/core/src/tracing/index.ts +++ b/packages/core/src/tracing/index.ts @@ -9,6 +9,7 @@ export { extractTraceparentData, getActiveTransaction } from './utils'; export { SpanStatus } from './spanstatus'; export type { SpanStatusType } from './span'; export { + // eslint-disable-next-line deprecation/deprecation trace, getActiveSpan, startSpan, diff --git a/packages/core/src/tracing/trace.ts b/packages/core/src/tracing/trace.ts index 6ff670c8cf7f..b5d49f4767a7 100644 --- a/packages/core/src/tracing/trace.ts +++ b/packages/core/src/tracing/trace.ts @@ -1,10 +1,11 @@ import type { Span, TransactionContext } from '@sentry/types'; -import { dropUndefinedKeys, isThenable, logger, tracingContextFromHeaders } from '@sentry/utils'; +import { dropUndefinedKeys, logger, tracingContextFromHeaders } from '@sentry/utils'; import { DEBUG_BUILD } from '../debug-build'; import { getCurrentScope, withScope } from '../exports'; import type { Hub } from '../hub'; import { getCurrentHub } from '../hub'; +import { handleCallbackErrors } from '../utils/handleCallbackErrors'; import { hasTracingEnabled } from '../utils/hasTracingEnabled'; /** @@ -18,6 +19,8 @@ import { hasTracingEnabled } from '../utils/hasTracingEnabled'; * * @internal * @private + * + * @deprecated Use `startSpan` instead. */ export function trace( context: TransactionContext, @@ -37,43 +40,18 @@ export function trace( scope.setSpan(activeSpan); - function finishAndSetSpan(): void { - activeSpan && activeSpan.end(); - scope.setSpan(parentSpan); - } - - let maybePromiseResult: T; - try { - maybePromiseResult = callback(activeSpan); - } catch (e) { - activeSpan && activeSpan.setStatus('internal_error'); - onError(e, activeSpan); - finishAndSetSpan(); - afterFinish(); - throw e; - } - - if (isThenable(maybePromiseResult)) { - // @ts-expect-error - the isThenable check returns the "wrong" type here - return maybePromiseResult.then( - res => { - finishAndSetSpan(); - afterFinish(); - return res; - }, - e => { - activeSpan && activeSpan.setStatus('internal_error'); - onError(e, activeSpan); - finishAndSetSpan(); - afterFinish(); - throw e; - }, - ); - } - - finishAndSetSpan(); - afterFinish(); - return maybePromiseResult; + return handleCallbackErrors( + () => callback(activeSpan), + error => { + activeSpan && activeSpan.setStatus('internal_error'); + onError(error, activeSpan); + }, + () => { + activeSpan && activeSpan.end(); + scope.setSpan(parentSpan); + afterFinish(); + }, + ); } /** @@ -90,7 +68,6 @@ export function trace( export function startSpan(context: TransactionContext, callback: (span: Span | undefined) => T): T { const ctx = normalizeContext(context); - // @ts-expect-error - isThenable returns the wrong type return withScope(scope => { const hub = getCurrentHub(); const parentSpan = scope.getSpan(); @@ -98,35 +75,16 @@ export function startSpan(context: TransactionContext, callback: (span: Span const activeSpan = createChildSpanOrTransaction(hub, parentSpan, ctx); scope.setSpan(activeSpan); - function finishAndSetSpan(): void { - activeSpan && activeSpan.end(); - } - - let maybePromiseResult: T; - try { - maybePromiseResult = callback(activeSpan); - } catch (e) { - activeSpan && activeSpan.setStatus('internal_error'); - finishAndSetSpan(); - throw e; - } - - if (isThenable(maybePromiseResult)) { - return maybePromiseResult.then( - res => { - finishAndSetSpan(); - return res; - }, - e => { - activeSpan && activeSpan.setStatus('internal_error'); - finishAndSetSpan(); - throw e; - }, - ); - } - - finishAndSetSpan(); - return maybePromiseResult; + return handleCallbackErrors( + () => callback(activeSpan), + () => { + // Only update the span status if it hasn't been changed yet + if (activeSpan && (!activeSpan.status || activeSpan.status === 'ok')) { + activeSpan.setStatus('internal_error'); + } + }, + () => activeSpan && activeSpan.end(), + ); }); } @@ -152,7 +110,6 @@ export function startSpanManual( ): T { const ctx = normalizeContext(context); - // @ts-expect-error - isThenable returns the wrong type return withScope(scope => { const hub = getCurrentHub(); const parentSpan = scope.getSpan(); @@ -164,25 +121,15 @@ export function startSpanManual( activeSpan && activeSpan.end(); } - let maybePromiseResult: T; - try { - maybePromiseResult = callback(activeSpan, finishAndSetSpan); - } catch (e) { - activeSpan && activeSpan.setStatus('internal_error'); - throw e; - } - - if (isThenable(maybePromiseResult)) { - return maybePromiseResult.then( - res => res, - e => { - activeSpan && activeSpan.setStatus('internal_error'); - throw e; - }, - ); - } - - return maybePromiseResult; + return handleCallbackErrors( + () => callback(activeSpan, finishAndSetSpan), + () => { + // Only update the span status if it hasn't been changed yet, and the span is not yet finished + if (activeSpan && !activeSpan.endTimestamp && (!activeSpan.status || activeSpan.status === 'ok')) { + activeSpan.setStatus('internal_error'); + } + }, + ); }); } diff --git a/packages/core/src/utils/handleCallbackErrors.ts b/packages/core/src/utils/handleCallbackErrors.ts new file mode 100644 index 000000000000..b3bec065581d --- /dev/null +++ b/packages/core/src/utils/handleCallbackErrors.ts @@ -0,0 +1,63 @@ +import { isThenable } from '@sentry/utils'; + +/** + * Wrap a callback function with error handling. + * If an error is thrown, it will be passed to the `onError` callback and re-thrown. + * + * If the return value of the function is a promise, it will be handled with `maybeHandlePromiseRejection`. + * + * If an `onFinally` callback is provided, this will be called when the callback has finished + * - so if it returns a promise, once the promise resolved/rejected, + * else once the callback has finished executing. + * The `onFinally` callback will _always_ be called, no matter if an error was thrown or not. + */ +export function handleCallbackErrors< + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Fn extends () => any, +>( + fn: Fn, + onError: (error: unknown) => void, + // eslint-disable-next-line @typescript-eslint/no-empty-function + onFinally: () => void = () => {}, +): ReturnType { + let maybePromiseResult: ReturnType; + try { + maybePromiseResult = fn(); + } catch (e) { + onError(e); + onFinally(); + throw e; + } + + return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally); +} + +/** + * Maybe handle a promise rejection. + * This expects to be given a value that _may_ be a promise, or any other value. + * If it is a promise, and it rejects, it will call the `onError` callback. + * Other than this, it will generally return the given value as-is. + */ +function maybeHandlePromiseRejection( + value: MaybePromise, + onError: (error: unknown) => void, + onFinally: () => void, +): MaybePromise { + if (isThenable(value)) { + // @ts-expect-error - the isThenable check returns the "wrong" type here + return value.then( + res => { + onFinally(); + return res; + }, + e => { + onError(e); + onFinally(); + throw e; + }, + ); + } + + onFinally(); + return value; +} diff --git a/packages/core/test/lib/utils/handleCallbackErrors.test.ts b/packages/core/test/lib/utils/handleCallbackErrors.test.ts new file mode 100644 index 000000000000..3c6bb1e19302 --- /dev/null +++ b/packages/core/test/lib/utils/handleCallbackErrors.test.ts @@ -0,0 +1,150 @@ +import { handleCallbackErrors } from '../../../src/utils/handleCallbackErrors'; + +describe('handleCallbackErrors', () => { + it('works with a simple callback', () => { + const onError = jest.fn(); + + const fn = jest.fn(() => 'aa'); + + const res = handleCallbackErrors(fn, onError); + + expect(res).toBe('aa'); + expect(fn).toHaveBeenCalledTimes(1); + expect(onError).not.toHaveBeenCalled(); + }); + + it('triggers onError when callback has sync error', () => { + const error = new Error('test error'); + + const onError = jest.fn(); + + const fn = jest.fn(() => { + throw error; + }); + + expect(() => handleCallbackErrors(fn, onError)).toThrow(error); + + expect(fn).toHaveBeenCalledTimes(1); + expect(onError).toHaveBeenCalledTimes(1); + expect(onError).toHaveBeenCalledWith(error); + }); + + it('works with an async callback', async () => { + const onError = jest.fn(); + + const fn = jest.fn(async () => 'aa'); + + const res = handleCallbackErrors(fn, onError); + + expect(res).toBeInstanceOf(Promise); + + expect(fn).toHaveBeenCalledTimes(1); + expect(onError).not.toHaveBeenCalled(); + + const value = await res; + expect(value).toBe('aa'); + }); + + it('triggers onError when callback returns promise that rejects', async () => { + const onError = jest.fn(); + + const error = new Error('test error'); + + const fn = jest.fn(async () => { + await new Promise(resolve => setTimeout(resolve, 10)); + throw error; + }); + + const res = handleCallbackErrors(fn, onError); + + expect(res).toBeInstanceOf(Promise); + + expect(fn).toHaveBeenCalledTimes(1); + expect(onError).not.toHaveBeenCalled(); + + await expect(res).rejects.toThrow(error); + + expect(onError).toHaveBeenCalledTimes(1); + expect(onError).toHaveBeenCalledWith(error); + }); + + describe('onFinally', () => { + it('triggers after successfuly sync callback', () => { + const onError = jest.fn(); + const onFinally = jest.fn(); + + const fn = jest.fn(() => 'aa'); + + const res = handleCallbackErrors(fn, onError, onFinally); + + expect(res).toBe('aa'); + expect(fn).toHaveBeenCalledTimes(1); + expect(onError).not.toHaveBeenCalled(); + expect(onFinally).toHaveBeenCalledTimes(1); + }); + + it('triggers after error in sync callback', () => { + const error = new Error('test error'); + + const onError = jest.fn(); + const onFinally = jest.fn(); + + const fn = jest.fn(() => { + throw error; + }); + + expect(() => handleCallbackErrors(fn, onError, onFinally)).toThrow(error); + + expect(fn).toHaveBeenCalledTimes(1); + expect(onError).toHaveBeenCalledTimes(1); + expect(onError).toHaveBeenCalledWith(error); + expect(onFinally).toHaveBeenCalledTimes(1); + }); + + it('triggers after successful async callback', async () => { + const onError = jest.fn(); + const onFinally = jest.fn(); + + const fn = jest.fn(async () => 'aa'); + + const res = handleCallbackErrors(fn, onError, onFinally); + + expect(res).toBeInstanceOf(Promise); + + expect(fn).toHaveBeenCalledTimes(1); + expect(onError).not.toHaveBeenCalled(); + expect(onFinally).not.toHaveBeenCalled(); + + const value = await res; + expect(value).toBe('aa'); + + expect(onFinally).toHaveBeenCalledTimes(1); + }); + + it('triggers after error in async callback', async () => { + const onError = jest.fn(); + const onFinally = jest.fn(); + + const error = new Error('test error'); + + const fn = jest.fn(async () => { + await new Promise(resolve => setTimeout(resolve, 10)); + throw error; + }); + + const res = handleCallbackErrors(fn, onError, onFinally); + + expect(res).toBeInstanceOf(Promise); + + expect(fn).toHaveBeenCalledTimes(1); + expect(onError).not.toHaveBeenCalled(); + expect(onFinally).not.toHaveBeenCalled(); + + await expect(res).rejects.toThrow(error); + + expect(onError).toHaveBeenCalledTimes(1); + expect(onError).toHaveBeenCalledWith(error); + expect(onFinally).toHaveBeenCalledTimes(1); + }); + }); +}); diff --git a/packages/deno/src/index.ts b/packages/deno/src/index.ts index fe0b5ee4b620..1615b36064e2 100644 --- a/packages/deno/src/index.ts +++ b/packages/deno/src/index.ts @@ -59,6 +59,7 @@ export { setTags, setUser, spanStatusfromHttpCode, + // eslint-disable-next-line deprecation/deprecation trace, withScope, captureCheckIn, diff --git a/packages/nextjs/src/common/utils/edgeWrapperUtils.ts b/packages/nextjs/src/common/utils/edgeWrapperUtils.ts index 0128339a9b72..9c479a88ceeb 100644 --- a/packages/nextjs/src/common/utils/edgeWrapperUtils.ts +++ b/packages/nextjs/src/common/utils/edgeWrapperUtils.ts @@ -1,4 +1,4 @@ -import { addTracingExtensions, captureException, continueTrace, trace } from '@sentry/core'; +import { addTracingExtensions, captureException, continueTrace, handleCallbackErrors, startSpan } from '@sentry/core'; import { winterCGRequestToRequestData } from '@sentry/utils'; import type { EdgeRouteHandler } from '../../edge/types'; @@ -28,7 +28,7 @@ export function withEdgeWrapping( baggage, }); - return trace( + return startSpan( { ...transactionContext, name: options.spanDescription, @@ -41,7 +41,20 @@ export function withEdgeWrapping( }, }, async span => { - const handlerResult = await handler.apply(this, args); + const handlerResult = await handleCallbackErrors( + () => handler.apply(this, args), + error => { + captureException(error, { + mechanism: { + type: 'instrument', + handled: false, + data: { + function: options.mechanismFunctionName, + }, + }, + }); + }, + ); if (handlerResult instanceof Response) { span?.setHttpStatus(handlerResult.status); @@ -51,18 +64,6 @@ export function withEdgeWrapping( return handlerResult; }, - (err, span) => { - span?.setStatus('internal_error'); - captureException(err, { - mechanism: { - type: 'instrument', - handled: false, - data: { - function: options.mechanismFunctionName, - }, - }, - }); - }, ).finally(() => flushQueue()); }; } diff --git a/packages/nextjs/src/common/withServerActionInstrumentation.ts b/packages/nextjs/src/common/withServerActionInstrumentation.ts index d850b3e362f9..85872ac7d703 100644 --- a/packages/nextjs/src/common/withServerActionInstrumentation.ts +++ b/packages/nextjs/src/common/withServerActionInstrumentation.ts @@ -3,8 +3,9 @@ import { captureException, getClient, getCurrentScope, + handleCallbackErrors, runWithAsyncContext, - trace, + startSpan, } from '@sentry/core'; import { logger, tracingContextFromHeaders } from '@sentry/utils'; @@ -83,7 +84,7 @@ async function withServerActionInstrumentationImplementation { - const result = await callback(); + const result = await handleCallbackErrors(callback, error => { + captureException(error, { mechanism: { handled: false } }); + }); if (options.recordResponse !== undefined ? options.recordResponse : sendDefaultPii) { span?.setData('server_action_result', result); @@ -118,9 +121,6 @@ async function withServerActionInstrumentationImplementation { - captureException(error, { mechanism: { handled: false } }); - }, ); } finally { if (!platformSupportsStreaming()) { diff --git a/packages/nextjs/src/common/wrapGenerationFunctionWithSentry.ts b/packages/nextjs/src/common/wrapGenerationFunctionWithSentry.ts index 3acaa849ff79..d1765aa2c41e 100644 --- a/packages/nextjs/src/common/wrapGenerationFunctionWithSentry.ts +++ b/packages/nextjs/src/common/wrapGenerationFunctionWithSentry.ts @@ -4,8 +4,9 @@ import { continueTrace, getClient, getCurrentScope, + handleCallbackErrors, runWithAsyncContext, - trace, + startSpan, } from '@sentry/core'; import type { WebFetchHeaders } from '@sentry/types'; import { winterCGHeadersToDict } from '@sentry/utils'; @@ -60,7 +61,7 @@ export function wrapGenerationFunctionWithSentry a transactionContext.parentSpanId = commonSpanId; } - return trace( + return startSpan( { op: 'function.nextjs', name: `${componentType}.${generationFunctionIdentifier} (${componentRoute})`, @@ -76,17 +77,18 @@ export function wrapGenerationFunctionWithSentry a }, }, () => { - return originalFunction.apply(thisArg, args); - }, - err => { - captureException(err, { - mechanism: { - handled: false, - data: { - function: 'wrapGenerationFunctionWithSentry', - }, - }, - }); + return handleCallbackErrors( + () => originalFunction.apply(thisArg, args), + err => + captureException(err, { + mechanism: { + handled: false, + data: { + function: 'wrapGenerationFunctionWithSentry', + }, + }, + }), + ); }, ); }); diff --git a/packages/nextjs/src/common/wrapRouteHandlerWithSentry.ts b/packages/nextjs/src/common/wrapRouteHandlerWithSentry.ts index 1f294283c7d8..a1067b1577e4 100644 --- a/packages/nextjs/src/common/wrapRouteHandlerWithSentry.ts +++ b/packages/nextjs/src/common/wrapRouteHandlerWithSentry.ts @@ -1,4 +1,11 @@ -import { addTracingExtensions, captureException, getCurrentScope, runWithAsyncContext, trace } from '@sentry/core'; +import { + addTracingExtensions, + captureException, + getCurrentScope, + handleCallbackErrors, + runWithAsyncContext, + startSpan, +} from '@sentry/core'; import { tracingContextFromHeaders, winterCGHeadersToDict } from '@sentry/utils'; import { isRedirectNavigationError } from './nextNavigationErrorUtils'; @@ -26,9 +33,10 @@ export function wrapRouteHandlerWithSentry any>( ); getCurrentScope().setPropagationContext(propagationContext); - let res; + let result; + try { - res = await trace( + result = await startSpan( { op: 'http.server', name: `${method} ${parameterizedRoute}`, @@ -43,7 +51,19 @@ export function wrapRouteHandlerWithSentry any>( }, }, async span => { - const response: Response = await originalFunction.apply(thisArg, args); + const response: Response = await handleCallbackErrors( + () => originalFunction.apply(thisArg, args), + error => { + // Next.js throws errors when calling `redirect()`. We don't wanna report these. + if (!isRedirectNavigationError(error)) { + captureException(error, { + mechanism: { + handled: false, + }, + }); + } + }, + ); try { span?.setHttpStatus(response.status); @@ -53,16 +73,6 @@ export function wrapRouteHandlerWithSentry any>( return response; }, - error => { - // Next.js throws errors when calling `redirect()`. We don't wanna report these. - if (!isRedirectNavigationError(error)) { - captureException(error, { - mechanism: { - handled: false, - }, - }); - } - }, ); } finally { if (!platformSupportsStreaming() || process.env.NEXT_RUNTIME === 'edge') { @@ -72,7 +82,7 @@ export function wrapRouteHandlerWithSentry any>( } } - return res; + return result; }); }, }); diff --git a/packages/nextjs/src/common/wrapServerComponentWithSentry.ts b/packages/nextjs/src/common/wrapServerComponentWithSentry.ts index f8e47e8047b3..427879b3e843 100644 --- a/packages/nextjs/src/common/wrapServerComponentWithSentry.ts +++ b/packages/nextjs/src/common/wrapServerComponentWithSentry.ts @@ -3,8 +3,9 @@ import { captureException, continueTrace, getCurrentScope, + handleCallbackErrors, runWithAsyncContext, - trace, + startSpanManual, } from '@sentry/core'; import { winterCGHeadersToDict } from '@sentry/utils'; @@ -53,7 +54,7 @@ export function wrapServerComponentWithSentry any> transactionContext.parentSpanId = commonSpanId; } - const res = trace( + const res = startSpanManual( { ...transactionContext, op: 'function.nextjs', @@ -68,29 +69,34 @@ export function wrapServerComponentWithSentry any> source: 'component', }, }, - () => originalFunction.apply(thisArg, args), - (e, span) => { - if (isNotFoundNavigationError(e)) { - // We don't want to report "not-found"s - span?.setStatus('not_found'); - } else if (isRedirectNavigationError(e)) { - // We don't want to report redirects - // Since `trace` will automatically set the span status to "internal_error" we need to set it back to "ok" - span?.setStatus('ok'); - } else { - span?.setStatus('internal_error'); + span => { + return handleCallbackErrors( + () => originalFunction.apply(thisArg, args), + error => { + if (isNotFoundNavigationError(error)) { + // We don't want to report "not-found"s + span?.setStatus('not_found'); + } else if (isRedirectNavigationError(error)) { + // We don't want to report redirects + span?.setStatus('ok'); + } else { + span?.setStatus('internal_error'); - captureException(e, { - mechanism: { - handled: false, - }, - }); - } - }, - () => { - // flushQueue should not throw - // eslint-disable-next-line @typescript-eslint/no-floating-promises - flushQueue(); + captureException(error, { + mechanism: { + handled: false, + }, + }); + } + }, + () => { + span?.end(); + + // flushQueue should not throw + // eslint-disable-next-line @typescript-eslint/no-floating-promises + flushQueue(); + }, + ); }, ); diff --git a/packages/nextjs/test/edge/edgeWrapperUtils.test.ts b/packages/nextjs/test/edge/edgeWrapperUtils.test.ts index 0003c07e756a..2a782250c7c5 100644 --- a/packages/nextjs/test/edge/edgeWrapperUtils.test.ts +++ b/packages/nextjs/test/edge/edgeWrapperUtils.test.ts @@ -65,7 +65,7 @@ describe('withEdgeWrapping', () => { }); it('should return a function that calls trace', async () => { - const traceSpy = jest.spyOn(coreSdk, 'trace'); + const startSpanSpy = jest.spyOn(coreSdk, 'startSpan'); const request = new Request('https://sentry.io/'); const origFunction = jest.fn(_req => new Response()); @@ -78,8 +78,8 @@ describe('withEdgeWrapping', () => { await wrappedFunction(request); - expect(traceSpy).toHaveBeenCalledTimes(1); - expect(traceSpy).toHaveBeenCalledWith( + expect(startSpanSpy).toHaveBeenCalledTimes(1); + expect(startSpanSpy).toHaveBeenCalledWith( expect.objectContaining({ metadata: { request: { headers: {} }, source: 'route' }, name: 'some label', @@ -87,7 +87,6 @@ describe('withEdgeWrapping', () => { origin: 'auto.function.nextjs.withEdgeWrapping', }), expect.any(Function), - expect.any(Function), ); }); diff --git a/packages/nextjs/test/edge/withSentryAPI.test.ts b/packages/nextjs/test/edge/withSentryAPI.test.ts index db1fd3defab9..b51ce3dfeca6 100644 --- a/packages/nextjs/test/edge/withSentryAPI.test.ts +++ b/packages/nextjs/test/edge/withSentryAPI.test.ts @@ -34,7 +34,7 @@ afterAll(() => { global.Response = origResponse; }); -const traceSpy = jest.spyOn(coreSdk, 'trace'); +const startSpanSpy = jest.spyOn(coreSdk, 'startSpan'); afterEach(() => { jest.clearAllMocks(); @@ -49,8 +49,8 @@ describe('wrapApiHandlerWithSentry', () => { await wrappedFunction(request); - expect(traceSpy).toHaveBeenCalledTimes(1); - expect(traceSpy).toHaveBeenCalledWith( + expect(startSpanSpy).toHaveBeenCalledTimes(1); + expect(startSpanSpy).toHaveBeenCalledWith( expect.objectContaining({ metadata: { request: { headers: {}, method: 'POST', url: 'https://sentry.io/' }, source: 'route' }, name: 'POST /user/[userId]/post/[postId]', @@ -58,7 +58,6 @@ describe('wrapApiHandlerWithSentry', () => { origin: 'auto.function.nextjs.withEdgeWrapping', }), expect.any(Function), - expect.any(Function), ); }); @@ -69,8 +68,8 @@ describe('wrapApiHandlerWithSentry', () => { await wrappedFunction(); - expect(traceSpy).toHaveBeenCalledTimes(1); - expect(traceSpy).toHaveBeenCalledWith( + expect(startSpanSpy).toHaveBeenCalledTimes(1); + expect(startSpanSpy).toHaveBeenCalledWith( expect.objectContaining({ metadata: { source: 'route' }, name: 'handler (/user/[userId]/post/[postId])', @@ -78,7 +77,6 @@ describe('wrapApiHandlerWithSentry', () => { origin: 'auto.function.nextjs.withEdgeWrapping', }), expect.any(Function), - expect.any(Function), ); }); }); diff --git a/packages/node-experimental/src/index.ts b/packages/node-experimental/src/index.ts index b9ab8b0ce1ef..546f97efc10d 100644 --- a/packages/node-experimental/src/index.ts +++ b/packages/node-experimental/src/index.ts @@ -61,6 +61,7 @@ export { runWithAsyncContext, SDK_VERSION, spanStatusfromHttpCode, + // eslint-disable-next-line deprecation/deprecation trace, captureCheckIn, withMonitor, diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index 258e65590f9b..ea924e125639 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -59,6 +59,7 @@ export { setTags, setUser, spanStatusfromHttpCode, + // eslint-disable-next-line deprecation/deprecation trace, withScope, captureCheckIn, diff --git a/packages/opentelemetry/src/trace.ts b/packages/opentelemetry/src/trace.ts index b5b1e48a8e4b..e2f517900114 100644 --- a/packages/opentelemetry/src/trace.ts +++ b/packages/opentelemetry/src/trace.ts @@ -1,8 +1,7 @@ import type { Span, Tracer } from '@opentelemetry/api'; import { SpanStatusCode, trace } from '@opentelemetry/api'; -import { SDK_VERSION } from '@sentry/core'; +import { SDK_VERSION, handleCallbackErrors } from '@sentry/core'; import type { Client } from '@sentry/types'; -import { isThenable } from '@sentry/utils'; import { getClient } from './custom/hub'; import { InternalSentrySemanticAttributes } from './semanticAttributes'; @@ -24,36 +23,15 @@ export function startSpan(spanContext: OpenTelemetrySpanContext, callback: (s const { name } = spanContext; return tracer.startActiveSpan(name, spanContext, span => { - function finishSpan(): void { - span.end(); - } - _applySentryAttributesToSpan(span, spanContext); - let maybePromiseResult: T; - try { - maybePromiseResult = callback(span); - } catch (e) { - span.setStatus({ code: SpanStatusCode.ERROR }); - finishSpan(); - throw e; - } - - if (isThenable(maybePromiseResult)) { - Promise.resolve(maybePromiseResult).then( - () => { - finishSpan(); - }, - () => { - span.setStatus({ code: SpanStatusCode.ERROR }); - finishSpan(); - }, - ); - } else { - finishSpan(); - } - - return maybePromiseResult; + return handleCallbackErrors( + () => callback(span), + () => { + span.setStatus({ code: SpanStatusCode.ERROR }); + }, + () => span.end(), + ); }); } @@ -71,29 +49,15 @@ export function startSpanManual(spanContext: OpenTelemetrySpanContext, callba const { name } = spanContext; - // @ts-expect-error - isThenable returns the wrong type return tracer.startActiveSpan(name, spanContext, span => { _applySentryAttributesToSpan(span, spanContext); - let maybePromiseResult: T; - try { - maybePromiseResult = callback(span); - } catch (e) { - span.setStatus({ code: SpanStatusCode.ERROR }); - throw e; - } - - if (isThenable(maybePromiseResult)) { - return maybePromiseResult.then( - res => res, - e => { - span.setStatus({ code: SpanStatusCode.ERROR }); - throw e; - }, - ); - } - - return maybePromiseResult; + return handleCallbackErrors( + () => callback(span), + () => { + span.setStatus({ code: SpanStatusCode.ERROR }); + }, + ); }); } diff --git a/packages/remix/src/index.server.ts b/packages/remix/src/index.server.ts index 6d4d9fee5626..c3438d6a2743 100644 --- a/packages/remix/src/index.server.ts +++ b/packages/remix/src/index.server.ts @@ -40,6 +40,7 @@ export { setTags, setUser, spanStatusfromHttpCode, + // eslint-disable-next-line deprecation/deprecation trace, withScope, autoDiscoverNodePerformanceMonitoringIntegrations, diff --git a/packages/serverless/src/gcpfunction/cloud_events.ts b/packages/serverless/src/gcpfunction/cloud_events.ts index 233d6c9a79f8..cde99b9707b5 100644 --- a/packages/serverless/src/gcpfunction/cloud_events.ts +++ b/packages/serverless/src/gcpfunction/cloud_events.ts @@ -1,5 +1,6 @@ +import { handleCallbackErrors } from '@sentry/core'; import { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node'; -import { isThenable, logger } from '@sentry/utils'; +import { logger } from '@sentry/utils'; import { DEBUG_BUILD } from '../debug-build'; import { domainify, markEventUnhandled, proxyFunction } from '../utils'; @@ -58,22 +59,12 @@ function _wrapCloudEventFunction( }); if (fn.length > 1) { - let fnResult; - try { - fnResult = (fn as CloudEventFunctionWithCallback)(context, newCallback); - } catch (err) { - captureException(err, scope => markEventUnhandled(scope)); - throw err; - } - - if (isThenable(fnResult)) { - fnResult.then(null, err => { + return handleCallbackErrors( + () => (fn as CloudEventFunctionWithCallback)(context, newCallback), + err => { captureException(err, scope => markEventUnhandled(scope)); - throw err; - }); - } - - return fnResult; + }, + ); } return Promise.resolve() diff --git a/packages/serverless/src/gcpfunction/events.ts b/packages/serverless/src/gcpfunction/events.ts index a3d1af662d3c..539c0ee80094 100644 --- a/packages/serverless/src/gcpfunction/events.ts +++ b/packages/serverless/src/gcpfunction/events.ts @@ -1,5 +1,6 @@ +import { handleCallbackErrors } from '@sentry/core'; import { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node'; -import { isThenable, logger } from '@sentry/utils'; +import { logger } from '@sentry/utils'; import { DEBUG_BUILD } from '../debug-build'; import { domainify, markEventUnhandled, proxyFunction } from '../utils'; @@ -63,22 +64,12 @@ function _wrapEventFunction }); if (fn.length > 2) { - let fnResult; - try { - fnResult = (fn as EventFunctionWithCallback)(data, context, newCallback); - } catch (err) { - captureException(err, scope => markEventUnhandled(scope)); - throw err; - } - - if (isThenable(fnResult)) { - fnResult.then(null, err => { + return handleCallbackErrors( + () => (fn as EventFunctionWithCallback)(data, context, newCallback), + err => { captureException(err, scope => markEventUnhandled(scope)); - throw err; - }); - } - - return fnResult; + }, + ); } return Promise.resolve() diff --git a/packages/serverless/src/gcpfunction/http.ts b/packages/serverless/src/gcpfunction/http.ts index 26d156010373..609a75c81c1e 100644 --- a/packages/serverless/src/gcpfunction/http.ts +++ b/packages/serverless/src/gcpfunction/http.ts @@ -1,9 +1,9 @@ -import { Transaction } from '@sentry/core'; +import { Transaction, handleCallbackErrors } from '@sentry/core'; import type { AddRequestDataToEventOptions } from '@sentry/node'; import { continueTrace, startSpanManual } from '@sentry/node'; import { getCurrentScope } from '@sentry/node'; import { captureException, flush } from '@sentry/node'; -import { isString, isThenable, logger, stripUrlQueryAndFragment } from '@sentry/utils'; +import { isString, logger, stripUrlQueryAndFragment } from '@sentry/utils'; import { DEBUG_BUILD } from '../debug-build'; import { domainify, markEventUnhandled, proxyFunction } from './../utils'; @@ -116,22 +116,12 @@ function _wrapHttpFunction(fn: HttpFunction, wrapOptions: Partial markEventUnhandled(scope)); - throw err; - } - - if (isThenable(fnResult)) { - fnResult.then(null, err => { + return handleCallbackErrors( + () => fn(req, res), + err => { captureException(err, scope => markEventUnhandled(scope)); - throw err; - }); - } - - return fnResult; + }, + ); }, ); }; diff --git a/packages/sveltekit/src/client/load.ts b/packages/sveltekit/src/client/load.ts index ebc21c35eaf0..545105e49c43 100644 --- a/packages/sveltekit/src/client/load.ts +++ b/packages/sveltekit/src/client/load.ts @@ -1,4 +1,4 @@ -import { trace } from '@sentry/core'; +import { handleCallbackErrors, startSpan } from '@sentry/core'; import { captureException } from '@sentry/svelte'; import { addNonEnumerableProperty, objectify } from '@sentry/utils'; import type { LoadEvent } from '@sveltejs/kit'; @@ -77,7 +77,7 @@ export function wrapLoadWithSentry any>(origLoad: T) // `event.route.id` directly. This will still cause invalidations but we get a route name. const routeId = routeIdFromDescriptor || event.route.id; - return trace( + return startSpan( { op: 'function.sveltekit.load', origin: 'auto.function.sveltekit', @@ -87,8 +87,7 @@ export function wrapLoadWithSentry any>(origLoad: T) source: routeId ? 'route' : 'url', }, }, - () => wrappingTarget.apply(thisArg, [patchedEvent]), - sendErrorToSentry, + () => handleCallbackErrors(() => wrappingTarget.apply(thisArg, [patchedEvent]), sendErrorToSentry), ); }, }); diff --git a/packages/sveltekit/src/server/index.ts b/packages/sveltekit/src/server/index.ts index a7395e3cfb18..9b57a1c4d110 100644 --- a/packages/sveltekit/src/server/index.ts +++ b/packages/sveltekit/src/server/index.ts @@ -38,6 +38,7 @@ export { setTags, setUser, spanStatusfromHttpCode, + // eslint-disable-next-line deprecation/deprecation trace, withScope, autoDiscoverNodePerformanceMonitoringIntegrations, diff --git a/packages/sveltekit/test/client/load.test.ts b/packages/sveltekit/test/client/load.test.ts index bd6e38fa7a2f..15d2850b4a8c 100644 --- a/packages/sveltekit/test/client/load.test.ts +++ b/packages/sveltekit/test/client/load.test.ts @@ -7,15 +7,15 @@ import { wrapLoadWithSentry } from '../../src/client/load'; const mockCaptureException = vi.spyOn(SentrySvelte, 'captureException').mockImplementation(() => 'xx'); -const mockTrace = vi.fn(); +const mockStartSpan = vi.fn(); vi.mock('@sentry/core', async () => { const original = (await vi.importActual('@sentry/core')) as any; return { ...original, - trace: (...args: unknown[]) => { - mockTrace(...args); - return original.trace(...args); + startSpan: (...args: unknown[]) => { + mockStartSpan(...args); + return original.startSpan(...args); }, }; }); @@ -39,7 +39,7 @@ beforeAll(() => { describe('wrapLoadWithSentry', () => { beforeEach(() => { mockCaptureException.mockClear(); - mockTrace.mockClear(); + mockStartSpan.mockClear(); }); it('calls captureException', async () => { @@ -79,8 +79,8 @@ describe('wrapLoadWithSentry', () => { const wrappedLoad = wrapLoadWithSentry(load); await wrappedLoad(MOCK_LOAD_ARGS); - expect(mockTrace).toHaveBeenCalledTimes(1); - expect(mockTrace).toHaveBeenCalledWith( + expect(mockStartSpan).toHaveBeenCalledTimes(1); + expect(mockStartSpan).toHaveBeenCalledWith( { op: 'function.sveltekit.load', origin: 'auto.function.sveltekit', @@ -91,7 +91,6 @@ describe('wrapLoadWithSentry', () => { }, }, expect.any(Function), - expect.any(Function), ); }); @@ -108,8 +107,8 @@ describe('wrapLoadWithSentry', () => { await wrappedLoad(MOCK_LOAD_ARGS); - expect(mockTrace).toHaveBeenCalledTimes(1); - expect(mockTrace).toHaveBeenCalledWith( + expect(mockStartSpan).toHaveBeenCalledTimes(1); + expect(mockStartSpan).toHaveBeenCalledWith( { op: 'function.sveltekit.load', origin: 'auto.function.sveltekit', @@ -120,7 +119,6 @@ describe('wrapLoadWithSentry', () => { }, }, expect.any(Function), - expect.any(Function), ); }); }); @@ -152,6 +150,6 @@ describe('wrapLoadWithSentry', () => { const wrappedLoad = wrapLoadWithSentry(wrapLoadWithSentry(load)); await wrappedLoad(MOCK_LOAD_ARGS); - expect(mockTrace).toHaveBeenCalledTimes(1); + expect(mockStartSpan).toHaveBeenCalledTimes(1); }); }); diff --git a/packages/tracing-internal/src/node/integrations/prisma.ts b/packages/tracing-internal/src/node/integrations/prisma.ts index b13fa2af7f53..6a9a4ac6b52e 100644 --- a/packages/tracing-internal/src/node/integrations/prisma.ts +++ b/packages/tracing-internal/src/node/integrations/prisma.ts @@ -1,4 +1,4 @@ -import { getCurrentHub, trace } from '@sentry/core'; +import { getCurrentHub, startSpan } from '@sentry/core'; import type { Integration } from '@sentry/types'; import { addNonEnumerableProperty, logger } from '@sentry/utils'; @@ -99,7 +99,7 @@ export class Prisma implements Integration { const action = params.action; const model = params.model; - return trace( + return startSpan( { name: model ? `${model} ${action}` : action, op: 'db.prisma', diff --git a/packages/tracing/test/integrations/node/prisma.test.ts b/packages/tracing/test/integrations/node/prisma.test.ts index 4debafd7de35..552edb1b78c2 100644 --- a/packages/tracing/test/integrations/node/prisma.test.ts +++ b/packages/tracing/test/integrations/node/prisma.test.ts @@ -5,15 +5,15 @@ import { Hub } from '@sentry/core'; import { Integrations } from '../../../src'; import { getTestClient } from '../../testutils'; -const mockTrace = jest.fn(); +const mockStartSpan = jest.fn(); jest.mock('@sentry/core', () => { const original = jest.requireActual('@sentry/core'); return { ...original, - trace: (...args: unknown[]) => { - mockTrace(...args); - return original.trace(...args); + startSpan: (...args: unknown[]) => { + mockStartSpan(...args); + return original.startSpan(...args); }, }; }); @@ -43,16 +43,16 @@ class PrismaClient { describe('setupOnce', function () { beforeEach(() => { - mockTrace.mockClear(); - mockTrace.mockReset(); + mockStartSpan.mockClear(); + mockStartSpan.mockReset(); }); it('should add middleware with $use method correctly', done => { const prismaClient = new PrismaClient(); new Integrations.Prisma({ client: prismaClient }); void prismaClient.user.create()?.then(() => { - expect(mockTrace).toHaveBeenCalledTimes(1); - expect(mockTrace).toHaveBeenLastCalledWith( + expect(mockStartSpan).toHaveBeenCalledTimes(1); + expect(mockStartSpan).toHaveBeenLastCalledWith( { name: 'user create', op: 'db.prisma', @@ -75,7 +75,7 @@ describe('setupOnce', function () { jest.spyOn(sentryCore, 'getCurrentHub').mockReturnValue(hub); void prismaClient.user.create()?.then(() => { - expect(mockTrace).not.toHaveBeenCalled(); + expect(mockStartSpan).not.toHaveBeenCalled(); done(); }); }); diff --git a/packages/vercel-edge/src/index.ts b/packages/vercel-edge/src/index.ts index 2ef1217ab117..daed81643ab5 100644 --- a/packages/vercel-edge/src/index.ts +++ b/packages/vercel-edge/src/index.ts @@ -59,6 +59,7 @@ export { setTags, setUser, spanStatusfromHttpCode, + // eslint-disable-next-line deprecation/deprecation trace, withScope, captureCheckIn, From c769958aac8daf8d2d94eba14eade80c32380dd0 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 4 Jan 2024 11:59:56 +0100 Subject: [PATCH 43/51] build: Fix nx-config for lint (#10050) --- .../browser-integration-tests/package.json | 3 +++ dev-packages/node-integration-tests/package.json | 2 ++ nx.json | 14 ++++---------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/dev-packages/browser-integration-tests/package.json b/dev-packages/browser-integration-tests/package.json index 0e936d085ee5..346f18b2648b 100644 --- a/dev-packages/browser-integration-tests/package.json +++ b/dev-packages/browser-integration-tests/package.json @@ -45,6 +45,9 @@ "dependencies": { "@babel/preset-typescript": "^7.16.7", "@playwright/test": "^1.31.1", + "@sentry/browser": "7.91.0", + "@sentry/tracing": "7.91.0", + "@sentry-internal/rrweb": "2.6.0", "axios": "1.6.0", "babel-loader": "^8.2.2", "html-webpack-plugin": "^5.5.0", diff --git a/dev-packages/node-integration-tests/package.json b/dev-packages/node-integration-tests/package.json index eafbfa320a27..ef27c4cd7e4f 100644 --- a/dev-packages/node-integration-tests/package.json +++ b/dev-packages/node-integration-tests/package.json @@ -18,6 +18,8 @@ "test:watch": "yarn test --watch" }, "dependencies": { + "@sentry/node": "7.91.0", + "@sentry/tracing": "7.91.0", "@prisma/client": "3.15.2", "@types/mongodb": "^3.6.20", "@types/mysql": "^2.15.21", diff --git a/nx.json b/nx.json index 871546e98a4e..a8b8f213eab2 100644 --- a/nx.json +++ b/nx.json @@ -3,14 +3,7 @@ "default": { "runner": "nx/tasks-runners/default", "options": { - "cacheableOperations": [ - "build:bundle", - "build:transpile", - "build:types", - "lint:eslint", - "test:unit", - "build:tarball" - ], + "cacheableOperations": ["build:bundle", "build:transpile", "build:types", "lint", "test:unit", "build:tarball"], "cacheDirectory": ".nxcache" } } @@ -34,15 +27,16 @@ "build:transpile": { "inputs": ["production", "^production"], "dependsOn": ["^build:transpile"], - "outputs": ["{projectRoot}/build/npm", "{projectRoot}/build/esm", "{projectRoot}/build/cjs"] + "outputs": ["{projectRoot}/build"] }, "build:types": { "inputs": ["production", "^production"], "dependsOn": ["^build:types"], "outputs": ["{projectRoot}/build/**/*.d.ts"] }, - "lint:eslint": { + "lint": { "inputs": ["default"], + "dependsOn": ["^build:types", "build:types"], "outputs": [] }, "test:unit": { From b1458d68acae4b29fa838d6481f8fb220aa98113 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 4 Jan 2024 12:15:21 +0100 Subject: [PATCH 44/51] meta: Disable biome quickfix in vscode config (#10051) --- .vscode/settings.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index d357aece1dd9..2950621966b9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -37,7 +37,6 @@ "deno.enablePaths": ["packages/deno/test"], "editor.codeActionsOnSave": { "source.organizeImports.biome": "explicit", - "quickfix.biome": "explicit" }, "editor.defaultFormatter": "biomejs.biome" } From 8fdf3402530803c9344413f7467203b1a419608c Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 4 Jan 2024 13:02:41 +0100 Subject: [PATCH 45/51] ref: Deprecate `lastEventId()` (#10043) --- MIGRATION.md | 19 ++++++++++++ packages/angular/src/errorhandler.ts | 4 ++- packages/astro/src/index.server.ts | 1 + packages/astro/src/index.types.ts | 4 +++ packages/browser/src/exports.ts | 3 ++ packages/browser/src/helpers.ts | 2 ++ packages/browser/src/sdk.ts | 37 ++++++++++++++++++----- packages/browser/test/unit/index.test.ts | 5 +++ packages/bun/src/index.ts | 1 + packages/core/src/exports.ts | 1 + packages/core/src/index.ts | 1 + packages/deno/src/index.ts | 1 + packages/node-experimental/src/index.ts | 1 + packages/node-experimental/src/sdk/api.ts | 5 ++- packages/node/src/index.ts | 1 + packages/react/src/errorboundary.tsx | 4 ++- packages/remix/src/index.server.ts | 1 + packages/remix/src/index.types.ts | 5 +++ packages/serverless/src/index.ts | 1 + packages/sveltekit/src/index.types.ts | 4 +++ packages/sveltekit/src/server/index.ts | 1 + packages/vercel-edge/src/index.ts | 1 + 22 files changed, 93 insertions(+), 10 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 7a3853e996bc..cae009a542ca 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -44,6 +44,25 @@ Instead, import this directly from `@sentry/utils`. Generally, in most cases you should probably use `continueTrace` instead, which abstracts this away from you and handles scope propagation for you. +## Deprecate `lastEventId()` + +Instead, if you need the ID of a recently captured event, we recommend using `beforeSend` instead: + +```ts +import * as Sentry from "@sentry/browser"; + +Sentry.init({ + dsn: "__DSN__", + beforeSend(event, hint) { + const lastCapturedEventId = event.event_id; + + // Do something with `lastCapturedEventId` here + + return event; + }, +}); +``` + ## Deprecate `timestampWithMs` export - #7878 The `timestampWithMs` util is deprecated in favor of using `timestampInSeconds`. diff --git a/packages/angular/src/errorhandler.ts b/packages/angular/src/errorhandler.ts index b776cc4701a3..ec7a735ab559 100644 --- a/packages/angular/src/errorhandler.ts +++ b/packages/angular/src/errorhandler.ts @@ -13,7 +13,8 @@ import { runOutsideAngular } from './zone'; export interface ErrorHandlerOptions { logErrors?: boolean; showDialog?: boolean; - dialogOptions?: Sentry.ReportDialogOptions; + // eslint-disable-next-line deprecation/deprecation + dialogOptions?: Omit; /** * Custom implementation of error extraction from the raw value captured by the Angular. * @param error Value captured by Angular's ErrorHandler provider @@ -120,6 +121,7 @@ class SentryErrorHandler implements AngularErrorHandler { if (client && client.on && !this._registeredAfterSendEventHandler) { client.on('afterSendEvent', (event: Event) => { if (!event.type) { + // eslint-disable-next-line deprecation/deprecation Sentry.showReportDialog({ ...this._options.dialogOptions, eventId: event.event_id }); } }); diff --git a/packages/astro/src/index.server.ts b/packages/astro/src/index.server.ts index 9b442fedee5c..6a1011053007 100644 --- a/packages/astro/src/index.server.ts +++ b/packages/astro/src/index.server.ts @@ -48,6 +48,7 @@ export { makeNodeTransport, defaultIntegrations, defaultStackParser, + // eslint-disable-next-line deprecation/deprecation lastEventId, flush, close, diff --git a/packages/astro/src/index.types.ts b/packages/astro/src/index.types.ts index b69206b0dd0c..5a693fbc5c63 100644 --- a/packages/astro/src/index.types.ts +++ b/packages/astro/src/index.types.ts @@ -21,6 +21,10 @@ export declare const defaultStackParser: StackParser; export declare function close(timeout?: number | undefined): PromiseLike; export declare function flush(timeout?: number | undefined): PromiseLike; + +/** + * @deprecated This function will be removed in the next major version of the Sentry SDK. + */ export declare function lastEventId(): string | undefined; export default sentryAstro; diff --git a/packages/browser/src/exports.ts b/packages/browser/src/exports.ts index cc9712517b2b..0d87e7898283 100644 --- a/packages/browser/src/exports.ts +++ b/packages/browser/src/exports.ts @@ -18,6 +18,8 @@ export type { } from '@sentry/types'; export type { BrowserOptions } from './client'; + +// eslint-disable-next-line deprecation/deprecation export type { ReportDialogOptions } from './helpers'; export { @@ -39,6 +41,7 @@ export { getClient, getCurrentScope, Hub, + // eslint-disable-next-line deprecation/deprecation lastEventId, makeMain, Scope, diff --git a/packages/browser/src/helpers.ts b/packages/browser/src/helpers.ts index 2ba47baa0c3b..1bc58b780748 100644 --- a/packages/browser/src/helpers.ts +++ b/packages/browser/src/helpers.ts @@ -156,6 +156,8 @@ export function wrap( /** * All properties the report dialog supports + * + * @deprecated This type will be removed in the next major version of the Sentry SDK. `showReportDialog` will still be around, however the `eventId` option will now be required. */ export interface ReportDialogOptions { // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/packages/browser/src/sdk.ts b/packages/browser/src/sdk.ts index fd21a8da7500..579bb57e9698 100644 --- a/packages/browser/src/sdk.ts +++ b/packages/browser/src/sdk.ts @@ -133,12 +133,32 @@ export function init(options: BrowserOptions = {}): void { } } -/** - * Present the user with a report dialog. - * - * @param options Everything is optional, we try to fetch all info need from the global scope. - */ -export function showReportDialog(options: ReportDialogOptions = {}, hub: Hub = getCurrentHub()): void { +type NewReportDialogOptions = ReportDialogOptions & { eventId: string }; // eslint-disable-line + +interface ShowReportDialogFunction { + /** + * Present the user with a report dialog. + * + * @param options Everything is optional, we try to fetch all info need from the global scope. + */ + (options: NewReportDialogOptions): void; + + /** + * Present the user with a report dialog. + * + * @param options Everything is optional, we try to fetch all info need from the global scope. + * + * @deprecated Please always pass an `options` argument with `eventId`. The `hub` argument will not be used in the next version of the SDK. + */ + // eslint-disable-next-line deprecation/deprecation + (options?: ReportDialogOptions, hub?: Hub): void; +} + +export const showReportDialog: ShowReportDialogFunction = ( + // eslint-disable-next-line deprecation/deprecation + options: ReportDialogOptions = {}, + hub: Hub = getCurrentHub(), +) => { // doesn't work without a document (React Native) if (!WINDOW.document) { DEBUG_BUILD && logger.error('Global document not defined in showReportDialog call'); @@ -159,7 +179,10 @@ export function showReportDialog(options: ReportDialogOptions = {}, hub: Hub = g }; } + // TODO(v8): Remove this entire if statement. `eventId` will be a required option. + // eslint-disable-next-line deprecation/deprecation if (!options.eventId) { + // eslint-disable-next-line deprecation/deprecation options.eventId = hub.lastEventId(); } @@ -192,7 +215,7 @@ export function showReportDialog(options: ReportDialogOptions = {}, hub: Hub = g } else { DEBUG_BUILD && logger.error('Not injecting report dialog. No injection point found in HTML'); } -} +}; /** * This function is here to be API compatible with the loader. diff --git a/packages/browser/test/unit/index.test.ts b/packages/browser/test/unit/index.test.ts index 5968349adc1a..80b0da9b7c64 100644 --- a/packages/browser/test/unit/index.test.ts +++ b/packages/browser/test/unit/index.test.ts @@ -88,6 +88,7 @@ describe('SentryBrowser', () => { getCurrentScope().setUser(EX_USER); getCurrentHub().bindClient(client); + // eslint-disable-next-line deprecation/deprecation showReportDialog(); expect(getReportDialogEndpoint).toHaveBeenCalledTimes(1); @@ -102,6 +103,7 @@ describe('SentryBrowser', () => { getCurrentHub().bindClient(client); const DIALOG_OPTION_USER = { email: 'option@example.com' }; + // eslint-disable-next-line deprecation/deprecation showReportDialog({ user: DIALOG_OPTION_USER }); expect(getReportDialogEndpoint).toHaveBeenCalledTimes(1); @@ -135,6 +137,7 @@ describe('SentryBrowser', () => { it('should call `onClose` when receiving `__sentry_reportdialog_closed__` MessageEvent', async () => { const onClose = jest.fn(); + // eslint-disable-next-line deprecation/deprecation showReportDialog({ onClose }); await waitForPostMessage('__sentry_reportdialog_closed__'); @@ -149,6 +152,7 @@ describe('SentryBrowser', () => { const onClose = jest.fn(() => { throw new Error(); }); + // eslint-disable-next-line deprecation/deprecation showReportDialog({ onClose }); await waitForPostMessage('__sentry_reportdialog_closed__'); @@ -161,6 +165,7 @@ describe('SentryBrowser', () => { it('should not call `onClose` for other MessageEvents', async () => { const onClose = jest.fn(); + // eslint-disable-next-line deprecation/deprecation showReportDialog({ onClose }); await waitForPostMessage('some_message'); diff --git a/packages/bun/src/index.ts b/packages/bun/src/index.ts index b2e8e4e0eb25..964e34560bdf 100644 --- a/packages/bun/src/index.ts +++ b/packages/bun/src/index.ts @@ -47,6 +47,7 @@ export { getGlobalScope, getIsolationScope, Hub, + // eslint-disable-next-line deprecation/deprecation lastEventId, makeMain, runWithAsyncContext, diff --git a/packages/core/src/exports.ts b/packages/core/src/exports.ts index d7757e7d5d37..d479a3093d51 100644 --- a/packages/core/src/exports.ts +++ b/packages/core/src/exports.ts @@ -300,6 +300,7 @@ export async function close(timeout?: number): Promise { * This is the getter for lastEventId. * * @returns The last event id of a captured event. + * @deprecated This function will be removed in the next major version of the Sentry SDK. */ export function lastEventId(): string | undefined { return getCurrentHub().lastEventId(); diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index bc49c8802dad..20748ff11589 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -17,6 +17,7 @@ export { // eslint-disable-next-line deprecation/deprecation configureScope, flush, + // eslint-disable-next-line deprecation/deprecation lastEventId, startTransaction, setContext, diff --git a/packages/deno/src/index.ts b/packages/deno/src/index.ts index 1615b36064e2..2530e2f7bdc5 100644 --- a/packages/deno/src/index.ts +++ b/packages/deno/src/index.ts @@ -46,6 +46,7 @@ export { getGlobalScope, getIsolationScope, Hub, + // eslint-disable-next-line deprecation/deprecation lastEventId, makeMain, runWithAsyncContext, diff --git a/packages/node-experimental/src/index.ts b/packages/node-experimental/src/index.ts index 546f97efc10d..f9d065de52db 100644 --- a/packages/node-experimental/src/index.ts +++ b/packages/node-experimental/src/index.ts @@ -22,6 +22,7 @@ export { captureMessage, addGlobalEventProcessor, addEventProcessor, + // eslint-disable-next-line deprecation/deprecation lastEventId, setContext, setExtra, diff --git a/packages/node-experimental/src/sdk/api.ts b/packages/node-experimental/src/sdk/api.ts index 9ef8862aa88b..71a08dd38552 100644 --- a/packages/node-experimental/src/sdk/api.ts +++ b/packages/node-experimental/src/sdk/api.ts @@ -56,7 +56,10 @@ export function withIsolationScope(callback: (isolationScope: Scope) => T): T }); } -/** Get the ID of the last sent error event. */ +/** + * Get the ID of the last sent error event. + * @deprecated This function will be removed in the next major version of the Sentry SDK. + */ export function lastEventId(): string | undefined { return getCurrentScope().lastEventId(); } diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index ea924e125639..e712a4fc0d0d 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -46,6 +46,7 @@ export { getGlobalScope, getIsolationScope, Hub, + // eslint-disable-next-line deprecation/deprecation lastEventId, makeMain, runWithAsyncContext, diff --git a/packages/react/src/errorboundary.tsx b/packages/react/src/errorboundary.tsx index 66a026c7fe6d..a4920cb37b2b 100644 --- a/packages/react/src/errorboundary.tsx +++ b/packages/react/src/errorboundary.tsx @@ -28,7 +28,8 @@ export type ErrorBoundaryProps = { * Options to be passed into the Sentry report dialog. * No-op if {@link showDialog} is false. */ - dialogOptions?: ReportDialogOptions | undefined; + // eslint-disable-next-line deprecation/deprecation + dialogOptions?: Omit | undefined; /** * A fallback component that gets rendered when the error boundary encounters an error. * @@ -111,6 +112,7 @@ class ErrorBoundary extends React.Component { if (!event.type && event.event_id === this._lastEventId) { + // eslint-disable-next-line deprecation/deprecation showReportDialog({ ...props.dialogOptions, eventId: this._lastEventId }); } }); diff --git a/packages/remix/src/index.server.ts b/packages/remix/src/index.server.ts index c3438d6a2743..9bbe5f03641e 100644 --- a/packages/remix/src/index.server.ts +++ b/packages/remix/src/index.server.ts @@ -47,6 +47,7 @@ export { makeNodeTransport, defaultIntegrations, defaultStackParser, + // eslint-disable-next-line deprecation/deprecation lastEventId, flush, close, diff --git a/packages/remix/src/index.types.ts b/packages/remix/src/index.types.ts index dc042dfdb762..c8266d8db62e 100644 --- a/packages/remix/src/index.types.ts +++ b/packages/remix/src/index.types.ts @@ -25,4 +25,9 @@ declare const runtime: 'client' | 'server'; export const close = runtime === 'client' ? clientSdk.close : serverSdk.close; export const flush = runtime === 'client' ? clientSdk.flush : serverSdk.flush; + +/** + * @deprecated This function will be removed in the next major version of the Sentry SDK. + */ +// eslint-disable-next-line deprecation/deprecation export const lastEventId = runtime === 'client' ? clientSdk.lastEventId : serverSdk.lastEventId; diff --git a/packages/serverless/src/index.ts b/packages/serverless/src/index.ts index ff961df37019..488ffec7a1ec 100644 --- a/packages/serverless/src/index.ts +++ b/packages/serverless/src/index.ts @@ -51,6 +51,7 @@ export { flush, getSentryRelease, init, + // eslint-disable-next-line deprecation/deprecation lastEventId, DEFAULT_USER_INCLUDES, addRequestDataToEvent, diff --git a/packages/sveltekit/src/index.types.ts b/packages/sveltekit/src/index.types.ts index 8a3b0870ed8e..6a79546869d7 100644 --- a/packages/sveltekit/src/index.types.ts +++ b/packages/sveltekit/src/index.types.ts @@ -44,4 +44,8 @@ export declare const defaultStackParser: StackParser; export declare function close(timeout?: number | undefined): PromiseLike; export declare function flush(timeout?: number | undefined): PromiseLike; + +/** + * @deprecated This function will be removed in the next major version of the Sentry SDK. + */ export declare function lastEventId(): string | undefined; diff --git a/packages/sveltekit/src/server/index.ts b/packages/sveltekit/src/server/index.ts index 9b57a1c4d110..2086b3515551 100644 --- a/packages/sveltekit/src/server/index.ts +++ b/packages/sveltekit/src/server/index.ts @@ -45,6 +45,7 @@ export { makeNodeTransport, defaultIntegrations, defaultStackParser, + // eslint-disable-next-line deprecation/deprecation lastEventId, flush, close, diff --git a/packages/vercel-edge/src/index.ts b/packages/vercel-edge/src/index.ts index daed81643ab5..0dd3e722c6bf 100644 --- a/packages/vercel-edge/src/index.ts +++ b/packages/vercel-edge/src/index.ts @@ -46,6 +46,7 @@ export { getGlobalScope, getIsolationScope, Hub, + // eslint-disable-next-line deprecation/deprecation lastEventId, makeMain, runWithAsyncContext, From 5462b048bdc7eae56ed8884aea79c6a44758d145 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 4 Jan 2024 14:34:47 +0100 Subject: [PATCH 46/51] build: Re-enable eslint `no-unused-vars`, `no-control-regex` and `no-loss-of-precision` (#10049) --- .eslintrc.js | 12 ------------ .../public-api/startSpan/error-sync/test.ts | 2 +- .../node-integration-tests/suites/anr/test.ts | 2 +- packages/core/test/lib/exports.test.ts | 4 ++-- .../lib/utils/applyScopeDataToEvent.test.ts | 6 +++--- packages/node/src/cron/node-cron.ts | 2 +- packages/node/test/cron.test.ts | 4 ++-- packages/opentelemetry/src/custom/client.ts | 2 +- packages/opentelemetry/src/spanProcessor.ts | 2 +- packages/serverless/test/awslambda.test.ts | 18 ++++++++---------- packages/types/src/metrics.ts | 14 ++++---------- 11 files changed, 24 insertions(+), 44 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 4de21ba03e3f..e20424aef7f3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -23,23 +23,11 @@ module.exports = { 'types/**', ], overrides: [ - { - files: ['*'], - rules: { - // Disabled because it's included with Biome's linter - 'no-control-regex': 'off', - }, - }, { files: ['*.ts', '*.tsx', '*.d.ts'], parserOptions: { project: ['tsconfig.json'], }, - rules: { - // Disabled because it's included with Biome's linter - '@typescript-eslint/no-unused-vars': 'off', - '@typescript-eslint/no-loss-of-precision': 'off', - }, }, { files: ['test/**/*.ts', 'test/**/*.tsx'], diff --git a/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts index 4cba6929396f..2c1d92ebbe00 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts @@ -13,7 +13,7 @@ sentryTest('should capture an error within a sync startSpan callback', async ({ const gotoPromise = page.goto(url); const envelopePromise = getMultipleSentryEnvelopeRequests(page, 2); - const [_, events] = await Promise.all([gotoPromise, envelopePromise]); + const [, events] = await Promise.all([gotoPromise, envelopePromise]); const txn = events.find(event => event.type === 'transaction'); const err = events.find(event => !event.type); diff --git a/dev-packages/node-integration-tests/suites/anr/test.ts b/dev-packages/node-integration-tests/suites/anr/test.ts index 3e5e7c9643eb..1da0c0557bf9 100644 --- a/dev-packages/node-integration-tests/suites/anr/test.ts +++ b/dev-packages/node-integration-tests/suites/anr/test.ts @@ -124,7 +124,7 @@ conditionalTest({ min: 16 })('should report ANR when event loop blocked', () => done(); }, 5_000); - childProcess.exec(`node ${testScriptPath}`, { encoding: 'utf8' }, (_, stdout) => { + childProcess.exec(`node ${testScriptPath}`, { encoding: 'utf8' }, () => { hasClosed = true; }); }); diff --git a/packages/core/test/lib/exports.test.ts b/packages/core/test/lib/exports.test.ts index de048c209530..7a4ec6987dd1 100644 --- a/packages/core/test/lib/exports.test.ts +++ b/packages/core/test/lib/exports.test.ts @@ -35,7 +35,7 @@ describe('withScope', () => { }); it('works with a return value', () => { - const res = withScope(scope => { + const res = withScope(() => { return 'foo'; }); @@ -43,7 +43,7 @@ describe('withScope', () => { }); it('works with an async function return value', async () => { - const res = withScope(async scope => { + const res = withScope(async () => { return 'foo'; }); diff --git a/packages/core/test/lib/utils/applyScopeDataToEvent.test.ts b/packages/core/test/lib/utils/applyScopeDataToEvent.test.ts index f4fa38ee8b8b..897524cf05e2 100644 --- a/packages/core/test/lib/utils/applyScopeDataToEvent.test.ts +++ b/packages/core/test/lib/utils/applyScopeDataToEvent.test.ts @@ -156,9 +156,9 @@ describe('mergeScopeData', () => { const breadcrumb2 = { message: '2' } as Breadcrumb; const breadcrumb3 = { message: '3' } as Breadcrumb; - const eventProcessor1 = ((a: unknown) => null) as EventProcessor; - const eventProcessor2 = ((b: unknown) => null) as EventProcessor; - const eventProcessor3 = ((c: unknown) => null) as EventProcessor; + const eventProcessor1 = (() => null) as EventProcessor; + const eventProcessor2 = (() => null) as EventProcessor; + const eventProcessor3 = (() => null) as EventProcessor; const data1: ScopeData = { eventProcessors: [eventProcessor1], diff --git a/packages/node/src/cron/node-cron.ts b/packages/node/src/cron/node-cron.ts index ba3a3b555965..2f422b9a85f8 100644 --- a/packages/node/src/cron/node-cron.ts +++ b/packages/node/src/cron/node-cron.ts @@ -35,7 +35,7 @@ export function instrumentNodeCron(lib: Partial & T): T { // When 'get' is called for schedule, return a proxied version of the schedule function return new Proxy(target.schedule, { apply(target, thisArg, argArray: Parameters) { - const [expression, _, options] = argArray; + const [expression, , options] = argArray; if (!options?.name) { throw new Error('Missing "name" for scheduled job. A name is required for Sentry check-in monitoring.'); diff --git a/packages/node/test/cron.test.ts b/packages/node/test/cron.test.ts index 3c8bb1a66a4c..d37fcf189926 100644 --- a/packages/node/test/cron.test.ts +++ b/packages/node/test/cron.test.ts @@ -53,7 +53,7 @@ describe('cron check-ins', () => { const CronJobWithCheckIn = cron.instrumentCron(CronJobMock, 'my-cron-job'); - const _ = new CronJobWithCheckIn('* * * Jan,Sep Sun', () => { + new CronJobWithCheckIn('* * * Jan,Sep Sun', () => { expect(withMonitorSpy).toHaveBeenCalledTimes(1); expect(withMonitorSpy).toHaveBeenLastCalledWith('my-cron-job', expect.anything(), { schedule: { type: 'crontab', value: '* * * 1,9 0' }, @@ -67,7 +67,7 @@ describe('cron check-ins', () => { const CronJobWithCheckIn = cron.instrumentCron(CronJobMock, 'my-cron-job'); - const _ = CronJobWithCheckIn.from({ + CronJobWithCheckIn.from({ cronTime: '* * * Jan,Sep Sun', onTick: () => { expect(withMonitorSpy).toHaveBeenCalledTimes(1); diff --git a/packages/opentelemetry/src/custom/client.ts b/packages/opentelemetry/src/custom/client.ts index abb6ba30972d..5bf39208a79f 100644 --- a/packages/opentelemetry/src/custom/client.ts +++ b/packages/opentelemetry/src/custom/client.ts @@ -71,7 +71,7 @@ export function wrapClientClass< event: Event, hint: EventHint, scope?: Scope, - isolationScope?: Scope, + _isolationScope?: Scope, ): PromiseLike { let actualScope = scope; diff --git a/packages/opentelemetry/src/spanProcessor.ts b/packages/opentelemetry/src/spanProcessor.ts index dd5e6de53cbd..fb05b2c645cb 100644 --- a/packages/opentelemetry/src/spanProcessor.ts +++ b/packages/opentelemetry/src/spanProcessor.ts @@ -12,7 +12,7 @@ import { maybeCaptureExceptionForTimedEvent } from './utils/captureExceptionForT import { getHubFromContext } from './utils/contextData'; import { getSpanHub, setSpanFinishScope, setSpanHub, setSpanParent, setSpanScope } from './utils/spanData'; -function onSpanStart(span: Span, parentContext: Context, ScopeClass: typeof OpenTelemetryScope): void { +function onSpanStart(span: Span, parentContext: Context, _ScopeClass: typeof OpenTelemetryScope): void { // This is a reliable way to get the parent span - because this is exactly how the parent is identified in the OTEL SDK const parentSpan = trace.getSpan(parentContext); const hub = getHubFromContext(parentContext); diff --git a/packages/serverless/test/awslambda.test.ts b/packages/serverless/test/awslambda.test.ts index 1188f0466295..f2aa18e9cb8d 100644 --- a/packages/serverless/test/awslambda.test.ts +++ b/packages/serverless/test/awslambda.test.ts @@ -39,9 +39,7 @@ const fakeCallback: Callback = (err, result) => { return err; }; -function expectScopeSettings(fakeTransactionContext: any) { - // @ts-expect-error see "Why @ts-expect-error" note - const fakeSpan = { ...SentryNode.fakeSpan, ...fakeTransactionContext }; +function expectScopeSettings() { // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeScope.setTransactionName).toBeCalledWith('functionName'); // @ts-expect-error see "Why @ts-expect-error" note @@ -213,7 +211,7 @@ describe('AWSLambda', () => { expect(rv).toStrictEqual(42); expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); - expectScopeSettings(fakeTransactionContext); + expectScopeSettings(); // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalledWith(2000); @@ -239,7 +237,7 @@ describe('AWSLambda', () => { }; expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); - expectScopeSettings(fakeTransactionContext); + expectScopeSettings(); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeSpan.end).toBeCalled(); @@ -317,7 +315,7 @@ describe('AWSLambda', () => { }; expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); - expectScopeSettings(fakeTransactionContext); + expectScopeSettings(); expect(SentryNode.captureException).toBeCalledWith(e, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeSpan.end).toBeCalled(); @@ -345,7 +343,7 @@ describe('AWSLambda', () => { expect(rv).toStrictEqual(42); expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); - expectScopeSettings(fakeTransactionContext); + expectScopeSettings(); // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalled(); @@ -382,7 +380,7 @@ describe('AWSLambda', () => { }; expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); - expectScopeSettings(fakeTransactionContext); + expectScopeSettings(); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeSpan.end).toBeCalled(); @@ -425,7 +423,7 @@ describe('AWSLambda', () => { expect(rv).toStrictEqual(42); expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); - expectScopeSettings(fakeTransactionContext); + expectScopeSettings(); // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeSpan.end).toBeCalled(); expect(SentryNode.flush).toBeCalled(); @@ -462,7 +460,7 @@ describe('AWSLambda', () => { }; expect(SentryNode.startSpanManual).toBeCalledWith(fakeTransactionContext, expect.any(Function)); - expectScopeSettings(fakeTransactionContext); + expectScopeSettings(); expect(SentryNode.captureException).toBeCalledWith(error, expect.any(Function)); // @ts-expect-error see "Why @ts-expect-error" note expect(SentryNode.fakeSpan.end).toBeCalled(); diff --git a/packages/types/src/metrics.ts b/packages/types/src/metrics.ts index 9bfb990461eb..0f8dc4f53435 100644 --- a/packages/types/src/metrics.ts +++ b/packages/types/src/metrics.ts @@ -5,27 +5,21 @@ import type { Primitive } from './misc'; * An abstract definition of the minimum required API * for a metric instance. */ -export abstract class MetricInstance { +export interface MetricInstance { /** * Returns the weight of the metric. */ - public get weight(): number { - return 1; - } + weight: number; /** * Adds a value to a metric. */ - public add(value: number | string): void { - // Override this. - } + add(value: number | string): void; /** * Serializes the metric into a statsd format string. */ - public toString(): string { - return ''; - } + toString(): string; } export interface MetricBucketItem { From 59ffba3e3f5dda3d59620e9dcd115333c39ff3de Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 4 Jan 2024 15:47:33 +0100 Subject: [PATCH 47/51] feat(core): Add `setClient()` and `getClient()` to `Scope` (#10055) --- packages/core/src/hub.ts | 25 +++++++++++++++--- packages/core/src/scope.ts | 19 ++++++++++++++ packages/core/test/lib/scope.test.ts | 29 +++++++++++++++++++-- packages/node-experimental/src/sdk/types.ts | 3 --- packages/types/src/scope.ts | 13 +++++++++ 5 files changed, 80 insertions(+), 9 deletions(-) diff --git a/packages/core/src/hub.ts b/packages/core/src/hub.ts index 53c74d348537..07f1310f94a2 100644 --- a/packages/core/src/hub.ts +++ b/packages/core/src/hub.ts @@ -124,16 +124,33 @@ export class Hub implements HubInterface { */ public constructor( client?: Client, - scope: Scope = new Scope(), - isolationScope = new Scope(), + scope?: Scope, + isolationScope?: Scope, private readonly _version: number = API_VERSION, ) { - this._stack = [{ scope }]; + let assignedScope; + if (!scope) { + assignedScope = new Scope(); + assignedScope.setClient(client); + } else { + assignedScope = scope; + } + + let assignedIsolationScope; + if (!isolationScope) { + assignedIsolationScope = new Scope(); + assignedIsolationScope.setClient(client); + } else { + assignedIsolationScope = isolationScope; + } + + this._stack = [{ scope: assignedScope }]; + if (client) { this.bindClient(client); } - this._isolationScope = isolationScope; + this._isolationScope = assignedIsolationScope; } /** diff --git a/packages/core/src/scope.ts b/packages/core/src/scope.ts index 3fc78081f188..cff498bc85a3 100644 --- a/packages/core/src/scope.ts +++ b/packages/core/src/scope.ts @@ -3,6 +3,7 @@ import type { Attachment, Breadcrumb, CaptureContext, + Client, Context, Contexts, Event, @@ -100,6 +101,9 @@ export class Scope implements ScopeInterface { /** Request Mode Session Status */ protected _requestSession?: RequestSession; + /** The client on this scope */ + protected _client?: Client; + // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method. public constructor() { @@ -144,10 +148,25 @@ export class Scope implements ScopeInterface { newScope._attachments = [...this._attachments]; newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }; newScope._propagationContext = { ...this._propagationContext }; + newScope._client = this._client; return newScope; } + /** Update the client on the scope. */ + public setClient(client: Client | undefined): void { + this._client = client; + } + + /** + * Get the client assigned to this scope. + * + * It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing. + */ + public getClient(): Client | undefined { + return this._client; + } + /** * Add internal on change listener. Used for sub SDKs that need to store the scope. * @hidden diff --git a/packages/core/test/lib/scope.test.ts b/packages/core/test/lib/scope.test.ts index e04f5638c5d0..3122f3b3e3e5 100644 --- a/packages/core/test/lib/scope.test.ts +++ b/packages/core/test/lib/scope.test.ts @@ -1,8 +1,8 @@ -import type { Attachment, Breadcrumb } from '@sentry/types'; +import type { Attachment, Breadcrumb, Client } from '@sentry/types'; import { applyScopeDataToEvent } from '../../src'; import { Scope, getGlobalScope, setGlobalScope } from '../../src/scope'; -describe('Unit | Scope', () => { +describe('Scope', () => { beforeEach(() => { setGlobalScope(undefined); }); @@ -187,4 +187,29 @@ describe('Unit | Scope', () => { }); /* eslint-enable deprecation/deprecation */ }); + + describe('setClient() and getClient()', () => { + it('allows storing and retrieving client objects', () => { + const fakeClient = {} as Client; + const scope = new Scope(); + scope.setClient(fakeClient); + expect(scope.getClient()).toBe(fakeClient); + }); + + it('defaults to not having a client', () => { + const scope = new Scope(); + expect(scope.getClient()).toBeUndefined(); + }); + }); + + describe('.clone()', () => { + it('will clone a client on the scope', () => { + const fakeClient = {} as Client; + const scope = new Scope(); + scope.setClient(fakeClient); + + const clonedScope = scope.clone(); + expect(clonedScope.getClient()).toBe(fakeClient); + }); + }); }); diff --git a/packages/node-experimental/src/sdk/types.ts b/packages/node-experimental/src/sdk/types.ts index 140056e583ca..90c61dceda86 100644 --- a/packages/node-experimental/src/sdk/types.ts +++ b/packages/node-experimental/src/sdk/types.ts @@ -1,7 +1,6 @@ import type { Attachment, Breadcrumb, - Client, Contexts, Event, EventHint, @@ -36,8 +35,6 @@ export interface Scope extends BaseScope { isolationScope: typeof this | undefined; // @ts-expect-error typeof this is what we want here clone(scope?: Scope): typeof this; - setClient(client: Client): void; - getClient(): Client | undefined; captureException(exception: unknown, hint?: EventHint): string; captureMessage( message: string, diff --git a/packages/types/src/scope.ts b/packages/types/src/scope.ts index 50ef4da5987f..5dbdee05260d 100644 --- a/packages/types/src/scope.ts +++ b/packages/types/src/scope.ts @@ -1,5 +1,6 @@ import type { Attachment } from './attachment'; import type { Breadcrumb } from './breadcrumb'; +import type { Client } from './client'; import type { Context, Contexts } from './context'; import type { EventProcessor } from './eventprocessor'; import type { Extra, Extras } from './extra'; @@ -47,6 +48,18 @@ export interface ScopeData { * Holds additional event information. {@link Scope.applyToEvent} will be called by the client before an event is sent. */ export interface Scope { + /** + * Update the client on the scope. + */ + setClient(client: Client | undefined): void; + + /** + * Get the client assigned to this scope. + * + * It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing. + */ + getClient(): Client | undefined; + /** Add new event processor that will be called after {@link applyToEvent}. */ addEventProcessor(callback: EventProcessor): this; From 09e4ecce3ad8241cfd1f064b1f12ad9ea712e956 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Thu, 4 Jan 2024 15:57:29 +0100 Subject: [PATCH 48/51] docs: Add docs for new performance APIs (#10017) This is a WIP document about the new performance APIs. I'm sure I forgot a bunch of things, but it's a start at least...! [View rendered](https://github.com/getsentry/sentry-javascript/blob/fn/docs-new-performance-apis/docs/v8-new-performance-apis.md) --------- Co-authored-by: Lukas Stracke --- docs/v8-new-performance-apis.md | 253 ++++++++++++++++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 docs/v8-new-performance-apis.md diff --git a/docs/v8-new-performance-apis.md b/docs/v8-new-performance-apis.md new file mode 100644 index 000000000000..e7ec274bbb10 --- /dev/null +++ b/docs/v8-new-performance-apis.md @@ -0,0 +1,253 @@ +# New Performance APIs in v8 + +> [!WARNING] This document is WIP. We are working on this while we are preparing v8. + +In v8.0.0, we moved to new performance APIs. These APIs have been introduced in v7, so they can already be used there. +However, in v8 we have removed the old performance APIs, so you have to update your manual instrumentation usage to the +new APIs before updating to v8 of the JavaScript SDKs. + +## Why? + +In v8 of the JavaScript SDKs, we made the move to base the performance instrumentation of all Node-based SDKs to use +[OpenTelemetry](https://opentelemetry.io/) under the hood. This has been done to better align with the broader +ecosystem, and to allow to use common auto instrumentation packages to be able to cover more ground in the ever-changing +JavaScript landscape. + +Since the way that OpenTelemetry works differs from how the SDK used to work, this required some changes in order to be +compatible. + +Note that for Browser- or Edge-based SDKs, we are not (yet) using OpenTelemetry for auto instrumentation. However, in +order to keep the SDKs isomorphic - especially for SDKs for Meta-Frameworks like Next.js, Sveltekit or Remix - we made +the decision to align the performance APIs for all JavaScript-based SDKs. + +## The "old" Way of Manual Performance Instrumentation + +Previously, there where two key APIs for adding manual performance instrumentation to your applications: + +- `startTransaction()` +- `span.startChild()` + +This showed the underlying data model that Sentry was originally based on, which is that there is a root **Transaction** +which can have a nested tree of **Spans**. + +## The new model: Goodbye Transactions, Hello Spans Everywhere! + +In the new model, transactions are conceptually gone. Instead, you will _always_ operate on spans, no matter where in +the tree you are. Note that in the background, spans _may_ still be grouped into a transaction for the Sentry UI. +However, this happens transparently, and from an SDK perspective, all you have to think about are spans. + +## The Span schema + +Previously, spans & transactions had a bunch of properties and methods to be used. Most of these have been removed in +favor of a slimmer, more straightforward API, which is also aligned with OpenTelemetry Spans. You can refer to the table +below to see which things used to exist, and how they can/should be mapped going forward: + +| Old name | Replace with | +| --------------------- | ---------------------------------------------------- | +| `traceId` | `spanContext().traceId` | +| `spanId` | `spanContext().spanId` | +| `parentSpanId` | Unchanged | +| `status` | use utility method TODO | +| `sampled` | `spanIsSampled(span)` | +| `startTimestamp` | `startTime` - note that this has a different format! | +| `tags` | `spanGetAttributes(span)`, or set tags on the scope | +| `data` | `spanGetAttributes(span)` | +| `transaction` | ??? Removed | +| `instrumenter` | Removed | +| `finish()` | `end()` | +| `end()` | Same | +| `setTag()` | `setAttribute()`, or set tags on the scope | +| `setData()` | `setAttribute()` | +| `setStatus()` | TODO: new signature | +| `setHttpStatus()` | ??? TODO | +| `setName()` | `updateName()` | +| `startChild()` | Call `Sentry.startSpan()` independently | +| `isSuccess()` | Removed (TODO) | +| `toTraceparent()` | `spanToTraceHeader(span)` | +| `toContext()` | Removed | +| `updateWithContext()` | Removed | +| `getTraceContext()` | `spanToTraceContext(span)` | + +In addition, a transaction has this API: + +| Old name | Replace with | +| --------------------------- | ------------------------------------------------ | +| `name` | `spanGetName(span)` (TODO) | +| `trimEnd` | Removed | +| `parentSampled` | `spanIsSampled(span)` & `spanContext().isRemote` | +| `metadata` | `spanGetMetadata(span)` | +| `setContext()` | Set context on scope instead | +| `setMeasurement()` | ??? TODO | +| `setMetadata()` | `spanSetMetadata(span, metadata)` | +| `getDynamicSamplingContext` | ??? TODO | + +### Attributes vs. Data vs. Tags vs. Context + +In the old model, you had the concepts of **Data**, **Tags** and **Context** which could be used for different things. +However, this has two main downsides: One, it is not always clear which of these should be used when. And two, not all +of these are displayed the same way for transactions or spans. + +Because of this, in the new model, there are only **Attributes** to be set on spans anymore. Broadly speaking, they map +to what Data used to be. + +If you still really _need_ to set tags or context, you can do so on the scope before starting a span: + +```js +Sentry.withScope(scope => { + scope.setTag('my-tag', 'tag-value'); + Sentry.startSpan({ name: 'my-span' }, span => { + // do something here + // span will have the tags from the containing scope + }); +}); +``` + +## Creating Spans + +Instead of manually starting & ending transactions and spans, the new model does not differentiate between these two. +Instead, you _always_ use the same APIs to start a new span, and it will automatically either create a new **Root Span** +(which is just a regular span, only that it has no parent, and is thus conceptually roughly similar to a transaction) or +a **Child Span** for whatever is the currently active span. + +There are three key APIs available to start spans: + +- `startSpan()` +- `startSpanManual()` +- `startInactiveSpan()` + +All three span APIs take a `SpanContext` as a first argument, which has the following shape: + +```ts +interface SpanContext { + // The only required field - the name of the span + name: string; + attributes?: SpanAttributes; + op?: string; + // TODO: Not yet implemented, but you should be able to pass a scope to base this off + scope?: Scope; + // TODO: The list below may change a bit... + origin?: SpanOrigin; + source?: SpanSource; + metadata?: Partial; +} +``` + +### `startSpan()` + +This is the most common API that should be used in most circumstances. It will start a new span, make it the active span +for the duration of a given callback, and automatically end it when the callback ends. You can use it like this: + +```js +Sentry.startSpan( + { + name: 'my-span', + attributes: { + attr1: 'my-attribute', + attr2: 123, + }, + }, + span => { + // do something that you want to measure + // once this is done, the span is automatically ended + }, +); +``` + +You can also pass an async function: + +```js +Sentry.startSpan( + { + name: 'my-span', + attributes: {}, + }, + async span => { + // do something that you want to measure + await waitOnSomething(); + // once this is done, the span is automatically ended + }, +); +``` + +Since `startSpan()` will make the created span the active span, any automatic or manual instrumentation that creates +spans inside of the callback will attach new spans as children of the span we just started. + +Note that if an error is thrown inside of the callback, the span status will automatically be set to be errored. + +### `startSpanManual()` + +This is a variation of `startSpan()` with the only change that it does not automatically end the span when the callback +ends, but you have to call `span.end()` yourself: + +```js +Sentry.startSpanManual( + { + name: 'my-span', + }, + span => { + // do something that you want to measure + + // Now manually end the span ourselves + span.end(); + }, +); +``` + +In most cases, `startSpan()` should be all you need for manual instrumentation. But if you find yourself in a place +where the automatic ending of spans, for whatever reason, does not work for you, you can use `startSpanManual()` +instead. + +This function will _also_ set the created span as the active span for the duration of the callback, and will _also_ +update the span status to be errored if there is an error thrown inside of the callback. + +### `startInactiveSpan()` + +In contrast to the other two methods, this does not take a callback and this does not make the created span the active +span. You can use this method if you want to create loose spans that do not need to have any children: + +```js +Sentry.startSpan({ name: 'outer' }, () => { + const inner1 = Sentry.startInactiveSpan({ name: 'inner1' }); + const inner2 = Sentry.startInactiveSpan({ name: 'inner2' }); + + // do something + + // manually end the spans + inner1.end(); + inner2.end(); +}); +``` + +No span will ever be created as a child span of an inactive span. + +## Other Notable Changes + +In addition to generally changing the performance APIs, there are also some smaller changes that this brings with it. + +### Changed `SamplingContext` for `tracesSampler()` + +Currently, `tracesSampler()` can receive an arbitrary `SamplingContext` passed as argument. While this is not defined +anywhere in detail, the shape of this context will change in v8. Going forward, this will mostly receive the attributes +of the span, as well as some other relevant data of the span. Some properties we used to (sometimes) pass there, like +`req` for node-based SDKs or `location` for browser tracing, will not be passed anymore. + +### No more `undefined` spans + +In v7, the performance APIs `startSpan()` / `startInactiveSpan()` / `startSpanManual()` would receive an `undefined` +span if tracing was disabled or the span was not sampled. + +In v8, aligning with OpenTelemetry, these will _always_ return a span - _but_ the span may eb a Noop-Span, meaning a +span that is never sent. This means you don't have to guard everywhere in your code anymore for the span to exist: + +```ts +Sentry.startSpan((span: Span | undefined) => { + // previously, in order to be type safe, you had to do... + span?.setAttribute('attr', 1); +}); + +// In v8, the signature changes to: +Sentry.startSpan((span: Span) => { + // no need to guard anymore! + span.setAttribute('attr', 1); +}); +``` From 99f39b52aa3fbcbc5e966d1d40702bec36511fba Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 4 Jan 2024 17:44:37 +0100 Subject: [PATCH 49/51] test(remix): Override `web-streams-polyfill` version to fix integration tests (#10065) --- packages/remix/test/integration/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/remix/test/integration/package.json b/packages/remix/test/integration/package.json index a4ad4f4e3423..04030a492670 100644 --- a/packages/remix/test/integration/package.json +++ b/packages/remix/test/integration/package.json @@ -34,7 +34,8 @@ "@sentry-internal/feedback": "file:../../../feedback", "@sentry/types": "file:../../../types", "@sentry/utils": "file:../../../utils", - "@vanilla-extract/css": "1.13.0" + "@vanilla-extract/css": "1.13.0", + "web-streams-polyfill": "3.2.1" }, "engines": { "node": ">=14" From 33348ecdc95ae329503375636878f36fb4ee60aa Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Thu, 4 Jan 2024 18:03:54 +0100 Subject: [PATCH 50/51] fix(node): Anr doesn't block exit (#10064) --- .../suites/anr/should-exit-forced.js | 19 +++++++++++++++++++ .../suites/anr/should-exit.js | 1 - .../node-integration-tests/suites/anr/test.ts | 16 +++++++++++++++- packages/node/src/integrations/anr/index.ts | 5 +++-- 4 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 dev-packages/node-integration-tests/suites/anr/should-exit-forced.js diff --git a/dev-packages/node-integration-tests/suites/anr/should-exit-forced.js b/dev-packages/node-integration-tests/suites/anr/should-exit-forced.js new file mode 100644 index 000000000000..cee261e8ccb3 --- /dev/null +++ b/dev-packages/node-integration-tests/suites/anr/should-exit-forced.js @@ -0,0 +1,19 @@ +const Sentry = require('@sentry/node'); + +function configureSentry() { + Sentry.init({ + dsn: 'https://public@dsn.ingest.sentry.io/1337', + release: '1.0', + debug: true, + autoSessionTracking: false, + integrations: [new Sentry.Integrations.Anr({ captureStackTrace: true })], + }); +} + +async function main() { + configureSentry(); + await new Promise(resolve => setTimeout(resolve, 1000)); + process.exit(0); +} + +main(); diff --git a/dev-packages/node-integration-tests/suites/anr/should-exit.js b/dev-packages/node-integration-tests/suites/anr/should-exit.js index cee261e8ccb3..7d0ba8db4484 100644 --- a/dev-packages/node-integration-tests/suites/anr/should-exit.js +++ b/dev-packages/node-integration-tests/suites/anr/should-exit.js @@ -13,7 +13,6 @@ function configureSentry() { async function main() { configureSentry(); await new Promise(resolve => setTimeout(resolve, 1000)); - process.exit(0); } main(); diff --git a/dev-packages/node-integration-tests/suites/anr/test.ts b/dev-packages/node-integration-tests/suites/anr/test.ts index 1da0c0557bf9..2c2e513559cf 100644 --- a/dev-packages/node-integration-tests/suites/anr/test.ts +++ b/dev-packages/node-integration-tests/suites/anr/test.ts @@ -115,7 +115,7 @@ conditionalTest({ min: 16 })('should report ANR when event loop blocked', () => }); }); - test('can exit', done => { + test('should exit', done => { const testScriptPath = path.resolve(__dirname, 'should-exit.js'); let hasClosed = false; @@ -129,6 +129,20 @@ conditionalTest({ min: 16 })('should report ANR when event loop blocked', () => }); }); + test('should exit forced', done => { + const testScriptPath = path.resolve(__dirname, 'should-exit-forced.js'); + let hasClosed = false; + + setTimeout(() => { + expect(hasClosed).toBe(true); + done(); + }, 5_000); + + childProcess.exec(`node ${testScriptPath}`, { encoding: 'utf8' }, () => { + hasClosed = true; + }); + }); + test('With session', done => { expect.assertions(9); diff --git a/packages/node/src/integrations/anr/index.ts b/packages/node/src/integrations/anr/index.ts index cbc0c47cbfc7..3aa71f0589f3 100644 --- a/packages/node/src/integrations/anr/index.ts +++ b/packages/node/src/integrations/anr/index.ts @@ -122,8 +122,6 @@ async function _startWorker(client: NodeClient, _options: Partial): Pro const worker = new Worker(new URL(`data:application/javascript;base64,${base64WorkerScript}`), { workerData: options, }); - // Ensure this thread can't block app exit - worker.unref(); process.on('exit', () => { worker.terminate(); @@ -160,4 +158,7 @@ async function _startWorker(client: NodeClient, _options: Partial): Pro clearInterval(timer); log('ANR worker exit', code); }); + + // Ensure this thread can't block app exit + worker.unref(); } From c06c2d8d8afd5755a641cd30b5894c35359de0b4 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 4 Jan 2024 09:59:46 -0500 Subject: [PATCH 51/51] meta(changelog): Update changelog for 7.92.0 --- CHANGELOG.md | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++ MIGRATION.md | 31 ++++++++++++++++++- 2 files changed, 117 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb90af03fa6b..2bf94ab74c14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,93 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +## 7.92.0 + +### Important Changes + +#### Deprecations + +- feat(core): Add `span.updateName()` and deprecate `span.setName()` (#10018) +- feat(core): Deprecate `span.getTraceContext()` (#10032) +- feat(core): Deprecate `span.toTraceparent()` in favor of `spanToTraceHeader()` util (#10031) +- feat(core): Deprecate `trace` in favor of `startSpan` (#10012) +- feat(core): Deprecate span `toContext()` and `updateWithContext()` (#10030) +- ref: Deprecate `deepReadDirSync` (#10016) +- ref: Deprecate `lastEventId()` (#10043) + +Please take a look at the [Migration docs](./MIGRATION.md) for more details. These methods will be removed in the upcoming [v8 major release](https://github.com/getsentry/sentry-javascript/discussions/9802). + +#### Cron Monitoring Support for `cron` and `node-cron` libraries + +- feat(node): Instrumentation for `cron` library (#9999) +- feat(node): Instrumentation for `node-cron` library (#9904) + +This release adds instrumentation for the `cron` and `node-cron` libraries. This allows you to monitor your cron jobs with [Sentry cron monitors](https://docs.sentry.io/product/crons/). + +For [`cron`](https://www.npmjs.com/package/cron): + +```js +import * as Sentry from '@sentry/node'; +import { CronJob } from 'cron'; + +const CronJobWithCheckIn = Sentry.cron.instrumentCron(CronJob, 'my-cron-job'); + +// use the constructor +const job = new CronJobWithCheckIn('* * * * *', () => { + console.log('You will see this message every minute'); +}); + +// or from +const job = CronJobWithCheckIn.from({ + cronTime: '* * * * *', + onTick: () => { + console.log('You will see this message every minute'); + }, +}); +``` + +For [`node-cron`](https://www.npmjs.com/package/node-cron): + +```js +import * as Sentry from '@sentry/node'; +import cron from 'node-cron'; + +const cronWithCheckIn = Sentry.cron.instrumentNodeCron(cron); + +cronWithCheckIn.schedule( + '* * * * *', + () => { + console.log('running a task every minute'); + }, + { name: 'my-cron-job' }, +); +``` + +### Other Changes + +- feat(astro): Add `enabled` option to Astro integration options (#10007) +- feat(core): Add `attributes` to `Span` (#10008) +- feat(core): Add `setClient()` and `getClient()` to `Scope` (#10055) +- feat(integrations): Capture error cause with `captureErrorCause` in `ExtraErrorData` integration (#9914) +- feat(node-experimental): Allow to pass base span options to trace methods (#10006) +- feat(node): Local variables via async inspector in node 19+ (#9962) +- fix(astro): handle commonjs related issues (#10042) +- fix(astro): Handle non-utf8 encoded streams in middleware (#9989) +- fix(astro): prevent sentry from externalized (#9994) +- fix(core): Ensure `withScope` sets current scope correctly with async callbacks (#9974) +- fix(node): ANR fixes and additions (#9998) +- fix(node): Anr should not block exit (#10035) +- fix(node): Correctly resolve module name (#10001) +- fix(node): Handle inspector already open (#10025) +- fix(node): Make `NODE_VERSION` properties required (#9964) +- fix(node): Anr doesn't block exit (#10064) +- fix(utils): use correct typeof URL validation (#10028) +- perf(astro): reduce unnecessary path resolutions (#10021) +- ref(astro): Use astro logger instead of console (#9995) +- ref(remix): Isolate Express instrumentation from server auto-instrumentation. (#9966) + +Work in this release contributed by @joshkel. Thank you for your contribution! + ## 7.91.0 ### Important Changes diff --git a/MIGRATION.md b/MIGRATION.md index cae009a542ca..99e9e3023732 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -8,6 +8,35 @@ npx @sentry/migr8@latest This will let you select which updates to run, and automatically update your code. Make sure to still review all code changes! +## Deprecate `Sentry.lastEventId()` and `hub.lastEventId()` + +`Sentry.lastEventId()` sometimes causes race conditons, so we are deprecating it in favour of the `beforeSend` callback. + +```js +// Before + +Sentry.init({ + beforeSend(event, hint) { + const lastCapturedEventId = Sentry.lastEventId(); + + // Do something with `lastCapturedEventId` here + + return event; + }, +}); + +// After +Sentry.init({ + beforeSend(event, hint) { + const lastCapturedEventId = event.event_id; + + // Do something with `lastCapturedEventId` here + + return event; + }, +}); +``` + ## Deprecated fields on `Span` and `Transaction` In v8, the Span class is heavily reworked. The following properties & methods are thus deprecated: @@ -57,7 +86,7 @@ Sentry.init({ const lastCapturedEventId = event.event_id; // Do something with `lastCapturedEventId` here - + return event; }, });