Skip to main content
Module

x/sentry/index.d.ts>withIsolationScope

The Official Sentry Deno SDK
Go to Latest
function withIsolationScope
import { withIsolationScope } from "https://deno.land/x/sentry@7.109.0/index.d.ts";

Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the case, for example, in the browser).

Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour.

This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in "normal" applications directly because it comes with pitfalls. Use at your own risk!

Parameters

callback: (isolationScope: Scope) => T

The callback in which the passed isolation scope is active. (Note: In environments without async context strategy, the currently active isolation scope may change within execution of the callback.)

Returns

The same value that callback returns.