hs-opentelemetry-api
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

OpenTelemetry.Internal.Common.Types

Description

 
Synopsis

Documentation

data InstrumentationLibrary Source #

An instrumentation scope identifies the library or component providing instrumentation. The OpenTelemetry specification renamed this concept from "Instrumentation Library" to "Instrumentation Scope"; this type retains the old constructor name for backwards compatibility but InstrumentationScope is the preferred type alias.

Spec: https://opentelemetry.io/docs/specs/otel/common/instrumentation-scope/

Since: 0.0.1.0

Constructors

InstrumentationLibrary 

Fields

Instances

Instances details
IsString InstrumentationLibrary Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Generic InstrumentationLibrary Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Associated Types

type Rep InstrumentationLibrary 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

type Rep InstrumentationLibrary = D1 ('MetaData "InstrumentationLibrary" "OpenTelemetry.Internal.Common.Types" "hs-opentelemetry-api-1.0.0.0-inplace" 'False) (C1 ('MetaCons "InstrumentationLibrary" 'PrefixI 'True) ((S1 ('MetaSel ('Just "libraryName") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "libraryVersion") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "librarySchemaUrl") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "libraryAttributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Attributes))))
Show InstrumentationLibrary Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Eq InstrumentationLibrary Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Ord InstrumentationLibrary Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Hashable InstrumentationLibrary Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Lift InstrumentationLibrary Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

type Rep InstrumentationLibrary Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

type Rep InstrumentationLibrary = D1 ('MetaData "InstrumentationLibrary" "OpenTelemetry.Internal.Common.Types" "hs-opentelemetry-api-1.0.0.0-inplace" 'False) (C1 ('MetaCons "InstrumentationLibrary" 'PrefixI 'True) ((S1 ('MetaSel ('Just "libraryName") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "libraryVersion") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "librarySchemaUrl") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "libraryAttributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Attributes))))

type InstrumentationScope = InstrumentationLibrary Source #

Preferred alias matching the current OpenTelemetry specification terminology ("Instrumentation Scope"). Identical to InstrumentationLibrary.

Spec: https://opentelemetry.io/docs/specs/otel/common/instrumentation-scope/

Since: 0.4.0.0

instrumentationLibrary :: Text -> Text -> InstrumentationLibrary Source #

Create an InstrumentationLibrary with a name and version. Schema URL and attributes default to empty.

Prefer instrumentationScope for new code.

Since: 0.4.0.0

instrumentationScope :: Text -> Text -> InstrumentationScope Source #

Create an InstrumentationScope with a name and version. Schema URL and attributes default to empty.

let scope = instrumentationScope "my-service" "1.2.0"

For more fields, chain with withSchemaUrl or withLibraryAttributes:

let scope = instrumentationScope "my-service" "1.2.0"
          & withSchemaUrl "https://opentelemetry.io/schemas/1.25.0"

Since: 0.4.0.0

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

Since: 0.0.1.0

Instances

Instances details
Data AnyValue Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Methods

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

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

toConstr :: AnyValue -> Constr #

dataTypeOf :: AnyValue -> DataType #

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

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

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

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

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

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

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

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

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

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

IsString AnyValue Source #

Create a TextAttribute from the string value.

Instance details

Defined in OpenTelemetry.Internal.Common.Types

Generic AnyValue Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Methods

from :: AnyValue -> Rep AnyValue x #

to :: Rep AnyValue x -> AnyValue #

Read AnyValue Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Show AnyValue Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Eq AnyValue Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Ord AnyValue Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Hashable AnyValue Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Methods

hashWithSalt :: Int -> AnyValue -> Int #

hash :: AnyValue -> Int #

ToValue AnyValue Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

type Rep AnyValue Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

class ToValue a where Source #

Convert a Haskell value to an Any value.

data Foo = Foo

instance ToValue Foo where
  toValue Foo = TextValue Foo

Since: 0.0.1.0

Methods

toValue :: a -> AnyValue Source #

Instances

Instances details
ToValue ByteString Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

ToValue Int64 Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

ToValue AnyValue Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

ToValue Text Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

ToValue Bool Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

ToValue Double Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

ToValue a => ToValue [a] Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Methods

toValue :: [a] -> AnyValue Source #

ToValue a => ToValue (HashMap Text a) Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

worstShutdown :: ShutdownResult -> ShutdownResult -> ShutdownResult Source #

Combine two shutdown results, preferring the "worst" outcome. Failure > Timeout > Success.

Since: 0.4.0.0

data FlushResult Source #

The outcome of a call to OpenTelemetry.Trace.forceFlush or OpenTelemetry.Log.forceFlush

Since: 0.0.1.0

Constructors

FlushTimeout

One or more spans or LogRecords did not export from all associated exporters within the alotted timeframe.

FlushSuccess

Flushing spans or LogRecords to all associated exporters succeeded.

FlushError

One or more exporters failed to successfully export one or more unexported spans or LogRecords.

Instances

Instances details
Show FlushResult Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

Eq FlushResult Source # 
Instance details

Defined in OpenTelemetry.Internal.Common.Types

worstFlush :: FlushResult -> FlushResult -> FlushResult Source #

Combine two flush results, preferring the "worst" outcome. Error > Timeout > Success.

Since: 0.0.1.0

data ExportResult Source #

Since: 0.0.1.0

parseInstrumentationLibrary :: MonadFail m => String -> m InstrumentationLibrary Source #

Parses a package-version string like "my-lib-1.2.3" into an InstrumentationLibrary. Tries to split off a trailing version (digits and dots after the rightmost -). Falls back to treating the whole string as a package name with no version.

Since: 0.0.1.0

detectInstrumentationLibrary :: (Quasi m, Quote m) => m Exp Source #

Works out the instrumentation library for your package.

Since: 0.0.1.0