Skip to content

Commit 3989942

Browse files
Make receiver data delivery guarantees explicit (#4262)
Resolves #4261 We want to make this explicit and ensure all receivers follow this pattern. It is important for applications of the Collector where it is delivery guarantees are critical. The OTLP receiver correctly follows the guarantees. Other receivers may need to be audited to ensure compliance.
1 parent ecd5347 commit 3989942

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

component/receiver.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ import (
2222
)
2323

2424
// Receiver allows the collector to receive metrics, traces and logs.
25+
//
26+
// The receivers that receive data via a protocol that support acknowledgements
27+
// MUST follow this order of operations:
28+
// - Receive data from some sender (typically from a network).
29+
// - Push received data to the pipeline by calling nextConsumer.Consume*() function.
30+
// - Acknowledge successful data receipt to the sender if Consume*() succeeded or
31+
// return a failure to the sender if Consume*() returned an error.
32+
// This ensures there are strong delivery guarantees once the data is acknowledged
33+
// by the Collector.
2534
type Receiver interface {
2635
Component
2736
}

0 commit comments

Comments
 (0)