Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
carsonip opened this issue Apr 12, 2024 · 7 comments · Fixed by #35571
Closed

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

carsonip opened this issue Apr 12, 2024 · 7 comments · Fixed by #35571

Comments

@carsonip
Copy link
Contributor

carsonip commented Apr 12, 2024

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

@carsonip carsonip added bug Something isn't working needs triage New item requiring triage labels Apr 12, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@JaredTan95 JaredTan95 added enhancement New feature or request and removed bug Something isn't working needs triage New item requiring triage labels Apr 14, 2024
@JaredTan95
Copy link
Member

Nice catch. Would you be interested in trying to clarify it?

@carsonip
Copy link
Contributor Author

carsonip commented Apr 15, 2024

The scope of this issue is larger than a documentation fix.

Ideally I would like to either

  • modify the existing retry.max_requests behavior, which is a "breaking change" if existing users rely on the behavior. But if it is seen as a bug given the unintuitive behavior and inconsistency with docs, then it can be called a bugfix.
  • (the complete solution) deprecate retry.max_requests and introduce e.g. retry.max_retries with a more intuitive behavior

Either way, docs will need to be updated.

Would like the community's and the maintainers' @JaredTan95 @ycombinator views on this

@carsonip carsonip changed the title [exporter/elasticsearch] Clarify retry.max_requests behavior [exporter/elasticsearch] Clarify and decide retry.max_requests behavior Apr 15, 2024
@ycombinator
Copy link
Contributor

(the complete solution) deprecate retry.max_requests and introduce e.g. retry.max_retries with a more intuitive behavior

I'm in favor of this option. @JaredTan95 WDYT?

Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Jun 24, 2024
@andrzej-stencel
Copy link
Member

I 💯 agree that deprecating max_requests (without changing its behavior) and introducing a new option max_retries is the way to go. The name max_requests would be misleading even if we added documentation on it. The name max_retries is much better as even without documentation it is clear how it works.

@github-actions github-actions bot removed the Stale label Jul 11, 2024
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Sep 10, 2024
andrzej-stencel pushed a commit that referenced this issue Oct 17, 2024
…try::max_retries (#35571)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
The new retry::max_retries will be exactly retry::max_requests - 1, but
it will be much more intuitive to the end user. Deprecate
retry::max_requests.

**Link to tracking Issue:** <Issue number if applicable>
Fixes #32344

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
sbylica-splunk pushed a commit to sbylica-splunk/opentelemetry-collector-contrib that referenced this issue Dec 17, 2024
…try::max_retries (open-telemetry#35571)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
The new retry::max_retries will be exactly retry::max_requests - 1, but
it will be much more intuitive to the end user. Deprecate
retry::max_requests.

**Link to tracking Issue:** <Issue number if applicable>
Fixes open-telemetry#32344

**Testing:** <Describe what testing was performed and which tests were
added.>

**Documentation:** <Describe the documentation added.>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants