Copyright | (c) Ian Duncan 2021 |
---|---|
License | BSD-3 |
Maintainer | Ian Duncan |
Stability | experimental |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data Baggage
- empty :: Baggage
- fromHashMap :: HashMap Token Element -> Baggage
- values :: Baggage -> HashMap Token Element
- data Token
- token :: QuasiQuoter
- mkToken :: Text -> Maybe Token
- tokenValue :: Token -> ByteString
- data Element = Element {
- value :: Text
- properties :: [Property]
- element :: Text -> Element
- property :: Token -> Maybe Text -> Property
- data InvalidBaggage
- insert :: Token -> Element -> Baggage -> Baggage
- delete :: Token -> Baggage -> Baggage
- encodeBaggageHeader :: Baggage -> ByteString
- encodeBaggageHeaderB :: Baggage -> Builder
- decodeBaggageHeader :: ByteString -> Either String Baggage
- decodeBaggageHeaderP :: Parser Baggage
Constructing Baggage
structures
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.
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
A key for a baggage entry, restricted to the set of valid characters
specified in the token
definition of RFC 2616:
token :: QuasiQuoter Source #
tokenValue :: Token -> ByteString Source #
Convert a Token
into a ByteString
An entry into the baggage
Element | |
|