Skip to content

[exporter/elasticsearch] Clarify and decide retry.max_requests behavior #32344

@carsonip

Description

@carsonip

Component(s)

exporter/elasticsearch

What happened?

Description

Discovered while working on #32323

Docs (code comments, README) do not clearly reflect the meaning of retry.max_requests, as in practice it counts the initial publishing attempt as well. Therefore, max_requests=1 means retry is disabled, which is a little counter intuitive.

We should either fix the documentation to align with implementation, or fix the implementation to make it more intuitive. The issue with fixing the implementation is that it is a breaking change for existing users.

Either way, docs need to be updated such that it is clear that the same retry value is used for both HTTP retries and per-document retries, and as a result the total attempts can be greater than max_requests.

Steps to Reproduce

set retry.max_requests=1, get a per-document 429 from ES

Expected Result

the document is retried once

Actual Result

the document is not retried

Collector version

0.97.0

Environment information

No response

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions