hs-opentelemetry-api-0.2.0.0: 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.Baggage

Description

Baggage is used to annotate telemetry, adding context and information to metrics, traces, and logs. It is a set of name/value pairs describing user-defined properties.

Note: if you are trying to add data annotations specific to a single trace span, you should use addAttribute and addAttributes

Synopsis

Constructing Baggage structures

data Baggage Source #

Baggage is used to annotate telemetry, adding context and information to metrics, traces, and logs. It is a set of name/value pairs describing user-defined properties. Each name in Baggage is associated with exactly one value.

Instances

Instances details
Semigroup Baggage Source # 
Instance details

Defined in OpenTelemetry.Baggage

Show Baggage Source # 
Instance details

Defined in OpenTelemetry.Baggage

Eq Baggage Source # 
Instance details

Defined in OpenTelemetry.Baggage

Methods

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

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

empty :: Baggage Source #

An empty initial baggage value

values :: Baggage -> HashMap Token Element Source #

Returns the namevalue pairs in the Baggage. The order of namevalue pairs is not significant.

Since: 0.0.1.0

data Token Source #

A key for a baggage entry, restricted to the set of valid characters specified in the token definition of RFC 2616:

https://www.rfc-editor.org/rfc/rfc2616#section-2.2

Instances

Instances details
Show Token Source # 
Instance details

Defined in OpenTelemetry.Baggage

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

Eq Token Source # 
Instance details

Defined in OpenTelemetry.Baggage

Methods

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

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

Ord Token Source # 
Instance details

Defined in OpenTelemetry.Baggage

Methods

compare :: Token -> Token -> Ordering #

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

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

(>) :: Token -> Token -> Bool #

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

max :: Token -> Token -> Token #

min :: Token -> Token -> Token #

Hashable Token Source # 
Instance details

Defined in OpenTelemetry.Baggage

Methods

hashWithSalt :: Int -> Token -> Int #

hash :: Token -> Int #

Lift Token Source # 
Instance details

Defined in OpenTelemetry.Baggage

Methods

lift :: Quote m => Token -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Token -> Code m Token #

data Element Source #

An entry into the baggage

Constructors

Element 

Fields

Instances

Instances details
Show Element Source # 
Instance details

Defined in OpenTelemetry.Baggage

Eq Element Source # 
Instance details

Defined in OpenTelemetry.Baggage

Methods

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

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

property :: Token -> Maybe Text -> Property Source #

Modifying Baggage

insert Source #

Arguments

:: Token

The name for which to set the value

-> Element

The value to set. Use element to construct a well-formed element value.

-> Baggage 
-> Baggage 

delete :: Token -> Baggage -> Baggage Source #

Delete a key/value pair from the baggage.

Encoding and decoding Baggage