Skip to content

Commit

Permalink
Make receiver data delivery guarantees explicit (open-telemetry#4262)
Browse files Browse the repository at this point in the history
Resolves open-telemetry#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.
  • Loading branch information
tigrannajaryan authored Oct 26, 2021
1 parent ecd5347 commit 3989942
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions component/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ import (
)

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

0 comments on commit 3989942

Please sign in to comment.