Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/sentry_deno/packages/browser/src/index.ts>withScope

Unofficial port of the Sentry SDK for JavaScript to Deno.
Latest
function withScope
import { withScope } from "https://deno.land/x/sentry_deno@v0.2.2/packages/browser/src/index.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) => void

that will be enclosed into push/popScope.

Returns

ReturnType<Hub["withScope"]>