-
Notifications
You must be signed in to change notification settings - Fork 480
/
consumer.go
30 lines (26 loc) · 878 Bytes
/
consumer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package otelcol
import (
otelconsumer "go.opentelemetry.io/collector/consumer"
)
// Consumer is a combined OpenTelemetry Collector consumer which can consume
// any telemetry signal.
type Consumer interface {
otelconsumer.Traces
otelconsumer.Metrics
otelconsumer.Logs
}
// ConsumerArguments is a common Arguments type for Flow components which can
// send data to otelcol consumers.
//
// It is expected to use ConsumerArguments as a block within the top-level
// arguments block for a component.
type ConsumerArguments struct {
Metrics []Consumer `river:"metrics,attr,optional"`
Logs []Consumer `river:"logs,attr,optional"`
Traces []Consumer `river:"traces,attr,optional"`
}
// ConsumerExports is a common Exports type for Flow components which are
// otelcol processors or otelcol exporters.
type ConsumerExports struct {
Input Consumer `river:"input,attr"`
}