module OpenTelemetry
Overview
The OpenTelemetry API for creating and propagating traces. Concurrency: process-wide configuration is atomic and active contexts are fiber-local.
Defined in:
api/any_value.crapi/attributes.cr
api/baggage.cr
api/context.cr
api/error_handler.cr
api/globals.cr
api/instrumentation_scope.cr
api/version.cr
opentelemetry-api.cr
Class Method Summary
- .current_span : Trace::Span
-
.error_handler : ErrorHandler
Returns the installed error handler.
-
.error_handler=(handler : ErrorHandler) : ErrorHandler
Installs a process-wide error handler.
-
.handle_error(exception : Exception | Nil = nil, message : String | Nil = nil, severity : Log::Severity = :error) : Nil
Reports a diagnostic and swallows exceptions from the installed handler.
- .propagator : Propagation::TextMapPropagator
-
.propagator=(propagator : Propagation::TextMapPropagator) : Propagation::TextMapPropagator
Sets the propagator while retaining the registered provider and its owner.
- .tracer(name : String | Nil, version : String | Nil = nil, *, schema_url : String | Nil = nil, attributes = nil) : Trace::Tracer
-
.tracer_provider : Trace::TracerProvider
Returns the provider proxy, which follows changes to the installed registration.
-
.tracer_provider=(provider : Trace::TracerProvider) : Trace::TracerProvider
Sets the provider and clears SDK ownership when the provider changes.
Class Method Detail
Installs a process-wide error handler.
Reports a diagnostic and swallows exceptions from the installed handler. Drops nested diagnostics on the same fiber while the handler runs.
Sets the propagator while retaining the registered provider and its owner.
Returns the provider proxy, which follows changes to the installed registration.
Sets the provider and clears SDK ownership when the provider changes.