Skip to main content
Effect procedures are wrapped in Effect spans automatically. By default, the span name comes from the procedure path in the router.
automatic-spans.ts

Override the span name

Use .traced(...) when a stable custom span name is better than the router path.
custom-span.ts

User spans inside procedure spans

Effect-returning callbacks keep their own spans inside the automatic procedure span. This is useful when you use named Effect.fn(...) helpers or Effect.withSpan(...) inside handlers, providers, or middleware.
named-effect-fn.ts

Error stack traces

When an Effect procedure fails, effect-orpc captures stack information near the procedure definition site so spans point to useful application code.
example-stack.txt
This page covers the tracing capability. To wire spans to an OpenTelemetry exporter, see OpenTelemetry guide.

Next step

Add HTTP/OpenAPI metadata with OpenAPI metadata.
Last modified on June 15, 2026