Documentation
¶
Overview ¶
Package tracing implements the tracing subsystem of Grafana Agent Flow. The tracing subsystem exposes a trace.TraceProvider which accepts traces and forwards them to a running component for further processing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultOptions = Options{ SamplingFraction: 0.1, WriteTo: []otelcol.Consumer{}, }
DefaultOptions holds default configuration options.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// SamplingFraction determines which rate of traces to sample. A value of 1
// means to keep 100% of traces. A value of 0 means to keep 0% of traces.
SamplingFraction float64 `river:"sampling_fraction,attr,optional"`
// WriteTo holds a set of OpenTelemetry Collector consumers where internal
// traces should be sent.
WriteTo []otelcol.Consumer `river:"write_to,attr,optional"`
}
Options control the tracing subsystem.
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
Tracer is the tracing subsystem of Grafana Agent Flow. It implements trace.TracerProvider and can be used to forward internally generated traces to a OpenTelemetry Collector-compatible Flow component.
func (*Tracer) Run ¶
Run starts the tracing subsystem and runs it until the provided context is canceled. If the tracing subsystem could not be started, an error is returned.
Run returns no error upon normal shutdown.