| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Runtime.Telemetry.Correlation.Internal
Contents
Description
The span read and the dd stamping behind Ecluse.Runtime.Telemetry.Correlation, which
documents the correlation and re-exports the curated surface. Importing this module opts out of
that stability promise, the convention text and bytestring use, so production code imports
the public one.
Synopsis
- ddIdentity :: ResolvedTelemetry -> DdContext
- ddIdentityFromEnvironment :: IO DdContext
- activeDdSpan :: MonadIO m => m (Maybe DdSpan)
- ddContextNow :: MonadIO m => DdContext -> m DdContext
- ddPayloadNow :: MonadIO m => DdContext -> m SimpleLogPayload
Identity
ddIdentity :: ResolvedTelemetry -> DdContext Source #
The span-less dd identity that stamps every log line. ddPayloadNow fills the span at
log time. The one resolved configuration feeds the SDK too, so logs and traces share an identity.
ddIdentityFromEnvironment :: IO DdContext Source #
Resolve the dd identity from the environment on Ecluse.Runtime.Telemetry.Resolve's
precedence, so the log identity matches the exporter's. Call once at composition, never per line.
Active-span correlation
activeDdSpan :: MonadIO m => m (Maybe DdSpan) Source #
The active span's ids in Datadog format, Nothing when no span is in scope or its context
is not valid, so a log line never carries an all-zero trace id.
ddContextNow :: MonadIO m => DdContext -> m DdContext Source #
Fill the active span's ids onto a dd identity, yielding the DdContext for the current
log site.
ddPayloadNow :: MonadIO m => DdContext -> m SimpleLogPayload Source #
The dd object for the current log site as a katip payload. Install it as a request or
worker scope's initial context so every line under that scope carries dd.