opentracingbridge

package
v0.0.0-...-adae3a6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTracerPairWithContext

func NewTracerPairWithContext(ctx context.Context, tracer trace.Tracer) (context.Context, *Tracer, *WrapperTracerProvider)

func SkipMigrationContextSetup

func SkipMigrationContextSetup(ctx context.Context) bool

SkipMigrationContextSetup can tell the OpenTelemetry tracer to skip the context setup during the span creation in the Start() function.

func WithMigrationDeferredSetup

func WithMigrationDeferredSetup(ctx context.Context) context.Context

WithMigrationDeferredSetup returns a context that can tell the OpenTelemetry tracer to skip the context setup 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL