Skip to content

Commit 13fa644

Browse files
committed
ref: Rename usages of node to node-experimental in downstream packages
1 parent a110f95 commit 13fa644

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+109
-101
lines changed

packages/astro/src/index.server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Node SDK exports
2-
// Unfortunately, we cannot `export * from '@sentry/node'` because in prod builds,
2+
// Unfortunately, we cannot `export * from '@sentry/node-experimental'` because in prod builds,
33
// Vite puts these exports into a `default` property (Sentry.default) rather than
44
// on the top - level namespace.
55

@@ -72,10 +72,10 @@ export {
7272
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
7373
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
7474
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
75-
} from '@sentry/node';
75+
} from '@sentry/node-experimental';
7676

7777
// We can still leave this for the carrier init and type exports
78-
export * from '@sentry/node';
78+
export * from '@sentry/node-experimental';
7979

8080
export { init } from './server/sdk';
8181

packages/astro/src/integration/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => {
9191
// @sentry/node is required in case we have 2 different @sentry/node
9292
// packages installed in the same project.
9393
// Ref: https://github.com/getsentry/sentry-javascript/issues/10121
94-
noExternal: ['@sentry/astro', '@sentry/node'],
94+
noExternal: ['@sentry/astro', '@sentry/node-experimental'],
9595
},
9696
},
9797
});

packages/astro/src/server/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
getCurrentScope,
88
startSpan,
99
withIsolationScope,
10-
} from '@sentry/node';
10+
} from '@sentry/node-experimental';
1111
import type { Client, Scope, Span } from '@sentry/types';
1212
import { addNonEnumerableProperty, objectify, stripUrlQueryAndFragment } from '@sentry/utils';
1313
import type { APIContext, MiddlewareResponseHandler } from 'astro';

packages/astro/src/server/sdk.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { applySdkMetadata } from '@sentry/core';
2-
import type { NodeOptions } from '@sentry/node';
3-
import { init as initNodeSdk, setTag } from '@sentry/node';
2+
import type { NodeOptions } from '@sentry/node-experimental';
3+
import { init as initNodeSdk, setTag } from '@sentry/node-experimental';
44

55
/**
66
*

packages/astro/test/server/middleware.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core';
2-
import * as SentryNode from '@sentry/node';
2+
import * as SentryNode from '@sentry/node-experimental';
33
import type { Client, Span } from '@sentry/types';
44
import { vi } from 'vitest';
55

packages/astro/test/server/sdk.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as SentryNode from '@sentry/node';
2-
import { SDK_VERSION } from '@sentry/node';
1+
import * as SentryNode from '@sentry/node-experimental';
2+
import { SDK_VERSION } from '@sentry/node-experimental';
33
import { vi } from 'vitest';
44

55
import { init } from '../../src/server/sdk';

packages/bun/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export type {
1818
} from '@sentry/types';
1919
export type { AddRequestDataToEventOptions } from '@sentry/utils';
2020

21-
export type { TransactionNamingScheme } from '@sentry/node';
21+
export type { TransactionNamingScheme } from '@sentry/node-experimental';
2222
export type { BunOptions } from './types';
2323

2424
export {
@@ -109,7 +109,7 @@ export {
109109
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
110110
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
111111
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
112-
} from '@sentry/node';
112+
} from '@sentry/node-experimental';
113113

114114
export { BunClient } from './client';
115115
export {
@@ -118,7 +118,7 @@ export {
118118
} from './sdk';
119119

120120
import { Integrations as CoreIntegrations } from '@sentry/core';
121-
import { Integrations as NodeIntegrations } from '@sentry/node';
121+
import { Integrations as NodeIntegrations } from '@sentry/node-experimental';
122122
import { BunServer } from './integrations/bunserver';
123123
export { bunServerIntegration } from './integrations/bunserver';
124124

packages/bun/src/sdk.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
modulesIntegration,
1414
nativeNodeFetchintegration,
1515
nodeContextIntegration,
16-
} from '@sentry/node';
16+
} from '@sentry/node-experimental';
1717
import type { Integration, Options } from '@sentry/types';
1818

1919
import { BunClient } from './client';
@@ -67,7 +67,7 @@ export function getDefaultIntegrations(_options: Options): Integration[] {
6767
* @example
6868
* ```
6969
*
70-
* const { addBreadcrumb } = require('@sentry/node');
70+
* const { addBreadcrumb } = require('@sentry/node-experimental');
7171
* addBreadcrumb({
7272
* message: 'My Breadcrumb',
7373
* // ...
@@ -77,7 +77,7 @@ export function getDefaultIntegrations(_options: Options): Integration[] {
7777
* @example
7878
* ```
7979
*
80-
* const Sentry = require('@sentry/node');
80+
* const Sentry = require('@sentry/node-experimental');
8181
* Sentry.captureMessage('Hello, world!');
8282
* Sentry.captureException(new Error('Good bye'));
8383
* Sentry.captureEvent({

packages/nextjs/src/config/webpack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as fs from 'fs';
22
import * as path from 'path';
33
/* eslint-disable complexity */
44
/* eslint-disable max-lines */
5-
import { getSentryRelease } from '@sentry/node';
5+
import { getSentryRelease } from '@sentry/node-experimental';
66
import { arrayify, dropUndefinedKeys, escapeStringForRegex, loadModule, logger } from '@sentry/utils';
77
import type SentryCliPlugin from '@sentry/webpack-plugin';
88
import * as chalk from 'chalk';

