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

Description

 
Synopsis

Documentation

newtype AttributeKey a Source #

A AttributeKey is a name for an attribute. The type parameter sets the type of the attribute the key should be associated with. This is useful for standardising attribute keys, since we can define both the key and the type of value it is intended to record.

For example, we might define:

-- See https://opentelemetry.io/docs/specs/semconv/attributes-registry/server/
serverPortKey :: AttributeKey Int
serverPortKey = "server.port"

Constructors

AttributeKey 

Fields

Instances

Instances details
IsString (AttributeKey a) Source #

Raise an error if the string is empty.

Instance details

Defined in OpenTelemetry.Attributes.Key

Generic (AttributeKey a) Source # 
Instance details

Defined in OpenTelemetry.Attributes.Key

Associated Types

type Rep (AttributeKey a) 
Instance details

Defined in OpenTelemetry.Attributes.Key

type Rep (AttributeKey a) = D1 ('MetaData "AttributeKey" "OpenTelemetry.Attributes.Key" "hs-opentelemetry-api-0.3.0.0-6VLKmhDACLT6bB8qCOmjAb" 'True) (C1 ('MetaCons "AttributeKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unkey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

Methods

from :: AttributeKey a -> Rep (AttributeKey a) x #

to :: Rep (AttributeKey a) x -> AttributeKey a #

Show (AttributeKey a) Source # 
Instance details

Defined in OpenTelemetry.Attributes.Key

Eq (AttributeKey a) Source # 
Instance details

Defined in OpenTelemetry.Attributes.Key

Ord (AttributeKey a) Source # 
Instance details

Defined in OpenTelemetry.Attributes.Key

type Rep (AttributeKey a) Source # 
Instance details

Defined in OpenTelemetry.Attributes.Key

type Rep (AttributeKey a) = D1 ('MetaData "AttributeKey" "OpenTelemetry.Attributes.Key" "hs-opentelemetry-api-0.3.0.0-6VLKmhDACLT6bB8qCOmjAb" 'True) (C1 ('MetaCons "AttributeKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "unkey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))