Hyperlinkv0.8.0-beta.28

Tracer

Tracer.ExternalSpaninterfaceeffect/Tracer.ts:196
ExternalSpan

Represents a span created outside Effect's tracer, carrying trace and span identifiers, sampling state, and annotations so it can be used as a parent or link in Effect tracing.

Example (Creating an external span value)

import { Context } from "effect"
import type { Tracer } from "effect"

// Create an external span from another tracing system
const externalSpan: Tracer.ExternalSpan = {
  _tag: "ExternalSpan",
  spanId: "span-abc-123",
  traceId: "trace-xyz-789",
  sampled: true,
  annotations: Context.empty()
}

console.log(`External span: ${externalSpan.spanId}`)
models
Source effect/Tracer.ts:1967 lines
export interface ExternalSpan {
  readonly _tag: "ExternalSpan"
  readonly spanId: string
  readonly traceId: string
  readonly sampled: boolean
  readonly annotations: Context.Context<never>
}
Referenced by 4 symbols