Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module contains a collection of utility functions we use with tracing throughout the codebase, but that are not a core part of the library. If we were to move tracing to a separate library, those functions should be kept here in the core engine code.
Synopsis
- traceHTTPRequest :: (MonadIO m, MonadTrace m) => Request -> (Request -> m a) -> m a
- attachSourceConfigAttributes :: forall b m. (HasSourceConfiguration b, MonadTrace m) => SourceConfig b -> m ()
Documentation
:: (MonadIO m, MonadTrace m) | |
=> Request | http request that needs to be made |
-> (Request -> m a) | a function that takes the traced request and executes it |
-> m a |
Wrap the execution of an HTTP request in a span in the current
trace. Despite its name, this function does not start a new trace, and the
span will therefore not be recorded if the surrounding context isn't traced
(see spanWith
).
Additionally, this function adds metadata regarding the request to the created span, and injects the trace context into the HTTP header.
attachSourceConfigAttributes :: forall b m. (HasSourceConfiguration b, MonadTrace m) => SourceConfig b -> m () Source #