@otel-test-runner/bun-test
Version:
Bun Test Runner with Open telemetry support for auto-instrumentation with dagger
11 lines (10 loc) • 513 B
TypeScript
export declare const tracer: import("@otel-test-runner/instrumentation/dist/tracer/tracer").Tracer;
/**
* Utility function to automatically inject `TRACEPARENT` if the span
* is the root span. This is useful in the context of Dagger so traces
* produced by the tests are displayed by the TUI and Dagger Cloud.
*
* If we are already in a span, then the newly created span must be children
* if the parent.
*/
export declare function runTestInsideSpan<T>(name: string, fn: () => T | Promise<T>): Promise<T>;