Creates and manages an active span for a given operation. This function provides two modes of operation:
Function type that accepts a Span parameter and returns a value
Configuration object for the span
Optionalcontext?: Optional context configuration for span inheritance
OptionaldisableSpanManagement?: booleanWhen true, disables automatic span lifecycle management
Function to execute within the span context. Receives the span as a parameter
Name of the span to be created
OptionalspanOptions?: SpanOptionsOptional configuration for the span creation
The return value of the executed function
StaticgetGets or creates the singleton instance of ArvoOpenTelemetry. This method ensures only one instance of ArvoOpenTelemetry exists throughout the application.
Optionalconfig: { tracer?: Tracer }Optional configuration object for initializing the instance
Optionaltracer?: TracerOptional custom OpenTelemetry tracer instance. If not provided, defaults to a tracer with name 'arvo-instrumentation'
The singleton instance of ArvoOpenTelemetry
StaticreinitializeForces a reinitialization of the ArvoOpenTelemetry instance. Use this method with caution as it will affect all existing traces and spans.
Configuration object for reinitializing the instance
Optionalforce?: booleanIf true, skips active span checks
Optionaltracer?: TracerOptional custom OpenTelemetry tracer instance
Singleton class for managing OpenTelemetry instrumentation across libraries