Hyperlinkv0.8.0-beta.28

Effect

Effect.spanLinksconsteffect/Effect.ts:8159
Effect<ReadonlyArray<SpanLink>, never, never>

Returns the tracing span links currently carried in the effect context.

Details

These links are attached to spans created inside the context. Span links connect related spans without making one span the parent of another.

Example (Providing span links)

import { Effect } from "effect"

const program = Effect.gen(function*() {
  // Get the current span links
  const links = yield* Effect.spanLinks
  console.log(`Current span has ${links.length} links`)
  return links
})
tracing
Source effect/Effect.ts:81591 lines
export const spanLinks: Effect<ReadonlyArray<SpanLink>> = internal.spanLinks