Creates and manages an active span for a given operation. This function provides two modes of operation:
Configuration object for the span
Optional
context?: { Optional context configuration for span inheritance
Optional
disableWhen 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
Optional
spanOptional configuration for the span creation
The return value of the executed function
Static
getGets or creates the singleton instance of ArvoOpenTelemetry. This method ensures only one instance of ArvoOpenTelemetry exists throughout the application.
Optional
config: { Optional configuration object for initializing the instance
Optional
tracer?: TracerOptional custom OpenTelemetry tracer instance. If not provided, defaults to a tracer with name 'arvo-instrumentation'
The singleton instance of ArvoOpenTelemetry
Static
reinitializeForces 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
Optional
force?: booleanIf true, skips active span checks
Optional
tracer?: TracerOptional custom OpenTelemetry tracer instance
Singleton class for managing OpenTelemetry instrumentation across libraries