tracing

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 20 Imported by: 285

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient = &http.Client{
	Transport: DefaultTransport,
}
View Source
var DefaultTransport = NewTransport(http.DefaultTransport)

Functions

func ClientStatsHandler added in v0.14.0

func ClientStatsHandler(opts ...otelgrpc.Option) stats.Handler

func ContextWithSpanFromContext

func ContextWithSpanFromContext(ctx, ctx2 context.Context) context.Context

ContextWithSpanFromContext sets the tracing span of a context from other context if one is not already set. Alternative would be context.WithoutCancel() that would copy the context but reset ctx.Done

func FinishWithError

func FinishWithError(span trace.Span, err error)

FinishWithError finalizes the span and sets the error if one is passed

func NewTransport added in v0.7.0

func NewTransport(rt http.RoundTripper) http.RoundTripper

func ServerStatsHandler added in v0.14.0

func ServerStatsHandler(opts ...otelgrpc.Option) stats.Handler

func StartSpan

func StartSpan(ctx context.Context, operationName string, opts ...trace.SpanStartOption) (trace.Span, context.Context)

StartSpan starts a new span as a child of the span in context. If there is no span in context then this is a no-op.

Types

type MultiSpan

type MultiSpan struct {
	trace.Span
}

func NewMultiSpan

func NewMultiSpan() *MultiSpan

func (*MultiSpan) Add

func (ms *MultiSpan) Add(s trace.Span)

type MultiSpanExporter added in v0.14.0

type MultiSpanExporter []sdktrace.SpanExporter

func (MultiSpanExporter) ExportSpans added in v0.14.0

func (m MultiSpanExporter) ExportSpans(ctx context.Context, spans []sdktrace.ReadOnlySpan) (err error)

func (MultiSpanExporter) Shutdown added in v0.14.0

func (m MultiSpanExporter) Shutdown(ctx context.Context) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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