Skip to content

Self-observability: Allow receivers to report partial success #14440

@dashpole

Description

@dashpole

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:

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
}
. In the Prometheus receiver, we would like to be able to record "translation failures" using standard collector metrics, instead of inventing our own: open-telemetry/opentelemetry-collector-contrib#45233 (review)

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions