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

Add sampling to the exceptions without stack traces. #2105

Closed
trustin opened this issue Sep 23, 2019 · 2 comments
Closed

Add sampling to the exceptions without stack traces. #2105

trustin opened this issue Sep 23, 2019 · 2 comments
Milestone

Comments

@trustin
Copy link
Member

trustin commented Sep 23, 2019

In production, it is currently recommended to run Armeria servers with the verboseExceptions flag disabled to reduce the overhead of Throwable.fillInStackTrace(). However, this makes it hard for users to determine the root cause of the exceptions such as ResponseTimeoutException or AbortedStreamException.

Instead of choosing between all or nothing, we could define some expression for defining a Sampler, e.t. random=0.1 or rateLimited=1

@trustin
Copy link
Member Author

trustin commented Sep 23, 2019

The sensible default would be like rateLimited=10 which allows 10 fillInStackTrace() a second.

edit: I guess we will need some benchmark to determine the default rate which does not increase the total overhead more than 1%.

@trustin trustin added this to the 0.93.0 milestone Sep 24, 2019
trustin added a commit to trustin/armeria that referenced this issue Sep 24, 2019
Motivation:

Like we can specify a string to instantiate a `Backoff`, we could also
specify a specification string to instantiate a `Sampler`, which will be
useful when sampling policy must be configurable.

Modifications:

- Add `Sampler.of()`
- Miscellaneous:
  - Minor documentation clean-up of `Backoff.of()`

Result:

- A user can create a `Sampler` from a specification string, which means
  sampling policy settings can be configurable from a configuration
  file, a system property or other external sources.
- Can start to work on line#2105
trustin added a commit that referenced this issue Sep 25, 2019
Motivation:

Like we can specify a string to instantiate a `Backoff`, we could also
specify a specification string to instantiate a `Sampler`, which will be
useful when sampling policy must be configurable.

Modifications:

- Add `Sampler.of()`
- Miscellaneous:
  - Minor documentation clean-up of `Backoff.of()`

Result:

- A user can create a `Sampler` from a specification string, which means
  sampling policy settings can be configurable from a configuration
  file, a system property or other external sources.
- Can start to work on #2105
@trustin
Copy link
Member Author

trustin commented Sep 25, 2019

Closed via #2111

@trustin trustin closed this as completed Sep 25, 2019
eugene70 pushed a commit to eugene70/armeria that referenced this issue Oct 16, 2019
Motivation:

Like we can specify a string to instantiate a `Backoff`, we could also
specify a specification string to instantiate a `Sampler`, which will be
useful when sampling policy must be configurable.

Modifications:

- Add `Sampler.of()`
- Miscellaneous:
  - Minor documentation clean-up of `Backoff.of()`

Result:

- A user can create a `Sampler` from a specification string, which means
  sampling policy settings can be configurable from a configuration
  file, a system property or other external sources.
- Can start to work on line#2105
fmguerreiro pushed a commit to fmguerreiro/armeria that referenced this issue Sep 19, 2020
Motivation:

Like we can specify a string to instantiate a `Backoff`, we could also
specify a specification string to instantiate a `Sampler`, which will be
useful when sampling policy must be configurable.

Modifications:

- Add `Sampler.of()`
- Miscellaneous:
  - Minor documentation clean-up of `Backoff.of()`

Result:

- A user can create a `Sampler` from a specification string, which means
  sampling policy settings can be configurable from a configuration
  file, a system property or other external sources.
- Can start to work on line#2105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant