Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data InstrumentationLibrary = InstrumentationLibrary {}
- data AnyValue
- class ToValue a where
- data ShutdownResult
- data FlushResult
- data ExportResult
- = Success
- | Failure (Maybe SomeException)
- parseInstrumentationLibrary :: MonadFail m => String -> m InstrumentationLibrary
- detectInstrumentationLibrary :: forall m. (Quasi m, Quote m) => m Exp
Documentation
data InstrumentationLibrary Source #
An identifier for the library that provides the instrumentation for a given Instrumented Library. Instrumented Library and Instrumentation Library may be the same library if it has built-in OpenTelemetry instrumentation.
The inspiration of the OpenTelemetry project is to make every library and application observable out of the box by having them call OpenTelemetry API directly. However, many libraries will not have such integration, and as such there is a need for a separate library which would inject such calls, using mechanisms such as wrapping interfaces, subscribing to library-specific callbacks, or translating existing telemetry into the OpenTelemetry model.
A library that enables OpenTelemetry observability for another library is called an Instrumentation Library.
An instrumentation library should be named to follow any naming conventions of the instrumented library (e.g. middleware
for a web framework).
If there is no established name, the recommendation is to prefix packages with "hs-opentelemetry-instrumentation", followed by the instrumented library name itself.
In general, the simplest way to get the instrumentation library is to use detectInstrumentationLibrary
, which uses the Haskell package name and version.
InstrumentationLibrary | |
|
Instances
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.
TextValue Text | |
BoolValue Bool | |
DoubleValue Double | |
IntValue Int64 | |
ByteStringValue ByteString | |
ArrayValue [AnyValue] | |
HashMapValue (HashMap Text AnyValue) | |
NullValue |
Instances
class ToValue a where Source #
Convert a Haskell value to an Any
value.
data Foo = Foo instance ToValue Foo where toValue Foo = TextValue Foo
Instances
ToValue Int64 Source # | |
ToValue ByteString Source # | |
Defined in OpenTelemetry.Internal.Common.Types toValue :: ByteString -> AnyValue Source # | |
ToValue AnyValue Source # | |
ToValue Text Source # | |
ToValue Bool Source # | |
ToValue Double Source # | |
ToValue a => ToValue [a] Source # | |
Defined in OpenTelemetry.Internal.Common.Types | |
ToValue a => ToValue (HashMap Text a) Source # | |
data FlushResult Source #
The outcome of a call to OpenTelemetry.Trace.forceFlush
or OpenTelemetry.Logs.forceFlush
FlushTimeout | One or more spans or |
FlushSuccess | Flushing spans or |
FlushError | One or more exporters failed to successfully export one or more
unexported spans or |
Instances
Show FlushResult Source # | |
Defined in OpenTelemetry.Internal.Common.Types showsPrec :: Int -> FlushResult -> ShowS # show :: FlushResult -> String # showList :: [FlushResult] -> ShowS # |
parseInstrumentationLibrary :: MonadFail m => String -> m InstrumentationLibrary Source #
Parses a package-version string into an InstrumentationLibrary'.