Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides convenience functionality to debug traces locally. For production use, prefer alternatives, e.g. Monitor.Tracing.Zipkin.
Synopsis
- collectSpanSamples :: MonadUnliftIO m => TraceT m a -> m (a, [Sample])
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.