Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides a trace reporter that groups recorded spans into batches before sending them to their destination in bulk.
Synopsis
- data BatchOptions
- batchOptions :: ([FinishedSpan] -> IO ()) -> BatchOptions
- boptBatchSize :: Lens' BatchOptions Word16
- boptTimeoutSec :: Lens' BatchOptions Word
- boptReporter :: Lens' BatchOptions ([FinishedSpan] -> IO ())
- boptErrorLog :: Lens' BatchOptions (Builder -> IO ())
- defaultErrorLog :: Builder -> IO ()
- data BatchEnv
- newBatchEnv :: BatchOptions -> IO BatchEnv
- closeBatchEnv :: BatchEnv -> IO ()
- batchReporter :: MonadIO m => BatchEnv -> FinishedSpan -> m ()
Documentation
data BatchOptions Source #
Options available to construct a batch reporter. Default options are
available with batchOptions
batchOptions :: ([FinishedSpan] -> IO ()) -> BatchOptions Source #
Default batch options which can be overridden via lenses.
boptReporter :: Lens' BatchOptions ([FinishedSpan] -> IO ()) Source #
boptErrorLog :: Lens' BatchOptions (Builder -> IO ()) Source #
defaultErrorLog :: Builder -> IO () Source #
An error logging function which prints to stderr.
newBatchEnv :: BatchOptions -> IO BatchEnv Source #
Create a new batch environment
closeBatchEnv :: BatchEnv -> IO () Source #
Close a batch reporter, stop consuming any new spans. Any spans in the queue will be drained.
batchReporter :: MonadIO m => BatchEnv -> FinishedSpan -> m () Source #
An implementation of tracerReport
that batches the finished
spans for transimission to their destination.