Skip to main content
Module

x/sentry/index.d.ts>withScope

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

Creates a new scope with and executes the given operation within. The scope is automatically removed once the operation finishes or throws.

This is essentially a convenience function for:

pushScope();
callback();
popScope();

Parameters

callback: (scope: Scope) => T

that will be enclosed into push/popScope.