tracing

package
v0.0.0-...-037b315 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

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

func Server

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

Types

type Metadata

type Metadata struct{}

func (Metadata) Extract

func (b Metadata) Extract(parent context.Context, carrier propagation.TextMapCarrier) context.Context

Extract reads cross-cutting concerns from the carrier into a Context.

func (Metadata) Fields

func (b Metadata) Fields() []string

Fields returns the keys who's values are set with Inject.

func (Metadata) Inject

func (b Metadata) Inject(ctx context.Context, carrier propagation.TextMapCarrier)

Inject set cross-cutting concerns from the Context into the carrier.

type Option

type Option func(o *options)

func WithName

func WithName(name string) Option

func WithPropagator

func WithPropagator(propagator propagation.TextMapPropagator) Option

func WithProvider

func WithProvider(provider trace.TracerProvider) Option

type Tracer

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

func NewTracer

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

func (*Tracer) End

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

func (*Tracer) Start

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

Jump to

Keyboard shortcuts

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