Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data LogAttributes = LogAttributes {
- attributes :: !(HashMap Text AnyValue)
- attributesCount :: !Int
- attributesDropped :: !Int
- emptyAttributes :: LogAttributes
- addAttribute :: ToValue a => AttributeLimits -> LogAttributes -> Text -> a -> LogAttributes
- addAttributes :: ToValue a => AttributeLimits -> LogAttributes -> HashMap Text a -> LogAttributes
- getAttributes :: LogAttributes -> (Int, HashMap Text AnyValue)
- lookupAttribute :: LogAttributes -> Text -> Maybe AnyValue
- data AnyValue
- class ToValue a where
- data AttributeLimits = AttributeLimits {}
- defaultAttributeLimits :: AttributeLimits
- unsafeLogAttributesFromListIgnoringLimits :: [(Text, AnyValue)] -> LogAttributes
- unsafeMergeLogAttributesIgnoringLimits :: LogAttributes -> LogAttributes -> LogAttributes
Documentation
data LogAttributes Source #
LogAttributes | |
|
Instances
Show LogAttributes Source # | |
Defined in OpenTelemetry.LogAttributes showsPrec :: Int -> LogAttributes -> ShowS # show :: LogAttributes -> String # showList :: [LogAttributes] -> ShowS # | |
Eq LogAttributes Source # | |
Defined in OpenTelemetry.LogAttributes (==) :: LogAttributes -> LogAttributes -> Bool # (/=) :: LogAttributes -> LogAttributes -> Bool # |
addAttribute :: ToValue a => AttributeLimits -> LogAttributes -> Text -> a -> LogAttributes Source #
addAttributes :: ToValue a => AttributeLimits -> LogAttributes -> HashMap Text a -> LogAttributes Source #
getAttributes :: LogAttributes -> (Int, HashMap Text AnyValue) Source #
lookupAttribute :: LogAttributes -> Text -> Maybe AnyValue Source #
An attribute represents user-provided metadata about a span, link, or event.
Any
values are used in place of 'Standard Attributes' in logs because third-party
logs may not conform to the 'Standard Attribute' format.
Telemetry tools may use this data to support high-cardinality querying, visualization in waterfall diagrams, trace sampling decisions, and more.
TextValue Text | |
BoolValue Bool | |
DoubleValue Double | |
IntValue Int64 | |
ByteStringValue ByteString | |
ArrayValue [AnyValue] | |
HashMapValue (HashMap Text AnyValue) | |
NullValue |
Instances
class ToValue a where Source #
Convert a Haskell value to an Any
value.
data Foo = Foo instance ToValue Foo where toValue Foo = TextValue Foo
Instances
ToValue Int64 Source # | |
ToValue ByteString Source # | |
Defined in OpenTelemetry.Internal.Common.Types toValue :: ByteString -> AnyValue Source # | |
ToValue AnyValue Source # | |
ToValue Text Source # | |
ToValue Bool Source # | |
ToValue Double Source # | |
ToValue a => ToValue [a] Source # | |
Defined in OpenTelemetry.Internal.Common.Types | |
ToValue a => ToValue (HashMap Text a) Source # | |
Attribute limits
data AttributeLimits Source #
It is possible when adding attributes that a programming error might cause too many
attributes to be added to an event. Thus, Attributes
use the limits set here as a safeguard
against excessive memory consumption.
AttributeLimits | |
|
Instances
defaultAttributeLimits :: AttributeLimits Source #
Default attribute limits used in the global attribute limit configuration if no environment variables are set.
Values:
attributeCountLimit
:Just 128
attributeLengthLimit
: orNothing