Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/grafana-agent
Path: blob/main/component/otelcol/consumer.go
4096 views
1
package otelcol
2
3
import (
4
otelconsumer "go.opentelemetry.io/collector/consumer"
5
)
6
7
// Consumer is a combined OpenTelemetry Collector consumer which can consume
8
// any telemetry signal.
9
type Consumer interface {
10
otelconsumer.Traces
11
otelconsumer.Metrics
12
otelconsumer.Logs
13
}
14
15
// ConsumerArguments is a common Arguments type for Flow components which can
16
// send data to otelcol consumers.
17
//
18
// It is expected to use ConsumerArguments as a block within the top-level
19
// arguments block for a component.
20
type ConsumerArguments struct {
21
Metrics []Consumer `river:"metrics,attr,optional"`
22
Logs []Consumer `river:"logs,attr,optional"`
23
Traces []Consumer `river:"traces,attr,optional"`
24
}
25
26
// ConsumerExports is a common Exports type for Flow components which are
27
// otelcol processors or otelcol exporters.
28
type ConsumerExports struct {
29
Input Consumer `river:"input,attr"`
30
}
31
32