Hyperlinkv0.8.0-beta.28

Tracer

Tracer.MinimumTraceLevelconsteffect/Tracer.ts:543
Context.Reference<LogLevel>

Context reference for setting the minimum trace level threshold. Spans and their descendants below this level will have their sampling decision forced to false, preventing them from being exported.

When to use

Use to set the trace-level threshold that controls whether spans are sampled by default.

Details

The default value is "All". Span creation compares the span level from options.level ?? CurrentTraceLevel against this threshold.

Gotchas

Explicit options.sampled bypasses threshold computation.

Source effect/Tracer.ts:5433 lines
export const MinimumTraceLevel = Context.Reference<
  LogLevel
>("effect/Tracer/MinimumTraceLevel", { defaultValue: () => "All" })
Referenced by 3 symbols