tracing

package
v0.1.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client(opts ...Option) middleware.Middleware

Client returns a new client middleware for OpenTelemetry.

func Server

func Server(opts ...Option) middleware.Middleware

Server returns a new server middleware for OpenTelemetry.

Types

type MetadataCarrier

type MetadataCarrier metadata.MD

MetadataCarrier is grpc metadata carrier

func (MetadataCarrier) Clone

func (mc MetadataCarrier) Clone() MetadataCarrier

Clone copy MetadataCarrier

func (MetadataCarrier) Del

func (mc MetadataCarrier) Del(key string)

Del delete key

func (MetadataCarrier) Get

func (mc MetadataCarrier) Get(key string) string

Get returns the value associated with the passed key.

func (MetadataCarrier) Keys

func (mc MetadataCarrier) Keys() []string

Keys lists the keys stored in this carrier.

func (MetadataCarrier) Set

func (mc MetadataCarrier) Set(key string, value string)

Set stores the key-value pair.

type Option

type Option func(*options)

Option is tracing option.

func WithPropagators

func WithPropagators(propagators propagation.TextMapPropagator) Option

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

type Tracer

type Tracer struct {
	// contains filtered or unexported fields
}

Tracer is otel span tracer

func NewTracer

func NewTracer(kind trace.SpanKind, opts ...Option) *Tracer

NewTracer create tracer instance

func (*Tracer) End

func (t *Tracer) End(ctx context.Context, span trace.Span, err error)

End finish tracing span

func (*Tracer) Start

func (t *Tracer) Start(ctx context.Context, component string, operation string, carrier propagation.TextMapCarrier) (context.Context, trace.Span)

Start start tracing span

Jump to

Keyboard shortcuts

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