0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-12 07:07:43 -04:00
deno/tests/specs/cli/otel_basic/start_active_span.ts

13 lines
314 B
TypeScript
Raw Normal View History

// Copyright 2018-2025 the Deno authors. MIT license.
import { trace } from "npm:@opentelemetry/api@1.9.0";
const tracer = trace.getTracer("example-tracer");
tracer.startActiveSpan("top level span", (span) => {
span.end();
});
tracer.startActiveSpan("root span", { root: true }, (span) => {
span.end();
});