Documentation ¶
Overview ¶
Package telemetry provides functions for application tracing. Primarily used while debugging.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnsupportedProvider is the error given when a trace provider cannot be found for the provided // configuration. ErrUnsupportedProvider = errors.New("unsupported trace provider") // Discard is a sentinel error that is used to discard any current traces. // nolint: revive,stylecheck Discard = errors.New("discard") )
View Source
var Flags = flag.Flags{ &flag.String{ Name: "telemetry-url", Usage: "URL to configure opentelemetry. See documentation for all configuration options.", Destination: &telemetryURL, EnvVar: "TELEMETRY_URL", Value: "noop://", Hidden: true, }, }
Flags contains all command-line flags that can be used to configure telemetry.
Functions ¶
Types ¶
type Span ¶
Span is a wrapper for trace.Span.
func (Span) SetAttributes ¶
SetAttributes is a wrapper around trace.Span.SetAttributes that uses an interface map to set attributes.
type TracedMutex ¶
type TracedMutex struct {
// contains filtered or unexported fields
}
The TracedMutex type is a wrapper around a sync.Mutex that creates a span when Lock is called.
func NewTracedMutex ¶
func NewTracedMutex() *TracedMutex
NewTracedMutex returns a new TracedMutex initialised with a sync.Mutex.
Click to show internal directories.
Click to hide internal directories.