ecluse:ecluse-runtime
Safe HaskellNone
LanguageGHC2021

Ecluse.Runtime.Telemetry.Escape

Description

What a span records when an exception escapes it. hs-opentelemetry records an escaping exception's displayException. For an HTTP client or amazonka exception, that text holds the request, header and query included, or a proxy variable's value. withEscapeHandler tells the library to ignore those, and recordEscape records a typed cause and the error status in their place.

Synopsis

Documentation

escapedRequestCause :: SomeException -> Maybe Text Source #

The typed cause of an exception whose own rendering can print a request or a proxy credential, or Nothing for any other.

withEscapeHandler :: TracerProviderOptions -> TracerProviderOptions Source #

Make the library ignore an exception escapedRequestCause knows, so only recordEscape records it.

recordEscape :: MonadIO m => Span -> SomeException -> m () Source #

Record an escaping exception the library ignores: its typed cause as the error status, and as an exception event.

escapeRecordingMiddleware :: Middleware Source #

Record an exception escaping the application on the active span, the WAI server span when this runs inside its middleware.