| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Network.Wai.Middleware.OpenTracing
Synopsis
- type TracedApplication = ActiveSpan -> Application
- type OperationName = Request -> Text
- opentracing :: HasCarrier Headers p => Tracer -> Propagation p -> TracedApplication -> Application
- withOperationName :: HasCarrier Headers p => Tracer -> Propagation p -> OperationName -> TracedApplication -> Application
- defaultOperationName :: OperationName
Documentation
type TracedApplication = ActiveSpan -> Application Source #
A TracedApplication is a WAI Application with an ActiveSpan.
Expanded:
type TracedApplication =
ActiveSpan -> Request -> (Response -> IO ResponseReceived) -> IO ResponseReceived
type OperationName = Request -> Text Source #
The operation name is, basically, the name of the span.
This is typically determined from the request in some way, see
defaultOperationName.
Since: 0.2.0
opentracing :: HasCarrier Headers p => Tracer -> Propagation p -> TracedApplication -> Application Source #
Middleware to enable tracing for a WAI application.
This uses the defaultOperationName.
withOperationName :: HasCarrier Headers p => Tracer -> Propagation p -> OperationName -> TracedApplication -> Application Source #
Customise the tracing middleware with an OperationName.
It is intended to import this module qualified for legibility
(OpenTracing.withOperationName).
Since: 0.2.0
defaultOperationName :: OperationName Source #
The default OperationName is the pathInfo of the request.
Since: 0.2.0