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

Impossible to provide executor for scheduler for TelemetryClient #298

Open
clayly opened this issue Jul 22, 2022 · 5 comments
Open

Impossible to provide executor for scheduler for TelemetryClient #298

clayly opened this issue Jul 22, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@clayly
Copy link

clayly commented Jul 22, 2022

User can provide Dispatcher(ExecutorService) to OkHttpClient, but TelemetryClient forcibly creates another one with Executors.newSingleThreadScheduledExecutor in constructor.

(Migrate to Jira)

@kford-newrelic
Copy link

@clayly thanks for letting us know about this issue but can you provide a bit more detail? What's the impact of the issue for you (eg: are you not able to generate telemetry for your application, etc?

Any chance you have a sample app/code that demonstrates the problem you're encountering?

@clayly
Copy link
Author

clayly commented Aug 1, 2022

Hi! Issue is performance and predictability / uniformity:

  1. Performance: if it's possible better reuse threads via thread pool, especially in something like k8s and reactive applications. If for example all you want in your library is tasks scheduling then there is no reason to own a whole thread.
  2. Predictability / uniformity: user already can provide ExecutorService to client, but third-party threads are created anyway, which is unpredictable by itself.

@clayly
Copy link
Author

clayly commented Aug 1, 2022

@kford-newrelic mention just in case!

@kford-newrelic kford-newrelic added the enhancement New feature or request label Aug 31, 2022
@kford-newrelic
Copy link

@clayly thanks for this additional information - we can't commit on if/when we would act on this but our engineers will definitely discuss it (and if you want to submit a PR for this, it certainly wouldn't hurt!)

@kford-newrelic kford-newrelic added this to Triage in Java Engineering Board via automation Sep 8, 2022
@workato-integration
Copy link

@kford-newrelic kford-newrelic removed this from Triage in Java Engineering Board Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants