Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/sentry/index.mjs>startSpanManual

The Official Sentry Deno SDK
Latest
function startSpanManual
import { startSpanManual } from "https://deno.land/x/sentry@7.120.0/index.mjs";

Similar to Sentry.startSpan. Wraps a function with a transaction/span, but does not finish the span after the function is done automatically. You'll have to call span.end() manually.

The created span is the active span and will be used as parent by other spans created inside the function and can be accessed via Sentry.getActiveSpan(), as long as the function is executed while the scope is active.

Note that if you have not enabled tracing extensions via addTracingExtensions or you didn't set tracesSampleRate, this function will not generate spans and the span returned from the callback will be undefined.

Parameters

context: StartSpanOptions
callback: (span: Span | undefined, finish: () => void) => T