Hyperlinkv0.8.0-beta.28

Effect

Effect.makeSpanconsteffect/Effect.ts:8251
(name: string, options?: SpanOptionsNoTrace): Effect<Span>

Creates a new tracing span and returns it without managing its lifetime.

Details

The span is not added to the current span stack and is not ended automatically. Use withSpan, useSpan, or makeSpanScoped when the span should be installed as context or closed automatically.

Example (Creating a span manually)

import { Effect } from "effect"

const program = Effect.gen(function*() {
  const span = yield* Effect.makeSpan("my-operation")
  yield* Effect.log("Operation in progress")
  return "completed"
})
tracing
Source effect/Effect.ts:82511 lines
export const makeSpan: (name: string, options?: SpanOptionsNoTrace) => Effect<Span> = internal.makeSpan