Documentation ¶
Overview ¶
Package lazyconsumer implements a lazy OpenTelemetry Collector consumer which can lazily forward request to another consumer implementation.
Index ¶
- type Consumer
- func (c *Consumer) Capabilities() otelconsumer.Capabilities
- func (c *Consumer) ConsumeLogs(ctx context.Context, ld plog.Logs) error
- func (c *Consumer) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error
- func (c *Consumer) ConsumeTraces(ctx context.Context, td ptrace.Traces) error
- func (c *Consumer) SetConsumers(t otelconsumer.Traces, m otelconsumer.Metrics, l otelconsumer.Logs)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
Consumer is a lazily-loaded consumer.
func New ¶
New creates a new Consumer. The provided ctx is used to determine when the Consumer should stop accepting data; if the ctx is closed, no further data will be accepted.
func (*Consumer) Capabilities ¶
func (c *Consumer) Capabilities() otelconsumer.Capabilities
Capabilities implements otelconsumer.baseConsumer.
func (*Consumer) ConsumeLogs ¶
ConsumeLogs implements otelconsumer.Logs.
func (*Consumer) ConsumeMetrics ¶
ConsumeMetrics implements otelconsumer.Metrics.
func (*Consumer) ConsumeTraces ¶
ConsumeTraces implements otelconsumer.Traces.
func (*Consumer) SetConsumers ¶
func (c *Consumer) SetConsumers(t otelconsumer.Traces, m otelconsumer.Metrics, l otelconsumer.Logs)
SetConsumers updates the internal consumers that Consumer will forward data to. It is valid for any combination of m, l, and t to be nil.