aws-xray-client-wai-0.1.0.1: A client for AWS X-Ray integration with WAI.
Safe HaskellNone
LanguageHaskell2010

Network.AWS.XRayClient.WAI

Description

Module for using a WAI Middleware as an X-Ray client

Synopsis

Documentation

data XRayClientConfig Source #

Configuration type for the XRay client middleware.

Constructors

XRayClientConfig 

Fields

xrayClientConfig :: Text -> XRayClientConfig Source #

Constructor for XRayClientConfig with required arguments.

xrayTraceMiddleware :: XRayClientConfig -> Middleware Source #

Traces the execution time of a request and sends the the local X-Ray daemon.

xrayWaiVaultKey :: Key XRayVaultData Source #

This is a Key for the vault inside each WAI Request. It is used to get to the XRayVaultData for the current request.

data XRayVaultData Source #

We use the WAI Vault to store data needed during traces.

Constructors

XRayVaultData 

Fields

traceXRaySubsegment :: MonadUnliftIO m => Request -> Text -> (XRaySegment -> XRaySegment) -> m a -> m a Source #

Time a MonadIO action and add it to the list of subsegments.

atomicallyAddVaultDataSubsegment :: XRayVaultData -> XRaySegment -> IO () Source #

Add subsegment to XRay vault data IORef.

makeSubsegmentIndependent :: XRayVaultData -> XRaySegment -> XRaySegment Source #

Uses the trace ID and segment ID of the root segment from the vault to make a subsegment independent. This is useful so nested components that create subsegments don't need all of this information threaded down to them. We can just decorate all of the subsegments with it before sending them off.