-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Component(s)
receiver/receiverhelper
Is your feature request related to a problem? Please describe.
The receiverhelper self-observability for receivers currently assumes that if an error occurred, then the entire batch fails:
opentelemetry-collector/receiver/receiverhelper/obsreport.go
Lines 184 to 196 in 8ba3ae3
| if err != nil { | |
| numAccepted = 0 | |
| // If gate is enabled, we distinguish between refused and failed. | |
| if NewReceiverMetricsGate.IsEnabled() { | |
| if consumererror.IsDownstream(err) { | |
| numRefused = numReceivedItems | |
| } else { | |
| numFailedErrors = numReceivedItems | |
| } | |
| } else { | |
| // When the gate is disabled, all errors are considered "refused". | |
| numRefused = numReceivedItems | |
| } |
Describe the solution you'd like
I would like to add a new error type, similar to NewMetrics (for exporters), which allows receivers to pass the elements that the receiver rejected.
I'm not sure if it these should be considered "dropped" or "rejected", but "rejected" seems correct to me.
Describe alternatives you've considered
Add our own metric and track it separately
Additional context
cc @open-telemetry/prometheus-interoperability
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.