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

Confusing timeout setting options #2262

Closed
rakyll opened this issue Dec 7, 2020 · 9 comments
Closed

Confusing timeout setting options #2262

rakyll opened this issue Dec 7, 2020 · 9 comments
Assignees
Labels

Comments

@rakyll
Copy link
Contributor

rakyll commented Dec 7, 2020

There are two settings types that allows users to set a timeout and these are not orthogonal.

TimeoutSettings.Timeout
RetrySettings.MaxElapsedTime

It's not clear which one should be taken into account if two conflicting settings are provided. Instead of providing two settings, is it possible to remove RetrySettings.MaxElapsedTime?

@rakyll rakyll added the bug Something isn't working label Dec 7, 2020
@pkositsyn
Copy link
Contributor

From exporterhelper README:

max_elapsed_time (default = 120s): Is the maximum amount of time spent trying to send a batch; ignored if enabled is false

These are totally orthogonal settings. Max elapsed time includes time taken for retries and waiting for retries.

@pkositsyn
Copy link
Contributor

Clearly, max_elapsed_time must be greater than timeout. Do you think that documentation isn't obvious on that?

@rakyll
Copy link
Contributor Author

rakyll commented Dec 7, 2020

@pkositsyn I think what's not clear to users whether max_elapsed_time overrides timeout. If yes, why would we expect users to use a new setting (max_elapsed_time) rather than modifying the timeout?

@pkositsyn
Copy link
Contributor

pkositsyn commented Dec 7, 2020

@rakyll I don't understand - these are two totally different things
If max_elapsed_time is less than timeout - that means just no retries and this should be replaced by disable of retries.
Otherwise the flow is the following: (1st try) timeout - wait interval time - (2nd try) timeout - wait interval time - ... - max elapsed time - the payload is lost.

@tigrannajaryan
Copy link
Member

These are different settings. Need to clarify docs. Reduced priority since not a functionality bug and it works as expected.

@flands
Copy link
Contributor

flands commented Feb 21, 2021

@rakyll I took a quick look at this to see what could be done to clarify the docs. Given timeout and max_elapsed_time are different things, it is unclear how to proceed. timeout refers to an individual attempt to export data (could be the original attempt or a retry attempt), while max_elapsed_time is checked on every retry -- if on a retry check this value is exceeded, retries will no longer be attempted. In theory, max_elapsed_time could be less than timeout and that could be a valid configuration -- for example, if the attempt to export fails and returns a retriable error immediately. Given the checks happen at different times and for different reasons, I could not think of a way to improve the docs. Do you have any suggestions to address this issue?

@pkositsyn
Copy link
Contributor

@flands could you clarify, what difference is between "retries are disabled" and "max_elapsed_time is less than timeout"? In my opinion, they are interchangeable and actually it is reasonable to update the docs so that the first option of these two should be chosen

@rakyll
Copy link
Contributor Author

rakyll commented Feb 22, 2021

@flands If you clarify the doc with what you said in this issue, that'd help. The current description doesn't capture:

  • timeout is scoped to an individual request in a batch. It calls out the "individual" without mentioning it's an individual in a retry series.
  • max_elapsed_time is the timeout for the entire export attempt including retries.
  • And as @pkositsyn says, what happens if max_elapsed_time is less than timeout? Is it valid configuration?

flands added a commit to flands/opentelemetry-collector that referenced this issue Feb 27, 2021
@flands
Copy link
Contributor

flands commented Mar 1, 2021

@rakyll @pkositsyn please see the PR and let me know what you think

@tigrannajaryan tigrannajaryan removed the release:required-for-ga Must be resolved before GA release label Mar 16, 2021
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this issue Nov 11, 2021
…ptracegrpc (open-telemetry#2262)

* Bump google.golang.org/grpc in /example/otel-collector

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc in /exporters/otlp/otlpmetric/otlpmetricgrpc

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc in /exporters/otlp/otlptrace/otlptracegrpc

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc in /exporters/otlp/otlpmetric

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump google.golang.org/grpc in /exporters/otlp/otlptrace

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

* go.sum/mod updates

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants