hs-opentelemetry-api-0.3.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 HaskellNone
LanguageHaskell2010

OpenTelemetry.Attributes.Attribute

Description

 
Synopsis

Documentation

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.Attribute

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.Attribute

Generic Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

Associated Types

type Rep Attribute 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

type Rep Attribute = D1 ('MetaData "Attribute" "OpenTelemetry.Attributes.Attribute" "hs-opentelemetry-api-0.3.0.0-6VLKmhDACLT6bB8qCOmjAb" '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])))
Read Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

Show Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

Eq Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

Ord Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

Hashable Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

FromAttribute Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

ToAttribute Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

Lift Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

Methods

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

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

type Rep Attribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

type Rep Attribute = D1 ('MetaData "Attribute" "OpenTelemetry.Attributes.Attribute" "hs-opentelemetry-api-0.3.0.0-6VLKmhDACLT6bB8qCOmjAb" '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.Attribute

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.Attribute

Generic PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

Associated Types

type Rep PrimitiveAttribute 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

type Rep PrimitiveAttribute = D1 ('MetaData "PrimitiveAttribute" "OpenTelemetry.Attributes.Attribute" "hs-opentelemetry-api-0.3.0.0-6VLKmhDACLT6bB8qCOmjAb" '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))))
Read PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

Show PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

Eq PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

Ord PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

Hashable PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

FromAttribute PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

FromPrimitiveAttribute PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

ToAttribute PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

ToPrimitiveAttribute PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

Lift PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

type Rep PrimitiveAttribute Source # 
Instance details

Defined in OpenTelemetry.Attributes.Attribute

type Rep PrimitiveAttribute = D1 ('MetaData "PrimitiveAttribute" "OpenTelemetry.Attributes.Attribute" "hs-opentelemetry-api-0.3.0.0-6VLKmhDACLT6bB8qCOmjAb" '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))))