Documentation ¶
Overview ¶
Package statsprocessor contains interfaces to process OTel traces and output stats
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ingester ¶
type Ingester interface { // Start starts the statsprocessor. Start() // Ingest ingests the set of traces. Ingest(ctx context.Context, traces ptrace.Traces) // Stop stops the statsprocessor. Stop() }
Ingester is able to ingest traces. Implemented by traceagent.
type OtelStatsWriter ¶ added in v0.56.0
type OtelStatsWriter struct {
// contains filtered or unexported fields
}
OtelStatsWriter implements the trace-agent's `stats.Writer` interface via an `out` channel This provides backwards compatibility for otel components that do not yet use the latest agent version where these channels have been dropped
func NewOtelStatsWriter ¶ added in v0.56.0
func NewOtelStatsWriter(out chan *pb.StatsPayload) *OtelStatsWriter
NewOtelStatsWriter makes an OtelStatsWriter that writes to the given `out` chan
func (*OtelStatsWriter) Write ¶ added in v0.56.0
func (a *OtelStatsWriter) Write(payload *pb.StatsPayload)
Write this payload to the `out` channel
type TraceAgent ¶
TraceAgent specifies a minimal trace agent instance that is able to process traces and output stats.
func NewAgent ¶
func NewAgent(ctx context.Context, out chan *pb.StatsPayload, metricsClient statsd.ClientInterface, timingReporter timing.Reporter) *TraceAgent
NewAgent creates a new unstarted traceagent using the given context. Call Start to start the traceagent. The out channel will receive outoing stats payloads resulting from spans ingested using the Ingest method.
func NewAgentWithConfig ¶
func NewAgentWithConfig(ctx context.Context, cfg *traceconfig.AgentConfig, out chan *pb.StatsPayload, metricsClient statsd.ClientInterface, timingReporter timing.Reporter) *TraceAgent
NewAgentWithConfig creates a new traceagent with the given config cfg. Used in tests; use newAgent instead.
func (*TraceAgent) Ingest ¶
func (p *TraceAgent) Ingest(ctx context.Context, traces ptrace.Traces)
Ingest processes the given spans within the traceagent and outputs stats through the output channel provided to newAgent. Do not call Ingest on an unstarted or stopped traceagent.
func (*TraceAgent) Start ¶
func (p *TraceAgent) Start()
Start starts the traceagent, making it ready to ingest spans.
func (*TraceAgent) Stop ¶
func (p *TraceAgent) Stop()
Stop stops the traceagent, making it unable to ingest spans. Do not call Ingest after Stop.