Skip to content

Commit 32e4eff

Browse files
authored
feat(v8): Remove deprecated runWithAsyncContext API (#10780)
1 parent 288d9e9 commit 32e4eff

File tree

10 files changed

+1
-30
lines changed

10 files changed

+1
-30
lines changed

packages/bun/src/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ export {
4646
// eslint-disable-next-line deprecation/deprecation
4747
makeMain,
4848
setCurrentClient,
49-
// eslint-disable-next-line deprecation/deprecation
50-
runWithAsyncContext,
5149
Scope,
5250
// eslint-disable-next-line deprecation/deprecation
5351
startTransaction,

packages/core/src/currentScopes.ts

-13
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,6 @@ export function withIsolationScope<T>(callback: (isolationScope: Scope) => T): T
103103
return acs.withIsolationScope(callback);
104104
}
105105

106-
/**
107-
* Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.
108-
*
109-
* @param callback The callback to run in its own async context
110-
* @param options Options to pass to the async context strategy
111-
* @returns The result of the callback
112-
*
113-
* @deprecated Use `Sentry.withScope()` instead.
114-
*/
115-
export function runWithAsyncContext<T>(callback: () => T): T {
116-
return withScope(() => callback());
117-
}
118-
119106
/**
120107
* Get the currently active client.
121108
*/

packages/core/src/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ export {
4949
setGlobalScope,
5050
withScope,
5151
withIsolationScope,
52-
// eslint-disable-next-line deprecation/deprecation
53-
runWithAsyncContext,
5452
getClient,
5553
} from './currentScopes';
5654
export {

packages/deno/src/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ export {
4545
// eslint-disable-next-line deprecation/deprecation
4646
makeMain,
4747
setCurrentClient,
48-
// eslint-disable-next-line deprecation/deprecation
49-
runWithAsyncContext,
5048
Scope,
5149
// eslint-disable-next-line deprecation/deprecation
5250
startTransaction,

packages/node/src/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ export {
4545
// eslint-disable-next-line deprecation/deprecation
4646
makeMain,
4747
setCurrentClient,
48-
// eslint-disable-next-line deprecation/deprecation
49-
runWithAsyncContext,
5048
Scope,
5149
// eslint-disable-next-line deprecation/deprecation
5250
startTransaction,

packages/opentelemetry/src/asyncContextStrategy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function setOpenTelemetryContextAsyncContextStrategy(): void {
5555
// We set the `SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY` context value, which is picked up by
5656
// the OTEL context manager, which uses the presence of this key to determine if it should
5757
// fork the isolation scope, or not
58-
// as by default, we don't want to fork this, unless triggered explicitly by `runWithAsyncContext`
58+
// as by default, we don't want to fork this, unless triggered explicitly by `withScope`
5959
return api.context.with(ctx, () => {
6060
return callback(getCurrentScope());
6161
});

packages/remix/src/index.server.ts

-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ export {
8383
metrics,
8484
createGetModuleFromFilename,
8585
hapiErrorPlugin,
86-
// eslint-disable-next-line deprecation/deprecation
87-
runWithAsyncContext,
8886
SEMANTIC_ATTRIBUTE_SENTRY_OP,
8987
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
9088
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,

packages/serverless/src/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ export {
7777
functionToStringIntegration,
7878
createGetModuleFromFilename,
7979
metrics,
80-
// eslint-disable-next-line deprecation/deprecation
81-
runWithAsyncContext,
8280
consoleIntegration,
8381
onUncaughtExceptionIntegration,
8482
onUnhandledRejectionIntegration,

packages/sveltekit/src/server/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ export {
7777
createGetModuleFromFilename,
7878
hapiErrorPlugin,
7979
metrics,
80-
// eslint-disable-next-line deprecation/deprecation
81-
runWithAsyncContext,
8280
SEMANTIC_ATTRIBUTE_SENTRY_OP,
8381
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
8482
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,

packages/vercel-edge/src/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ export {
4545
// eslint-disable-next-line deprecation/deprecation
4646
makeMain,
4747
setCurrentClient,
48-
// eslint-disable-next-line deprecation/deprecation
49-
runWithAsyncContext,
5048
Scope,
5149
// eslint-disable-next-line deprecation/deprecation
5250
startTransaction,

0 commit comments

Comments
 (0)