tracing-0.0.3.0: Distributed tracing

Safe HaskellNone
LanguageHaskell2010

Monitor.Tracing.Local

Description

This module provides convenience functionality to debug traces locally. For production use, prefer alternatives, e.g. Monitor.Tracing.Zipkin.

Synopsis

Documentation

collectSpanSamples :: MonadUnliftIO m => TraceT m a -> m (a, [Sample]) Source #

Runs a TraceT action, returning any collected samples alongside its output. The samples are sorted chronologically by completion time (e.g. the head is the first span to complete).

Spans which start before the action returns are guaranteed to be collected, even if they complete after (in this case collection will block until their completion). More precisely, collectSamples will return the first time there are no pending spans after the action is done.