| 1 |
// Copyright The OpenTelemetry Authors |
| 2 |
// SPDX-License-Identifier: Apache-2.0 |
| 3 |
|
| 4 |
// Package consumererror provides wrappers to easily classify errors. This allows |
| 5 |
// appropriate action by error handlers without the need to know each individual |
| 6 |
// error type/instance. These errors are returned by the Consume*() functions of |
| 7 |
// the consumer interfaces. |
| 8 |
// |
| 9 |
// # Error handling |
| 10 |
// |
| 11 |
// The consumererror package provides a way to classify errors into two categories: Permanent and |
| 12 |
// NonPermanent. The Permanent errors are those that are not expected to be resolved by retrying the |
| 13 |
// same data. |
| 14 |
// |
| 15 |
// If the error is Permanent, then the Consume*() call should not be retried with the same data. |
| 16 |
// This typically happens when the data cannot be serialized by the exporter that is attached to the |
| 17 |
// pipeline or when the destination refuses the data because it cannot decode it. |
| 18 |
// |
| 19 |
// If the error is non-Permanent then the Consume*() call should be retried with the same data. This |
| 20 |
// may be done by the component itself, however typically it is done by the original sender, after |
| 21 |
// the receiver in the pipeline returns a response to the sender indicating that the Collector is |
| 22 |
// currently overloaded and the request must be retried. |
| 23 |
package consumererror // import "go.opentelemetry.io/collector/consumer/consumererror" |