method TracerHost.activate
TracerHost.activate<T>(
span: unknown,
fn: () => Promise<T>
): Promise<T>

Runs work with the supplied span as the active OTel span, when supported.

Type Parameters

Parameters

span: unknown
fn: () => Promise<T>

Return Type

Promise<T>

Usage

import { type TracerHost } from "telemetry-plugin/src/index.ts";