| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Runtime.Telemetry.Tracing
Description
The request-lifecycle tracing layer over the OpenTelemetry substrate (Ecluse.Runtime.Telemetry):
the WAI server span, the data plane's http-client child spans, and the hand-added domain spans. Every
entry point takes the Telemetry handle and is inert when telemetry is off, so the middleware is id,
an exchange opens untraced, and a domain-span bracket runs its body against no span. The data-plane
client span records no request or response header and the WAI instrumentation never records
Authorization, so a forwarded client token never reaches a span, while the high-cardinality
package, version, and denial message deliberately do.
Synopsis
- telemetryWaiMiddleware :: Telemetry -> IO Middleware
- dataPlaneTrace :: Telemetry -> IO TraceExchange
- data JobSpanOutcome = JobSpanOutcome {}
- tracingPortOf :: Telemetry -> TracingPort
- workerTracingPortOf :: Telemetry -> WorkerTracingPort
- advisorySyncTracingPortOf :: Telemetry -> AdvisorySyncTracingPort
WAI server span
telemetryWaiMiddleware :: Telemetry -> IO Middleware Source #
The WAI server-span middleware, or id without telemetry. It belongs outermost, so the span covers the request.
The data plane's client spans
dataPlaneTrace :: Telemetry -> IO TraceExchange Source #
Open each upstream exchange under one client span that carries W3C trace-context headers, when telemetry is enabled. The span comes from the global tracer provider, which the library reads.
Domain spans
data JobSpanOutcome #
Constructors
| JobSpanOutcome | |
Fields
| |
Instances
| Show JobSpanOutcome | |
Defined in Ecluse.Core.Telemetry.Span Methods showsPrec :: Int -> JobSpanOutcome -> ShowS # show :: JobSpanOutcome -> String # showList :: [JobSpanOutcome] -> ShowS # | |
| Eq JobSpanOutcome | |
Defined in Ecluse.Core.Telemetry.Span Methods (==) :: JobSpanOutcome -> JobSpanOutcome -> Bool # (/=) :: JobSpanOutcome -> JobSpanOutcome -> Bool # | |
The core tracing ports
tracingPortOf :: Telemetry -> TracingPort Source #
Project this module's serve-path spans onto the core TracingPort the pipeline brackets with.
workerTracingPortOf :: Telemetry -> WorkerTracingPort Source #
Project withMirrorJobSpan onto the core WorkerTracingPort that Ecluse.Core.Worker uses.
advisorySyncTracingPortOf :: Telemetry -> AdvisorySyncTracingPort Source #
Project withAdvisorySyncSpan onto the AdvisorySyncTracingPort Ecluse.Runtime.Cve.Sync brackets through. Inert when telemetry is disabled.