hs-opentelemetry-propagator-w3c-0.0.1.4: Trace propagation via HTTP headers following the w3c tracestate spec.
Copyright(c) Ian Duncan 2021
LicenseBSD-3
MaintainerIan Duncan
Stabilityexperimental
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenTelemetry.Propagator.W3CTraceContext

Description

Distributed tracing is a methodology implemented by tracing tools to follow, analyze and debug a transaction across multiple software components. Typically, a distributed trace traverses more than one component which requires it to be uniquely identifiable across all participating systems. Trace context propagation passes along this unique identification. Today, trace context propagation is implemented individually by each tracing vendor. In multi-vendor environments, this causes interoperability problems, like:

  • Traces that are collected by different tracing vendors cannot be correlated as there is no shared unique identifier.
  • Traces that cross boundaries between different tracing vendors can not be propagated as there is no uniformly agreed set of identification that is forwarded.
  • Vendor specific metadata might be dropped by intermediaries.
  • Cloud platform vendors, intermediaries and service providers, cannot guarantee to support trace context propagation as there is no standard to follow.
  • In the past, these problems did not have a significant impact as most applications were monitored by a single tracing vendor and stayed within the boundaries of a single platform provider. Today, an increasing number of applications are highly distributed and leverage multiple middleware services and cloud platforms.
  • This transformation of modern applications calls for a distributed tracing context propagation standard.

This module therefore provides support for tracing context propagation in accordance with the W3C tracing context propagation specifications: https://www.w3.org/TR/trace-context/

Synopsis

Documentation

data TraceParent Source #

Constructors

TraceParent 

Instances

Instances details
Show TraceParent Source # 
Instance details

Defined in OpenTelemetry.Propagator.W3CTraceContext

decodeSpanContext Source #

Arguments

:: Maybe ByteString

traceparent header value

-> Maybe ByteString

tracestate header value

-> Maybe SpanContext 

Attempt to decode a SpanContext from optional traceparent and tracestate header inputs.

Since: 0.0.1.0

encodeSpanContext :: Span -> IO (ByteString, ByteString) Source #

Encoded the given Span into a traceparent, tracestate tuple.

Since: 0.0.1.0

w3cTraceContextPropagator :: Propagator Context RequestHeaders ResponseHeaders Source #

Propagate trace context information via headers using the w3c specification format

Since: 0.0.1.0