Skip to content

[OTLP Exporter] Add disk-backed persistent retry for failed exports #4095

@zshuang0316

Description

@zshuang0316

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions