ecluse:ecluse-runtime
Safe HaskellNone
LanguageGHC2021

Ecluse.Runtime.Telemetry.ExportFailure

Description

Route OpenTelemetry export failures into katip through one shared throttle, so a persistently unreachable collector is one visible warning and a periodic heartbeat rather than a per-flush flood. The span exporter, the metric exporter, the metric batching's flush, and the SDK's own diagnostic stream all coalesce through the same sink. None of it reaches the request path: the SDK's batch exporter runs asynchronously, so a failed export never touches a served request. The exporter wrappers in Ecluse.Runtime.Telemetry feed the sink through observeExportResult.

Synopsis

Documentation

data ExportFailureSink Source #

One throttle and one katip target that every export-failure feed shares.

exportFailureSink :: LogEnv -> IO ExportFailureSink Source #

The production sink: the wall clock and the composition-root LogEnv as the katip target.

observeExportResult :: ExportFailureSink -> Text -> ExportResult -> IO () Source #

Route a failed export from the signal exporter through the sink. The exporter's request holds every collector header, so the error renders through displayFaultT.

observeFlushFault :: ExportFailureSink -> SomeException -> IO () Source #

Route a metric series the batching flush dropped because its replay into the SDK threw.

installExportErrorHandler :: ExportFailureSink -> IO () Source #

Install a process-global handler that forwards the SDK's own diagnostic text verbatim. Failed exports reach the sink separately, through observeExportResult.