trace

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPCClientTrace

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

func GRPCServerTrace

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

func HTTPServerTrace

func HTTPServerTrace(opts ...Option) middleware.HTTPMiddleware

func ParseFullMethod

func ParseFullMethod(fullMethod string) (string, []attribute.KeyValue)

func PeerAttr

func PeerAttr(addr string) []attribute.KeyValue

func SpanInfo

func SpanInfo(fullMethod, addr string) (string, []attribute.KeyValue)

Types

type Metadata

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

func (*Metadata) Get

func (m *Metadata) Get(key string) string

func (*Metadata) Keys

func (m *Metadata) Keys() []string

func (*Metadata) Set

func (m *Metadata) Set(key, value string)

type Option

type Option func(option *TracerOption)

func Name

func Name(name string) Option

func Propagator

func Propagator(propagator propagation.TextMapPropagator) Option

func Provider

func Provider(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) Start

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

func (*Tracer) Stop

func (t *Tracer) Stop(_ context.Context, span trace.Span, m interface{}, err error)

type TracerOption

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

Jump to

Keyboard shortcuts

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