You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a Spring Boot application contains brave mysql8 tracing plus Spring Cloud Sleuth and Wavefront dependencies, it causes the application to freeze on startup after the HikariCP pool is being created. Specifically at line 52 of TracingQueryInterceptor.
It is unlikely that the solution to this will end up in this repo. as brave implements a mysql interceptor and isn't doing anything around connection management or configuration.
Found the root cause - the startup is stuck when no default Sampler bean is defined. It occurs in the isSampled() method. Fixed by adding the following to a @Configuration class (for example):
@Bean
public Sampler defaultSampler() {
return Sampler.ALWAYS_SAMPLE;
}
Describe the Bug
When a Spring Boot application contains brave mysql8 tracing plus Spring Cloud Sleuth and Wavefront dependencies, it causes the application to freeze on startup after the HikariCP pool is being created. Specifically at line 52 of TracingQueryInterceptor.
Steps to Reproduce
Steps to reproduce the behavior:
Clone this simple repo: https://github.com/odedia/todo-service
Start a local mariabdb docker container:
Run the application using:
The app will boot successfully.
Comment line 7 and uncomment line 8 in
application-local.properties
to add the mysql tracing interceptor:Expected Behaviour
App should still boot, however in practice it is now stuck on startup after line 52 of TracingQueryInterceptor.
The text was updated successfully, but these errors were encountered: