effect-io-ai

Package: @effect/opentelemetry
Module: Tracer

Tracer.currentOtelSpan

Get the current OpenTelemetry span.

Works with both the official OpenTelemetry API (via Tracer.layer, NodeSdk.layer, etc.) and the lightweight OTLP module (OtlpTracer.layer).

When using OTLP, the returned span is a wrapper that conforms to the OpenTelemetry Span interface.

Signature

declare const currentOtelSpan: Effect<Otel.Span, NoSuchElementException, never>

Source

Since v1.0.0