Documentation ¶
Overview ¶
Package trace is used for tracing.
Background: This package is a wrapper for the otel package for doing tracing.
Index ¶
- func Export(ctx context.Context) map[string]string
- func Import(ctx context.Context, index map[string]string) context.Context
- type Span
- func SpanFromContext(ctx context.Context) *Span
- func StartClient(ctx context.Context, params ...string) (context.Context, *Span)
- func StartConsumer(ctx context.Context, params ...string) (context.Context, *Span)
- func StartInternal(ctx context.Context, params ...string) (context.Context, *Span)
- func StartProducer(ctx context.Context, params ...string) (context.Context, *Span)
- func StartServer(ctx context.Context, params ...string) (context.Context, *Span)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
Span of a trace.
func SpanFromContext ¶
SpanFromContext returns a span from the context. If there is no span in the context in the no-op span is returned.
func StartClient ¶
StartClient trace when calling another process. Params show in the span name.
func StartConsumer ¶
StartConsumer trace when consuming from a pub/sub system. Params show in the span name.
func StartInternal ¶
StartInternal trace within a process. Params show in the span name.
func StartProducer ¶
StartProducer trace when sending to a pub/sub system. Params show in the span name.
func StartServer ¶
StartServer trace when another process is calling us. Params show in the span name.
func (*Span) RecordError ¶
RecordError records an error in the span.
Click to show internal directories.
Click to hide internal directories.