| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
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, 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
- data ExportFailureSink
- exportFailureSink :: LogEnv -> IO ExportFailureSink
- observeExportResult :: ExportFailureSink -> Text -> ExportResult -> IO ()
- installExportErrorHandler :: ExportFailureSink -> IO ()
Documentation
data ExportFailureSink Source #
One throttle and one katip target shared by every export-failure feed. The clock and the
surfacing action are injected, so a test asserts the throttle decision without wall-clock timing.
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 #
Observe one exporter's ExportResult, routing a Failure through the sink. signal names the
exporter (span / metric). hs-opentelemetry 1.0.0.0 drops a failed OTLP export, so only this feed reports one.
installExportErrorHandler :: ExportFailureSink -> IO () Source #
Install a process-global handler for the SDK's own diagnostic stream, forwarded verbatim. Ecluse
reads none of OTEL_EXPORTER_OTLP_HEADERS, DD_API_KEY, DD_SITE, so the SDK's own text is the only leak channel.