hs-opentelemetry-api
Safe HaskellNone
LanguageHaskell2010

OpenTelemetry.Contrib.SpanTraversals

Synopsis

Documentation

alterSpansUpwards :: MonadIO m => Span -> st -> (st -> ImmutableSpan -> SpanHot -> (IterationInstruction st, SpanHot)) -> m st Source #

Alter traces upwards from the provided span to the highest available mutable span.

The callback receives the ImmutableSpan (for reading cold fields like parent) and the current SpanHot (for reading/modifying mutable fields). It returns an IterationInstruction and the (possibly modified) SpanHot.

Iteration continues upward until a non-mutable span is reached, there are no more parents, or the callback returns Halt.

data IterationInstruction a Source #

Constructors

Continue a 
Halt