Open
Description
See open-telemetry/opentelemetry-collector#4262:
// 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.
Ideally we want this to be verified by automated tests.
UPDATE: In the spirit of the same strong delivery guarantees, the receivers that use checkpointing (e.g. filelog receiver) must save the checkpoint AFTER they push the data to the pipeline (after Consume*() call returns).