hs-opentelemetry-api-0.0.3.4: 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.Util

Description

 
Synopsis

Documentation

constructorName :: (HasConstructor (Rep a), Generic a) => a -> String Source #

Useful for annotating which constructor in an ADT was chosen

Since: 0.1.0.0

class HasConstructor (f :: Type -> Type) Source #

Detect a constructor from any datatype which derives Generic

Minimal complete definition

genericConstrName

Instances

Instances details
(HasConstructor x, HasConstructor y) => HasConstructor (x :+: y) Source # 
Instance details

Defined in OpenTelemetry.Util

Methods

genericConstrName :: (x :+: y) x0 -> String

HasConstructor f => HasConstructor (D1 c f) Source # 
Instance details

Defined in OpenTelemetry.Util

Methods

genericConstrName :: D1 c f x -> String

Constructor c => HasConstructor (C1 c f) Source # 
Instance details

Defined in OpenTelemetry.Util

Methods

genericConstrName :: C1 c f x -> String

getThreadId :: ThreadId -> Int Source #

Get an int representation of a thread id

bracketError :: MonadUnliftIO m => m a -> (Maybe SomeException -> a -> m b) -> (a -> m c) -> m c Source #

Like bracket, but provides the after function with information about uncaught exceptions.

Since: 0.1.0.0

Data structures

emptyAppendOnlyBoundedCollection Source #

Arguments

:: Int

Maximum size

-> AppendOnlyBoundedCollection a 

Initialize a bounded collection that admits a maximum size