xtrace

package
v0.11.15 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFullMethod

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

ParseFullMethod returns the method name and attributes.

func PeerAttr

func PeerAttr(addr string) []attribute.KeyValue

PeerAttr returns the peer attributes.

func SetGlobalTracer

func SetGlobalTracer(tp trace.TracerProvider)

SetGlobalTracer ...

Types

type MetadataReaderWriter

type MetadataReaderWriter metadata.MD

MetadataReaderWriter ...

func (MetadataReaderWriter) Get

func (m MetadataReaderWriter) Get(key string) string

func (MetadataReaderWriter) Keys

func (m MetadataReaderWriter) Keys() []string

func (MetadataReaderWriter) Set

func (m MetadataReaderWriter) Set(key, value string)

type Option

type Option func(*options)

Option is tracing 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) Start

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

Start start tracing span

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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