Documentation
¶
Index ¶
- func NewTracerPairWithContext(ctx context.Context, tracer trace.Tracer) (context.Context, *Tracer, *WrapperTracerProvider)
- func SkipMigrationContextSetup(ctx context.Context) bool
- func WithMigrationDeferredSetup(ctx context.Context) context.Context
- type MigrationDeferredContextSetupTracerExtension
- type MigrationOverrideTracerSpanExtension
- type Tracer
- type WarningHandler
- type WrapperTracer
- type WrapperTracerProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SkipMigrationContextSetup ¶
SkipMigrationContextSetup can tell the OpenTelemetry tracer to skip the context setup during the span creation in the Start() function.
Types ¶
type MigrationDeferredContextSetupTracerExtension ¶
type MigrationDeferredContextSetupTracerExtension = migration.DeferredContextSetupTracerExtension
MigrationDeferredContextSetupTracerExtension is an interface an OpenTelemetry tracer may implement in order to cooperate with the calls to the OpenTracing API.
Tracers implementing this interface should also use the SkipContextSetup() function during creation of the span in the Start() function to skip the configuration of the context.
type MigrationOverrideTracerSpanExtension ¶
type MigrationOverrideTracerSpanExtension = migration.OverrideTracerSpanExtension
MigrationOverrideTracerSpanExtension is an interface an OpenTelemetry span may implement in order to cooperate with the calls to the OpenTracing API.
type Tracer ¶
type Tracer = opentracing.BridgeTracer
Tracer is an implementation of the OpenTracing tracer, which translates the calls to the OpenTracing API into OpenTelemetry counterparts and calls the underlying OpenTelemetry tracer.
func NewBridgeTracer ¶
func NewBridgeTracer() *Tracer
NewBridgeTracer creates a new BridgeTracer. The new tracer forwards the calls to the OpenTelemetry Noop tracer, so it should be overridden with the SetOpenTelemetryTracer function. The warnings handler does nothing by default, so to override it use the SetWarningHandler function.
type WarningHandler ¶
type WarningHandler = opentracing.BridgeWarningHandler
WarningHandler is a type of handler that receives warnings from the BridgeTracer.
type WrapperTracer ¶
type WrapperTracer = opentracing.WrapperTracer
WrapperTracer is a wrapper around an OpenTelemetry tracer. It mostly forwards the calls to the wrapped tracer, but also does some extra steps like setting up a context with the active OpenTracing span.
It does not need to be used when the OpenTelemetry tracer is also aware how to operate in environment where OpenTracing API is also used.
func NewWrapperTracer ¶
func NewWrapperTracer(bridge *Tracer, tracer trace.Tracer) *WrapperTracer
NewWrapperTracer wraps the passed tracer and also talks to the passed bridge tracer when setting up the context with the new active OpenTracing span.
type WrapperTracerProvider ¶
type WrapperTracerProvider = opentracing.WrapperTracerProvider
func NewTracerPair ¶
func NewTracerPair(tracer trace.Tracer) (*opentracing.BridgeTracer, *WrapperTracerProvider)
NewTracerPair is a utility function that creates a BridgeTracer and a WrapperTracerProvider. WrapperTracerProvider creates a single instance of WrapperTracer. The BridgeTracer forwards the calls to the WrapperTracer that wraps the passed tracer. BridgeTracer and WrapperTracerProvider are returned to the caller and the caller is expected to register BridgeTracer with opentracing and WrapperTracerProvider with opentelemetry.
func NewWrappedTracerProvider ¶
func NewWrappedTracerProvider(bridge *Tracer, tracer trace.Tracer) *WrapperTracerProvider
NewWrappedTracerProvider creates a new trace provider that creates a single instance of WrapperTracer that wraps OpenTelemetry tracer.