Documentation
¶
Overview ¶
Package telemetry provides the telemetry for fleet components.
Package telemetry provides the telemetry for fleet components.
Package telemetry provides the telemetry for fleet components.
Package telemetry provides the telemetry for fleet components.
Index ¶
- func EnvFromContext(ctx context.Context) []string
- func SetSamplingRate(name string, rate float64)
- func WrapRoundTripper(rt http.RoundTripper) http.RoundTripper
- type LogMessage
- type LogPayload
- type Span
- func SpanFromContext(ctx context.Context) (*Span, bool)
- func StartSpanFromContext(ctx context.Context, operationName string) (*Span, context.Context)
- func StartSpanFromEnv(ctx context.Context, operationName string) (*Span, context.Context)
- func StartSpanFromIDs(ctx context.Context, operationName, traceID, parentID string) (*Span, context.Context)
- type Telemetry
- type TracedCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvFromContext ¶
EnvFromContext returns the environment variables for the context.
func SetSamplingRate ¶ added in v0.66.0
SetSamplingRate sets the sampling rate for a given span name. The rate must be between 0 and 1.
func WrapRoundTripper ¶
func WrapRoundTripper(rt http.RoundTripper) http.RoundTripper
WrapRoundTripper wraps the round tripper with the telemetry round tripper.
Types ¶
type LogMessage ¶
LogMessage defines the log message object
type LogPayload ¶
type LogPayload struct {
Logs []LogMessage `json:"logs"`
}
LogPayload defines the log payload object
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
Span represents a span.
func SpanFromContext ¶
SpanFromContext returns the span from the context if available.
func StartSpanFromContext ¶
StartSpanFromContext starts a span using the context to find the parent span.
func StartSpanFromEnv ¶
StartSpanFromEnv starts a span using the environment variables to find the parent span.
func StartSpanFromIDs ¶
func StartSpanFromIDs(ctx context.Context, operationName, traceID, parentID string) (*Span, context.Context)
StartSpanFromIDs starts a span using the trace and parent IDs provided.
func (*Span) SetResourceName ¶
SetResourceName sets the resource name of the span.
func (*Span) SetTopLevel ¶
func (s *Span) SetTopLevel()
SetTopLevel sets the span as a top level span.
type Telemetry ¶
type Telemetry struct {
// contains filtered or unexported fields
}
Telemetry handles the telemetry for fleet components.
func NewTelemetry ¶
NewTelemetry creates a new telemetry instance
type TracedCmd ¶ added in v0.67.0
TracedCmd is a wrapper around exec.Cmd that adds telemetry
func CommandContext ¶ added in v0.67.0
CommandContext runs a command using exec.CommandContext and adds telemetry