hs-opentelemetry-api-0.0.3.5: OpenTelemetry API for use by libraries for direct instrumentation or wrapper packages.
Copyright(c) Ian Duncan 2021
LicenseBSD-3
MaintainerIan Duncan
Stabilityexperimental
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenTelemetry.Trace.TraceState

Description

The main purpose of the tracestate HTTP header is to provide additional vendor-specific trace identification information across different distributed tracing systems and is a companion header for the traceparent field. It also conveys information about the request’s position in multiple distributed tracing graphs.

The tracestate field may contain any opaque value in any of the keys. Tracestate MAY be sent or received as multiple header fields. Multiple tracestate header fields MUST be handled as specified by RFC7230 Section 3.2.2 Field Order. The tracestate header SHOULD be sent as a single field when possible, but MAY be split into multiple header fields. When sending tracestate as multiple header fields, it MUST be split according to RFC7230. When receiving multiple tracestate header fields, they MUST be combined into a single header according to RFC7230.

See the W3C specification https://www.w3.org/TR/trace-context/#tracestate-header for more details.

Synopsis

Documentation

data TraceState Source #

Data structure compliant with the storage and serialization needs of the W3C tracestate header.

newtype Key Source #

Constructors

Key Text 

Instances

Instances details
Eq Key Source # 
Instance details

Defined in OpenTelemetry.Trace.TraceState

Methods

(==) :: Key -> Key -> Bool #

(/=) :: Key -> Key -> Bool #

Ord Key Source # 
Instance details

Defined in OpenTelemetry.Trace.TraceState

Methods

compare :: Key -> Key -> Ordering #

(<) :: Key -> Key -> Bool #

(<=) :: Key -> Key -> Bool #

(>) :: Key -> Key -> Bool #

(>=) :: Key -> Key -> Bool #

max :: Key -> Key -> Key #

min :: Key -> Key -> Key #

Show Key Source # 
Instance details

Defined in OpenTelemetry.Trace.TraceState

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

newtype Value Source #

Constructors

Value Text 

Instances

Instances details
Eq Value Source # 
Instance details

Defined in OpenTelemetry.Trace.TraceState

Methods

(==) :: Value -> Value -> Bool #

(/=) :: Value -> Value -> Bool #

Ord Value Source # 
Instance details

Defined in OpenTelemetry.Trace.TraceState

Methods

compare :: Value -> Value -> Ordering #

(<) :: Value -> Value -> Bool #

(<=) :: Value -> Value -> Bool #

(>) :: Value -> Value -> Bool #

(>=) :: Value -> Value -> Bool #

max :: Value -> Value -> Value #

min :: Value -> Value -> Value #

Show Value Source # 
Instance details

Defined in OpenTelemetry.Trace.TraceState

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

empty :: TraceState Source #

An empty TraceState key-value pair dictionary

insert :: Key -> Value -> TraceState -> TraceState Source #

Add a key-value pair to a TraceState

O(n)

update :: Key -> (Value -> Value) -> TraceState -> TraceState Source #

Update a value in the TraceState. Does nothing if the value associated with the given key doesn't exist.

O(n)

delete :: Key -> TraceState -> TraceState Source #

Remove a key-value pair for the given key.

O(n)

toList :: TraceState -> [(Key, Value)] Source #

Convert the TraceState to a list.

O(1)