open-telemetry / open-telemetry/opentelemetry-cpp
[OTLP Exporter] Add disk-backed persistent retry for failed exports
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 632
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 75
Description
Before opening a feature request against this repo, consider whether the feature should/could be implemented in the other OpenTelemetry client libraries. If so, please open an issue on opentelemetry-specification first.
Is your feature request related to a problem?
When the OTLP HTTP exporter exhausts its in-memory retry attempts (controlled by retry_policy_max_attempts), telemetry data is silently dropped. In environments with intermittent connectivity or transient collector outages, this leads to permanent data loss with no recovery path.
Describe the solution you'd like
Add a disk-backed persistent retry mechanism to the OTLP HTTP exporter (and optionally gRPC), similar to what https://github.com/open-telemetry/opentelemetry-dotnet/blob/d2549cb27101bacd68deea0c7782e4c23f252983/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md?plain=1#L661:
- When an export fails after all in-memory retries, serialize the protobuf ExportTraceServiceRequest (or metrics/logs
equivalent) to a file in a configurable directory. - A background thread periodically scans that directory and retries sending persisted payloads.
- Successfully exported files are deleted; files exceeding a configurable age or count are pruned to bound disk usage.
Describe alternatives you've considered
Which alternative solutions or features have you considered?
Additional context
Add any other context about the feature request here.
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the OTLP HTTP exporter and its retry_policy_max_attempts handling; check whether the existing exporter supports equivalent gRPC behavior. Define the design around serializing failed protobuf export requests, scanning a configurable directory, deleting successful files, and pruning by age or count, then add coverage for persistence and recovery.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- distributed-systems, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100