Skip to content

Allow configuring retryable status codes #14228

@CmdrSharp

Description

@CmdrSharp

Component(s)

exporter/otlphttp

Is your feature request related to a problem? Please describe.

The current logic (https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/otlphttpexporter/otlp.go#L225-L227) makes sense for an OTel Collector run as an actual collector, however many run OTel Collector in a "gateway" mode to perhaps do certain processing before exporting to the backend.

In scenarios like these, a response like 429 (which for Loki would mean tenant limits are exceeded) are often not a retryable event, and should not be enqueued. There is currently no way to configure this however - a 429 will always (as long as retry_on_failure is enabled) cause a retry.

Describe the solution you'd like

I suggest adding the ability to configure either:

  • A list of status codes that should cause a retry
  • A list of status codes that should NOT cause a retry

Describe alternatives you've considered

No response

Additional context

No response

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