opentracing

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 4 Imported by: 2

Documentation

Overview

Package opentracing provides OpenTracing utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInterceptor

func NewInterceptor(options TracerOptions) (interceptor.Interceptor, error)

NewTracingInterceptor creates an interceptor for setting on client options that implements OpenTracing tracing for workflows.

func NewTracer

func NewTracer(options TracerOptions) (interceptor.Tracer, error)

NewTracer creates a tracer with the given options. Most callers should use NewInterceptor instead.

Types

type TracerOptions

type TracerOptions struct {
	// Tracer is the tracer to use. If not set, the global one is used.
	Tracer opentracing.Tracer

	// DisableSignalTracing can be set to disable signal tracing.
	DisableSignalTracing bool

	// DisableQueryTracing can be set to disable query tracing.
	DisableQueryTracing bool

	// SpanContextKey is the context key used for internal span tracking (not to
	// be confused with the context key OpenTracing uses internally). If not set,
	// this defaults to an internal key (recommended).
	SpanContextKey interface{}

	// HeaderKey is the Temporal header field key used to serialize spans. If
	// empty, this defaults to the one used by all SDKs (recommended).
	HeaderKey string

	// SpanStarter is a callback to create spans. If not set, this creates normal
	// OpenTracing spans calling Tracer.StartSpan.
	SpanStarter func(t opentracing.Tracer, operationName string, opts ...opentracing.StartSpanOption) opentracing.Span
}

TracerOptions are options provided to NewInterceptor or NewTracer.

Jump to

Keyboard shortcuts

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