tracing

package
v0.0.0-...-35a4376 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractFromMap

func ExtractFromMap(
	ctx context.Context,
	tracer Tracer,
	operation string,
	m map[string]string,
	timestamp time.Time,
	attributes ...attribute.KeyValue,
) (context.Context, trace.Span)

func ExtractFromRequest

func ExtractFromRequest(request *http.Request, tracer Tracer) (*http.Request, trace.Span)

func FromSpanContext

func FromSpanContext(ctx context.Context, spanContext trace.SpanContext) context.Context

func InjectInMap

func InjectInMap(ctx context.Context, m map[string]string)

func InjectInResponse

func InjectInResponse(writer http.ResponseWriter, request *http.Request)

func InjectTracer

func InjectTracer(ctx context.Context, tracer Tracer) context.Context

func NewSpanContextFromHeaders

func NewSpanContextFromHeaders(traceIDString, spanIDString string) trace.SpanContext

func TryInjectTracer

func TryInjectTracer(ctx context.Context, tracer Tracer) context.Context

Types

type Config

type Config struct {
	Enable  bool
	Address string
}

func (Config) GRPCTransportCredentials

func (c Config) GRPCTransportCredentials() credentials.TransportCredentials

func (Config) ValidateConfigFields

func (c Config) ValidateConfigFields() error

type Tracer

type Tracer interface {
	Start(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, trace.Span)
	TracerProvider() trace.TracerProvider
	io.Closer
}

func ExtractTracer

func ExtractTracer(ctx context.Context) (Tracer, bool)

func MustExtractTracer

func MustExtractTracer(ctx context.Context) Tracer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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