Skip to main content
Module

x/sentry/index.mjs>withIsolationScope

The Official Sentry Deno SDK
Go to Latest
function withIsolationScope
import { withIsolationScope } from "https://deno.land/x/sentry@8.0.0-beta.4/index.mjs";

Set the provided isolation scope as active in the given callback. 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!

If you pass in undefined as a scope, it will fork a new isolation scope, the same as if no scope is passed.

Parameters

isolationScope: Scope$1 | undefined
callback: (isolationScope: Scope$1) => T