@@ -24,28 +24,37 @@ import (
2424// A TraceReceiver is an "arbitrary data"-to-"trace proto span" converter.
2525// Its purpose is to translate data from the wild into trace proto accompanied
2626// by a *commonpb.Node to uniquely identify where that data comes from.
27- // TraceReceiver feeds a TraceReceiverSink with data.
27+ // TraceReceiver feeds a processor.TraceDataProcessor with data.
2828//
2929// For example it could be Zipkin data source which translates
3030// Zipkin spans into *tracepb.Span-s.
31- //
32- // StartTraceReception tells the receiver to start its processing.
33- //
34- // StopTraceReception tells the receiver that should stop reception,
35- // giving it a chance to perform any necessary clean-up.
3631type TraceReceiver interface {
32+ // TraceSource returns the name of the trace data source.
33+ TraceSource () string
34+
35+ // StartTraceReception tells the receiver to start its processing.
3736 StartTraceReception (ctx context.Context , nextProcessor processor.TraceDataProcessor ) error
37+
38+ // StopTraceReception tells the receiver that should stop reception,
39+ // giving it a chance to perform any necessary clean-up.
3840 StopTraceReception (ctx context.Context ) error
3941}
4042
4143// A MetricsReceiver is an "arbitrary data"-to-"metric proto" converter.
4244// Its purpose is to translate data from the wild into metric proto accompanied
4345// by a *commonpb.Node to uniquely identify where that data comes from.
44- // MetricsReceiver feeds a MetricsReceiverSink with data.
46+ // MetricsReceiver feeds a processor.MetricsDataProcessor with data.
4547//
4648// For example it could be Prometheus data source which translates
4749// Prometheus metrics into *metricpb.Metric-s.
4850type MetricsReceiver interface {
51+ // MetricsSource returns the name of the metrics data source.
52+ MetricsSource () string
53+
54+ // StartMetricsReception tells the receiver to start its processing.
4955 StartMetricsReception (ctx context.Context , nextProcessor processor.MetricsDataProcessor ) error
56+
57+ // StopMetricsReception tells the receiver that should stop reception,
58+ // giving it a chance to perform any necessary clean-up.
5059 StopMetricsReception (ctx context.Context ) error
5160}
0 commit comments