hs-opentelemetry-api-0.0.3.8: 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.Attributes

Description

An Attribute is a key-value pair, which MUST have the following properties:

  • The attribute key MUST be a non-null and non-empty string.
  • The attribute value is either:
  • A primitive type: string, boolean, double precision floating point (IEEE 754-1985) or signed 64 bit integer.
  • An array of primitive type values. The array MUST be homogeneous, i.e., it MUST NOT contain values of different types. For protocols that do not natively support array values such values SHOULD be represented as JSON strings.
  • Attribute values expressing a numerical value of zero, an empty string, or an empty array are considered meaningful and MUST be stored and passed on to processors / exporters.
Synopsis

Documentation

data Attributes Source #

Instances

Instances details
Show Attributes Source # 
Instance details

Defined in OpenTelemetry.Attributes

Eq Attributes Source # 
Instance details

Defined in OpenTelemetry.Attributes

data Attribute Source #

An attribute represents user-provided metadata about a span, link, or event.

Telemetry tools may use this data to support high-cardinality querying, visualization in waterfall diagrams, trace sampling decisions, and more.

Constructors

AttributeValue PrimitiveAttribute

An attribute representing a single primitive value

AttributeArray [PrimitiveAttribute]

An attribute representing an array of primitive values.

All values in the array MUST be of the same primitive attribute type.

Instances

Instances details
Data Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Attribute -> c Attribute #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Attribute #

toConstr :: Attribute -> Constr #

dataTypeOf :: Attribute -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Attribute) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Attribute) #

gmapT :: (forall b. Data b => b -> b) -> Attribute -> Attribute #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Attribute -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Attribute -> r #

gmapQ :: (forall d. Data d => d -> u) -> Attribute -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Attribute -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Attribute -> m Attribute #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Attribute -> m Attribute #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Attribute -> m Attribute #

IsString Attribute Source #

Create a TextAttribute from the string value.

Since: 0.0.2.1

Instance details

Defined in OpenTelemetry.Attributes

Generic Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

Associated Types

type Rep Attribute :: Type -> Type #

Read Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

Show Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

Eq Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

Ord Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

Hashable Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

ToAttribute Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

type Rep Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

type Rep Attribute = D1 ('MetaData "Attribute" "OpenTelemetry.Attributes" "hs-opentelemetry-api-0.0.3.8-AoTII5Ku3MbK0rXg3KwxuX" 'False) (C1 ('MetaCons "AttributeValue" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PrimitiveAttribute)) :+: C1 ('MetaCons "AttributeArray" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [PrimitiveAttribute])))

class ToAttribute a where Source #

Convert a Haskell value to an Attribute value.

For most values, you can define an instance of ToPrimitiveAttribute and use the default toAttribute implementation:

data Foo = Foo

instance ToPrimitiveAttribute Foo where
  toPrimitiveAttribute Foo = TextAttribute Foo
instance ToAttribute foo

Minimal complete definition

Nothing

data PrimitiveAttribute Source #

Instances

Instances details
Data PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PrimitiveAttribute -> c PrimitiveAttribute #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PrimitiveAttribute #

toConstr :: PrimitiveAttribute -> Constr #

dataTypeOf :: PrimitiveAttribute -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PrimitiveAttribute) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PrimitiveAttribute) #

gmapT :: (forall b. Data b => b -> b) -> PrimitiveAttribute -> PrimitiveAttribute #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PrimitiveAttribute -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PrimitiveAttribute -> r #

gmapQ :: (forall d. Data d => d -> u) -> PrimitiveAttribute -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PrimitiveAttribute -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PrimitiveAttribute -> m PrimitiveAttribute #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PrimitiveAttribute -> m PrimitiveAttribute #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PrimitiveAttribute -> m PrimitiveAttribute #

IsString PrimitiveAttribute Source #

Create a TextAttribute from the string value.

Since: 0.0.2.1

Instance details

Defined in OpenTelemetry.Attributes

Generic PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

Associated Types

type Rep PrimitiveAttribute :: Type -> Type #

Read PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

Show PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

Eq PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

Ord PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

Hashable PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

ToAttribute PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

ToPrimitiveAttribute PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

type Rep PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes

type Rep PrimitiveAttribute = D1 ('MetaData "PrimitiveAttribute" "OpenTelemetry.Attributes" "hs-opentelemetry-api-0.0.3.8-AoTII5Ku3MbK0rXg3KwxuX" 'False) ((C1 ('MetaCons "TextAttribute" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "BoolAttribute" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))) :+: (C1 ('MetaCons "DoubleAttribute" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Double)) :+: C1 ('MetaCons "IntAttribute" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int64))))

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

Instances details
Data AttributeLimits Source # 
Instance details

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 # 
Instance details

Defined in OpenTelemetry.Attributes

Associated Types

type Rep AttributeLimits :: Type -> Type #

Read AttributeLimits Source # 
Instance details

Defined in OpenTelemetry.Attributes

Show AttributeLimits Source # 
Instance details

Defined in OpenTelemetry.Attributes

Eq AttributeLimits Source # 
Instance details

Defined in OpenTelemetry.Attributes

Ord AttributeLimits Source # 
Instance details

Defined in OpenTelemetry.Attributes

Hashable AttributeLimits Source # 
Instance details

Defined in OpenTelemetry.Attributes

type Rep AttributeLimits Source # 
Instance details

Defined in OpenTelemetry.Attributes

type Rep AttributeLimits = D1 ('MetaData "AttributeLimits" "OpenTelemetry.Attributes" "hs-opentelemetry-api-0.0.3.8-AoTII5Ku3MbK0rXg3KwxuX" '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:

Unsafe utilities