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

Exporterhelper: address timeout misalignment w/ context deadline #11198

Closed
wants to merge 3 commits into from

Conversation

jmacd
Copy link
Contributor

@jmacd jmacd commented Sep 17, 2024

Description

Retry sender: if the context deadline will expire before a configured attempt to retry, abort the request. Otherwise, the retry sender will delay until the context timeout happens, which is a predictable waste of resources. Better to return immediately. As for the aborted status code, I could be convinced instead to stop retrying and return the final-retry-attempt's error.

Timeout sender: if the context deadline will expire before the full configured timeout, present two optional new behaviors in addition to the current behavior. The three are:

  • sustain: existing behavior, let a short timeout pass through to the exporter
  • abort: new behavior, do not send a request if the timeout expires after the context deadline
  • ignore: new behavior, send a request with the configured timeout, ignore the context deadline.

Link to tracking issue

Fixes #11183.

Testing

TODO: This is draft for discussion purposes. I have not added or modified existing tests, and I'm aware of stylistic requirements that are not met (e.g., the use of bare string values, vs. use of a constrained value such as configcompression.Type).

Documentation

WIP: DRAFT.

exporter/exporterhelper/retry_sender.go Outdated Show resolved Hide resolved
@jmacd
Copy link
Contributor Author

jmacd commented Oct 1, 2024

@bogdandrutu Thank you. I will work the rest of this PR and add tests.

@jmacd jmacd marked this pull request as ready for review October 2, 2024 18:21
@jmacd jmacd requested a review from a team as a code owner October 2, 2024 18:21
@jmacd jmacd requested a review from songy23 October 2, 2024 18:21
@jmacd jmacd marked this pull request as draft October 2, 2024 18:21
@jmacd jmacd closed this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exporterhelper does not respect context deadlines
2 participants