opentracing-wai-0.3.0: Middleware adding OpenTracing tracing for WAI applications
Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.Wai.Middleware.OpenTracing

Synopsis

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