open-telemetry / open-telemetry/opentelemetry-python-contrib

Add configurable retries with backoff to Prometheus Remote Write exporter

Open
#3,985 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
Python
Stars
1.1k
Forks
1.1k
Avg merge
4d 15h
Merged PRs (30d)
16

Description

What problem do you want to solve?

Remote Write pushes are currently fail-fast: transient 429/5xx/network blips drop metric batches without retry or backpressure. That causes silent data loss during throttling or short outages.

Describe the solution you'd like

Add a configurable retry policy to the exporter: max attempts, exponential backoff with jitter, and a retryable status list (e.g., 429/408/5xx plus connection/timeouts). Log retry decisions and final failures. Defaults can be modest (e.g., 3 retries, small backoff) with max_retries=0 to disable.

Describe alternatives you've considered

Accept drops on error (current behavior): loses data during transient issues.
Rely on external queues/proxies: adds operational overhead and still needs exporter-side retries.
Push retry logic to remote endpoints: not always possible; exporters should be polite and back off themselves.

Additional Context

No response

Would you like to implement a fix?

Yes

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Prometheus Remote Write exporter and the code path that sends metric batches. Review how failures are currently handled, then identify the relevant tests or add coverage for retry limits, backoff, retryable responses, logging, and disabled retries; done means transient failures follow the configured policy without dropping batches unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.