| Copyright | (c) Ian Duncan 2021 |
|---|---|
| License | BSD-3 |
| Maintainer | Ian Duncan |
| Stability | experimental |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
OpenTelemetry.Attributes.Attribute
Description
Synopsis
- data Attribute
- class ToAttribute a where
- toAttribute :: a -> Attribute
- class FromAttribute a where
- fromAttribute :: Attribute -> Maybe a
- data PrimitiveAttribute
- class ToPrimitiveAttribute a where
- class FromPrimitiveAttribute a where
Documentation
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
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
Methods
toAttribute :: a -> Attribute Source #
default toAttribute :: ToPrimitiveAttribute a => a -> Attribute Source #
Instances
| ToAttribute Int64 Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods toAttribute :: Int64 -> Attribute Source # | |
| ToAttribute Attribute Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods toAttribute :: Attribute -> Attribute Source # | |
| ToAttribute PrimitiveAttribute Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods | |
| ToAttribute Text Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods toAttribute :: Text -> Attribute Source # | |
| ToAttribute Bool Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods toAttribute :: Bool -> Attribute Source # | |
| ToAttribute Double Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods toAttribute :: Double -> Attribute Source # | |
| ToAttribute Int Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods toAttribute :: Int -> Attribute Source # | |
| ToPrimitiveAttribute a => ToAttribute [a] Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods toAttribute :: [a] -> Attribute Source # | |
class FromAttribute a where Source #
Minimal complete definition
Nothing
Methods
fromAttribute :: Attribute -> Maybe a Source #
default fromAttribute :: FromPrimitiveAttribute a => Attribute -> Maybe a Source #
Instances
| FromAttribute Int64 Source # | |
Defined in OpenTelemetry.Attributes.Attribute | |
| FromAttribute Attribute Source # | |
Defined in OpenTelemetry.Attributes.Attribute | |
| FromAttribute PrimitiveAttribute Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods fromAttribute :: Attribute -> Maybe PrimitiveAttribute Source # | |
| FromAttribute Text Source # | |
Defined in OpenTelemetry.Attributes.Attribute | |
| FromAttribute Bool Source # | |
Defined in OpenTelemetry.Attributes.Attribute | |
| FromAttribute Double Source # | |
Defined in OpenTelemetry.Attributes.Attribute | |
| FromAttribute Int Source # | |
Defined in OpenTelemetry.Attributes.Attribute | |
| FromPrimitiveAttribute a => FromAttribute [a] Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods fromAttribute :: Attribute -> Maybe [a] Source # | |
data PrimitiveAttribute Source #
Constructors
| TextAttribute Text | |
| BoolAttribute Bool | |
| DoubleAttribute Double | |
| IntAttribute Int64 |
Instances
| Data PrimitiveAttribute Source # | |||||
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 Since: 0.0.2.1 | ||||
Defined in OpenTelemetry.Attributes.Attribute Methods fromString :: String -> PrimitiveAttribute # | |||||
| Generic PrimitiveAttribute Source # | |||||
Defined in OpenTelemetry.Attributes.Attribute Associated Types
Methods from :: PrimitiveAttribute -> Rep PrimitiveAttribute x # to :: Rep PrimitiveAttribute x -> PrimitiveAttribute # | |||||
| Read PrimitiveAttribute Source # | |||||
Defined in OpenTelemetry.Attributes.Attribute Methods readsPrec :: Int -> ReadS PrimitiveAttribute # readList :: ReadS [PrimitiveAttribute] # | |||||
| Show PrimitiveAttribute Source # | |||||
Defined in OpenTelemetry.Attributes.Attribute Methods showsPrec :: Int -> PrimitiveAttribute -> ShowS # show :: PrimitiveAttribute -> String # showList :: [PrimitiveAttribute] -> ShowS # | |||||
| Eq PrimitiveAttribute Source # | |||||
Defined in OpenTelemetry.Attributes.Attribute Methods (==) :: PrimitiveAttribute -> PrimitiveAttribute -> Bool # (/=) :: PrimitiveAttribute -> PrimitiveAttribute -> Bool # | |||||
| Ord PrimitiveAttribute Source # | |||||
Defined in OpenTelemetry.Attributes.Attribute Methods compare :: PrimitiveAttribute -> PrimitiveAttribute -> Ordering # (<) :: PrimitiveAttribute -> PrimitiveAttribute -> Bool # (<=) :: PrimitiveAttribute -> PrimitiveAttribute -> Bool # (>) :: PrimitiveAttribute -> PrimitiveAttribute -> Bool # (>=) :: PrimitiveAttribute -> PrimitiveAttribute -> Bool # max :: PrimitiveAttribute -> PrimitiveAttribute -> PrimitiveAttribute # min :: PrimitiveAttribute -> PrimitiveAttribute -> PrimitiveAttribute # | |||||
| Hashable PrimitiveAttribute Source # | |||||
Defined in OpenTelemetry.Attributes.Attribute | |||||
| FromAttribute PrimitiveAttribute Source # | |||||
Defined in OpenTelemetry.Attributes.Attribute Methods fromAttribute :: Attribute -> Maybe PrimitiveAttribute Source # | |||||
| FromPrimitiveAttribute PrimitiveAttribute Source # | |||||
Defined in OpenTelemetry.Attributes.Attribute Methods fromPrimitiveAttribute :: PrimitiveAttribute -> Maybe PrimitiveAttribute Source # | |||||
| ToAttribute PrimitiveAttribute Source # | |||||
Defined in OpenTelemetry.Attributes.Attribute Methods | |||||
| ToPrimitiveAttribute PrimitiveAttribute Source # | |||||
Defined in OpenTelemetry.Attributes.Attribute Methods toPrimitiveAttribute :: PrimitiveAttribute -> PrimitiveAttribute Source # | |||||
| Lift PrimitiveAttribute Source # | |||||
Defined in OpenTelemetry.Attributes.Attribute Methods lift :: Quote m => PrimitiveAttribute -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => PrimitiveAttribute -> Code m PrimitiveAttribute # | |||||
| type Rep PrimitiveAttribute Source # | |||||
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)))) | |||||
class ToPrimitiveAttribute a where Source #
Convert a Haskell value to a PrimitiveAttribute value.
Methods
Instances
| ToPrimitiveAttribute Int64 Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods toPrimitiveAttribute :: Int64 -> PrimitiveAttribute Source # | |
| ToPrimitiveAttribute PrimitiveAttribute Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods toPrimitiveAttribute :: PrimitiveAttribute -> PrimitiveAttribute Source # | |
| ToPrimitiveAttribute Text Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods | |
| ToPrimitiveAttribute Bool Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods | |
| ToPrimitiveAttribute Double Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods toPrimitiveAttribute :: Double -> PrimitiveAttribute Source # | |
| ToPrimitiveAttribute Int Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods | |
class FromPrimitiveAttribute a where Source #
Methods
fromPrimitiveAttribute :: PrimitiveAttribute -> Maybe a Source #
Instances
| FromPrimitiveAttribute Int64 Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods fromPrimitiveAttribute :: PrimitiveAttribute -> Maybe Int64 Source # | |
| FromPrimitiveAttribute PrimitiveAttribute Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods fromPrimitiveAttribute :: PrimitiveAttribute -> Maybe PrimitiveAttribute Source # | |
| FromPrimitiveAttribute Text Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods fromPrimitiveAttribute :: PrimitiveAttribute -> Maybe Text Source # | |
| FromPrimitiveAttribute Bool Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods fromPrimitiveAttribute :: PrimitiveAttribute -> Maybe Bool Source # | |
| FromPrimitiveAttribute Double Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods fromPrimitiveAttribute :: PrimitiveAttribute -> Maybe Double Source # | |
| FromPrimitiveAttribute Int Source # | |
Defined in OpenTelemetry.Attributes.Attribute Methods fromPrimitiveAttribute :: PrimitiveAttribute -> Maybe Int Source # | |