packages/nextjs/src/server/httpIntegration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Integrations } from '@sentry/node';
1+
import { Integrations } from '@sentry/node-experimental';
22

33
/**
44
* A custom HTTP integration where we always enable tracing.

packages/nextjs/src/server/index.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { addEventProcessor, addTracingExtensions, applySdkMetadata, getClient, setTag } from '@sentry/core';
2-
import type { NodeOptions } from '@sentry/node';
3-
import { Integrations as OriginalIntegrations, getDefaultIntegrations, init as nodeInit } from '@sentry/node';
2+
import type { NodeOptions } from '@sentry/node-experimental';
3+
import {
4+
Integrations as OriginalIntegrations,
5+
getDefaultIntegrations,
6+
init as nodeInit,
7+
} from '@sentry/node-experimental';
48
import type { EventProcessor } from '@sentry/types';
59
import { logger } from '@sentry/utils';
610

@@ -13,7 +17,7 @@ import { Http } from './httpIntegration';
1317
import { OnUncaughtException } from './onUncaughtExceptionIntegration';
1418

1519
export { createReduxEnhancer } from '@sentry/react';
16-
export * from '@sentry/node';
20+
export * from '@sentry/node-experimental';
1721
export { captureUnderscoreErrorException } from '../common/_error';
1822

1923
export const Integrations = {

packages/nextjs/src/server/onUncaughtExceptionIntegration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Integrations } from '@sentry/node';
1+
import { Integrations } from '@sentry/node-experimental';
22

33
/**
44
* A custom OnUncaughtException integration that does not exit by default.

packages/nextjs/test/serverSdk.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as SentryNode from '@sentry/node';
2-
import { getClient, getCurrentScope } from '@sentry/node';
1+
import * as SentryNode from '@sentry/node-experimental';
2+
import { getClient, getCurrentScope } from '@sentry/node-experimental';
33
import type { Integration } from '@sentry/types';
44
import { GLOBAL_OBJ, logger } from '@sentry/utils';
55

packages/opentelemetry-node/test/spanprocessor.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type { SpanStatusType } from '@sentry/core';
88
import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core';
99
import { captureException, getCurrentScope, setCurrentClient } from '@sentry/core';
1010
import { SentrySpan, Transaction, addTracingExtensions, createTransport, spanToJSON } from '@sentry/core';
11-
import { NodeClient } from '@sentry/node';
11+
import { NodeClient } from '@sentry/node-experimental';
1212
import { resolvedSyncPromise } from '@sentry/utils';
1313

1414
import { SentrySpanProcessor } from '../src/spanprocessor';

packages/profiling-node/src/hubextensions.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { getMainCarrier } from '@sentry/core';
2-
import type { NodeClient } from '@sentry/node';
1+
import { getMainCarrier, spanToJSON } from '@sentry/core';
2+
import type { NodeClient } from '@sentry/node-experimental';
33
import type { CustomSamplingContext, Hub, Transaction, TransactionContext } from '@sentry/types';
44
import { logger, uuid4 } from '@sentry/utils';
55

@@ -89,9 +89,7 @@ export function maybeProfileTransaction(
8989

9090
const profile_id = uuid4();
9191
CpuProfilerBindings.startProfiling(profile_id);
92-
DEBUG_BUILD &&
93-
// eslint-disable-next-line deprecation/deprecation
94-
logger.log(`[Profiling] started profiling transaction: ${transaction.name}`);
92+
DEBUG_BUILD && logger.log(`[Profiling] started profiling transaction: ${spanToJSON(transaction).description}`);
9593

9694
// set transaction context - do this regardless if profiling fails down the line
9795
// so that we can still see the profile_id in the transaction context
@@ -115,16 +113,13 @@ export function stopTransactionProfile(
115113

116114
const profile = CpuProfilerBindings.stopProfiling(profile_id);
117115

118-
DEBUG_BUILD &&
119-
// eslint-disable-next-line deprecation/deprecation
120-
logger.log(`[Profiling] stopped profiling of transaction: ${transaction.name}`);
116+
DEBUG_BUILD && logger.log(`[Profiling] stopped profiling of transaction: ${spanToJSON(transaction).description}`);
121117

122118
// In case of an overlapping transaction, stopProfiling may return null and silently ignore the overlapping profile.
123119
if (!profile) {
124120
DEBUG_BUILD &&
125121
logger.log(
126-
// eslint-disable-next-line deprecation/deprecation
127-
`[Profiling] profiler returned null profile for: ${transaction.name}`,
122+
`[Profiling] profiler returned null profile for: ${spanToJSON(transaction).description}`,
128123
'this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started',
129124
);
130125
return null;
@@ -179,8 +174,10 @@ export function __PRIVATE__wrapStartTransactionWithProfiling(startTransaction: S
179174
// Enqueue a timeout to prevent profiles from running over max duration.
180175
let maxDurationTimeoutID: NodeJS.Timeout | void = global.setTimeout(() => {
181176
DEBUG_BUILD &&
182-
// eslint-disable-next-line deprecation/deprecation
183-
logger.log('[Profiling] max profile duration elapsed, stopping profiling for:', transaction.name);
177+
logger.log(
178+
'[Profiling] max profile duration elapsed, stopping profiling for:',
179+
spanToJSON(transaction).description,
180+
);
184181

185182
profile = stopTransactionProfile(transaction, profile_id);
186183
}, maxProfileDurationMs);

packages/profiling-node/src/integration.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import type { NodeClient } from '@sentry/node';
1+
import { spanToJSON } from '@sentry/core';
2+
import type { NodeClient } from '@sentry/node-experimental';
23
import type { Event, EventProcessor, Hub, Integration, Transaction } from '@sentry/types';
34

45
import { logger } from '@sentry/utils';
@@ -79,8 +80,10 @@ export class ProfilingIntegration implements Integration {
7980
// Enqueue a timeout to prevent profiles from running over max duration.
8081
PROFILE_TIMEOUTS[profile_id] = global.setTimeout(() => {
8182
DEBUG_BUILD &&
82-
// eslint-disable-next-line deprecation/deprecation
83-
logger.log('[Profiling] max profile duration elapsed, stopping profiling for:', transaction.name);
83+
logger.log(
84+
'[Profiling] max profile duration elapsed, stopping profiling for:',
85+
spanToJSON(transaction).description,
86+
);
8487

8588
const profile = stopTransactionProfile(transaction, profile_id);
8689
if (profile) {

packages/profiling-node/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import type {
1717
import { env, versions } from 'process';
1818
import { isMainThread, threadId } from 'worker_threads';
1919

20-
import * as Sentry from '@sentry/node';
20+
import * as Sentry from '@sentry/node-experimental';
2121
import { GLOBAL_OBJ, createEnvelope, dropUndefinedKeys, dsnToString, forEachEnvelopeItem, logger } from '@sentry/utils';
2222

2323
import { DEBUG_BUILD } from './debug-build';

packages/profiling-node/test/hubextensions.hub.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Sentry from '@sentry/node';
1+
import * as Sentry from '@sentry/node-experimental';
22

33
import { getMainCarrier } from '@sentry/core';
44
import type { Transport } from '@sentry/types';

packages/profiling-node/test/hubextensions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type {
77
TransactionMetadata,
88
} from '@sentry/types';
99

10-
import type { NodeClient } from '@sentry/node';
10+
import type { NodeClient } from '@sentry/node-experimental';
1111

1212
import { CpuProfilerBindings } from '../src/cpu_profiler';
1313
import { __PRIVATE__wrapStartTransactionWithProfiling } from '../src/hubextensions';

packages/profiling-node/test/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Sentry from '@sentry/node';
1+
import * as Sentry from '@sentry/node-experimental';
22
import type { Transport } from '@sentry/types';
33

44
import { getMainCarrier } from '@sentry/core';

packages/remix/src/index.server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { applySdkMetadata } from '@sentry/core';
2-
import type { NodeOptions } from '@sentry/node';
3-
import { getClient, init as nodeInit, setTag } from '@sentry/node';
2+
import type { NodeOptions } from '@sentry/node-experimental';
3+
import { getClient, init as nodeInit, setTag } from '@sentry/node-experimental';
44
import { logger } from '@sentry/utils';
55

66
import { DEBUG_BUILD } from './utils/debug-build';
@@ -91,10 +91,10 @@ export {
9191
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
9292
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
9393
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
94-
} from '@sentry/node';
94+
} from '@sentry/node-experimental';
9595

9696
// Keeping the `*` exports for backwards compatibility and types
97-
export * from '@sentry/node';
97+
export * from '@sentry/node-experimental';
9898

9999
export { captureRemixServerException, wrapRemixHandleError } from './utils/instrumentServer';
100100
export { ErrorBoundary, withErrorBoundary } from '@sentry/react';

packages/remix/src/utils/instrumentServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
spanToTraceHeader,
1414
withIsolationScope,
1515
} from '@sentry/core';
16-
import { captureException, getCurrentHub } from '@sentry/node';
16+
import { captureException, getCurrentHub } from '@sentry/node-experimental';
1717
import type { Hub, Transaction, TransactionSource, WrappedFunction } from '@sentry/types';
1818
import {
1919
addExceptionMechanism,

packages/remix/src/utils/remixOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { NodeOptions } from '@sentry/node';
1+
import type { NodeOptions } from '@sentry/node-experimental';
22
import type { BrowserOptions } from '@sentry/react';
33
import type { Options } from '@sentry/types';
44

packages/remix/src/utils/serverAdapters/express.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getClient, getCurrentHub, hasTracingEnabled, setHttpStatus, withIsolationScope } from '@sentry/core';
2-
import { flush } from '@sentry/node';
2+
import { flush } from '@sentry/node-experimental';
33
import type { Transaction } from '@sentry/types';
44
import { extractRequestData, fill, isString, logger } from '@sentry/utils';
55
import { cwd } from 'process';

packages/remix/test/index.server.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as SentryNode from '@sentry/node';
1+
import * as SentryNode from '@sentry/node-experimental';
22

33
import { Integrations, init } from '../src/index.server';
44

packages/serverless/scripts/buildLambdaLayer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async function buildLambdaLayer(): Promise<void> {
1818
// Create the main SDK bundle
1919
// TODO: Check if we can get rid of this, after the lerna 6/nx update??
2020
await ensureBundleBuildPrereqs({
21-
dependencies: ['@sentry/utils', '@sentry/core', '@sentry/node'],
21+
dependencies: ['@sentry/utils', '@sentry/core', '@sentry/node-experimental'],
2222
});
2323
run('yarn rollup --config rollup.aws.config.mjs');
2424

packages/serverless/src/awslambda.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { existsSync } from 'fs';
22
import { hostname } from 'os';
33
import { basename, resolve } from 'path';
44
import { types } from 'util';
5-
import type { NodeOptions } from '@sentry/node';
6-
import { SDK_VERSION } from '@sentry/node';
5+
import type { NodeOptions } from '@sentry/node-experimental';
6+
import { SDK_VERSION } from '@sentry/node-experimental';
77
import {
88
captureException,
99
captureMessage,
@@ -14,7 +14,7 @@ import {
1414
init as initNode,
1515
startSpanManual,
1616
withScope,
17-
} from '@sentry/node';
17+
} from '@sentry/node-experimental';
1818
import type { Integration, Options, Scope, SdkMetadata, Span } from '@sentry/types';
1919
import { isString, logger } from '@sentry/utils';
2020
import type { Context, Handler } from 'aws-lambda';
@@ -26,7 +26,7 @@ import { awsServicesIntegration } from './awsservices';
2626
import { DEBUG_BUILD } from './debug-build';
2727
import { markEventUnhandled } from './utils';
2828

29-
export * from '@sentry/node';
29+
export * from '@sentry/node-experimental';
3030

3131
const { isPromise } = types;
3232

packages/serverless/src/awsservices.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, convertIntegrationFnToClass, defineIntegration } from '@sentry/core';
2-
import { getClient, startInactiveSpan } from '@sentry/node';
2+
import { getClient, startInactiveSpan } from '@sentry/node-experimental';
33
import type { Client, Integration, IntegrationClass, IntegrationFn, Span } from '@sentry/types';
44
import { fill } from '@sentry/utils';
55
// 'aws-sdk/global' import is expected to be type-only so it's erased in the final .js file.

packages/serverless/src/gcpfunction/cloud_events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, handleCallbackErrors } from '@sentry/core';
2-
import { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node';
2+
import { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node-experimental';
33
import { logger } from '@sentry/utils';
44

55
import { DEBUG_BUILD } from '../debug-build';

packages/serverless/src/gcpfunction/events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, handleCallbackErrors } from '@sentry/core';
2-
import { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node';
2+
import { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node-experimental';
33
import { logger } from '@sentry/utils';
44

55
import { DEBUG_BUILD } from '../debug-build';

packages/serverless/src/gcpfunction/http.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import {
55
handleCallbackErrors,
66
setHttpStatus,
77
} from '@sentry/core';
8-
import { continueTrace, startSpanManual } from '@sentry/node';
9-
import { getCurrentScope } from '@sentry/node';
10-
import { captureException, flush } from '@sentry/node';
8+
import { continueTrace, startSpanManual } from '@sentry/node-experimental';
9+
import { getCurrentScope } from '@sentry/node-experimental';
10+
import { captureException, flush } from '@sentry/node-experimental';
1111
import { isString, logger, stripUrlQueryAndFragment } from '@sentry/utils';
1212

1313
import { DEBUG_BUILD } from '../debug-build';

0 commit comments

Comments
 (0)