Skip to main content
Module

x/live/deps.ts>Tracer

Open-Source web editor based on Preact, Tailwind and TypeScript. The other side of code.
Very Popular
Go to Latest
interface Tracer
import { type Tracer } from "https://deno.land/x/live@1.48.5/deps.ts";

Tracer provides an interface for creating Spans.

Methods

startSpan(
name: string,
options?: SpanOptions,
context?: Context,
): Span

Starts a new Span. Start the span without setting it on context.

This method do NOT modify the current Context.

startActiveSpan<F extends (span: Span) => unknown>(name: string, fn: F): ReturnType<F>

Starts a new Span and calls the given function passing it the created span as first argument. Additionally the new span gets set in context and this context is activated for the duration of the function call.

startActiveSpan<F extends (span: Span) => unknown>(
name: string,
options: SpanOptions,
fn: F,
): ReturnType<F>
startActiveSpan<F extends (span: Span) => unknown>(
name: string,
options: SpanOptions,
context: Context,
fn: F,
): ReturnType<F>