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
Customizable thread names for JolokiaServer/JolokiaServerConfig #367
Comments
Sound like a very good idea. Fancy for doing a PR ? (i'm a bit loaded these days) |
If I do just one of those options, I'm thinking "threadNamePrefix" as it's the most straightforward to implement. Sound reasonable? |
"threadNamePrefix" sounds fine to me. |
I have since switched to a different project that does not use Jolokia. It will therefore be unlikely that I will find the time to make this improvement in the near future. |
…ia#367 Updating spring jolokia-config schema.
…ia#367 Applied suggested changes by Roland.
…Server-367 Customizable thread names for JolokiaServer/JolokiaServerConfig #367
@rhuss — Looks like this was implemented back in 2018 and thus can be closed, correct? |
yep. thanks for the heads up, stay safe ... |
It would be useful to be able to configure the thread names of threads created by the Jolokia server. That way if the application is logging thread names, it'll be obvious which threads were from Jolokia server requests. For instance, in my app I might want to have the threads named "jolokia-1", "jolokia-2", ... instead of the Java default "Thread-1", "Thread-2", ...
This could be solved by adding a "threadNamePrefix" or "threadNameFormat" option to the JolokiaServerConfig.
Alternatively, if there was a way to specify the Executor or ThreadFactory used by the the HttpServer, the user could customize it to set whatever name they wanted.
The current workaround to achieve this is to create a JolokiaServer with a manually created HttpServer, rather than letting Jolokia create the server. In addition to the additional code and potential inconsistency of manually configuring an HttpServer, it also means that it cannot be used with jolokia-spring's SpringJolokiaAgent, as that uses the default server created by JolokiaServer.
Example of APIs in other frameworks that have this sort of behavior:
The text was updated successfully, but these errors were encountered: