Hyperlinkv0.8.0-beta.28

Tracer

Tracer.SpanLinkinterfaceeffect/Tracer.ts:395
SpanLink

A relationship from one span to another span, with attributes describing the relationship.

Example (Linking spans)

import { Effect, Tracer } from "effect"

// Create a span link to connect spans
const externalSpan = Tracer.externalSpan({
  spanId: "external-span-123",
  traceId: "trace-456"
})

const link: Tracer.SpanLink = {
  span: externalSpan,
  attributes: { "link.type": "follows-from", "service": "external-api" }
}

const program = Effect.succeed("result").pipe(
  Effect.withSpan("linked-operation", { links: [link] })
)
models
Source effect/Tracer.ts:3954 lines
export interface SpanLink {
  readonly span: AnySpan
  readonly attributes: Readonly<Record<string, unknown>>
}
Referenced by 7 symbols