| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
OpenTelemetry.LogAttributes
Contents
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
- getAttributeMap :: 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 #
Constructors
| LogAttributes | |
Fields
| |
Instances
| Show LogAttributes Source # | |
Defined in OpenTelemetry.LogAttributes Methods showsPrec :: Int -> LogAttributes -> ShowS # show :: LogAttributes -> String # showList :: [LogAttributes] -> ShowS # | |
| Eq LogAttributes Source # | |
Defined in OpenTelemetry.LogAttributes Methods (==) :: 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 #
getAttributeMap :: 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.
Constructors
| 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 Methods 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.
Constructors
| AttributeLimits | |
Fields
| |
Instances
| Data AttributeLimits Source # | |||||
Defined in OpenTelemetry.Attributes Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AttributeLimits -> c AttributeLimits # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c AttributeLimits # toConstr :: AttributeLimits -> Constr # dataTypeOf :: AttributeLimits -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c AttributeLimits) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c AttributeLimits) # gmapT :: (forall b. Data b => b -> b) -> AttributeLimits -> AttributeLimits # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AttributeLimits -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AttributeLimits -> r # gmapQ :: (forall d. Data d => d -> u) -> AttributeLimits -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> AttributeLimits -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AttributeLimits -> m AttributeLimits # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AttributeLimits -> m AttributeLimits # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AttributeLimits -> m AttributeLimits # | |||||
| Generic AttributeLimits Source # | |||||
Defined in OpenTelemetry.Attributes Associated Types
Methods from :: AttributeLimits -> Rep AttributeLimits x # to :: Rep AttributeLimits x -> AttributeLimits # | |||||
| Read AttributeLimits Source # | |||||
Defined in OpenTelemetry.Attributes Methods readsPrec :: Int -> ReadS AttributeLimits # readList :: ReadS [AttributeLimits] # | |||||
| Show AttributeLimits Source # | |||||
Defined in OpenTelemetry.Attributes Methods showsPrec :: Int -> AttributeLimits -> ShowS # show :: AttributeLimits -> String # showList :: [AttributeLimits] -> ShowS # | |||||
| Eq AttributeLimits Source # | |||||
Defined in OpenTelemetry.Attributes Methods (==) :: AttributeLimits -> AttributeLimits -> Bool # (/=) :: AttributeLimits -> AttributeLimits -> Bool # | |||||
| Ord AttributeLimits Source # | |||||
Defined in OpenTelemetry.Attributes Methods compare :: AttributeLimits -> AttributeLimits -> Ordering # (<) :: AttributeLimits -> AttributeLimits -> Bool # (<=) :: AttributeLimits -> AttributeLimits -> Bool # (>) :: AttributeLimits -> AttributeLimits -> Bool # (>=) :: AttributeLimits -> AttributeLimits -> Bool # max :: AttributeLimits -> AttributeLimits -> AttributeLimits # min :: AttributeLimits -> AttributeLimits -> AttributeLimits # | |||||
| Hashable AttributeLimits Source # | |||||
Defined in OpenTelemetry.Attributes | |||||
| type Rep AttributeLimits Source # | |||||
Defined in OpenTelemetry.Attributes type Rep AttributeLimits = D1 ('MetaData "AttributeLimits" "OpenTelemetry.Attributes" "hs-opentelemetry-api-0.3.0.0-6VLKmhDACLT6bB8qCOmjAb" 'False) (C1 ('MetaCons "AttributeLimits" 'PrefixI 'True) (S1 ('MetaSel ('Just "attributeCountLimit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "attributeLengthLimit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)))) | |||||
defaultAttributeLimits :: AttributeLimits Source #
Default attribute limits used in the global attribute limit configuration if no environment variables are set.
Values:
attributeCountLimit:Just 128attributeLengthLimit: orNothing