Skip to content

brave.mysql8 Tracing stuck on startup when running a Spring Boot + Wavefront application #34

@odedia

Description

@odedia

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:

docker run --name mariadb -e MYSQL_ROOT_PASSWORD=unix11 -e MYSQL_DATABASE=my_database -p 3306:3306 mariadb:10.3.23

Run the application using:

SPRING_PROFILES_ACTIVE=local mvn spring-boot:run

The app will boot successfully.

Comment line 7 and uncomment line 8 in application-local.properties to add the mysql tracing interceptor:

# spring.datasource.url: jdbc:mysql://localhost:3306/my_database?user=root&password=unix11&useSSL=false
spring.datasource.url: jdbc:mysql://localhost:3306/my_database?user=root&password=unix11&useSSL=false&queryInterceptors=brave.mysql8.TracingQueryInterceptor&exceptionInterceptors=brave.mysql8.TracingExceptionInterceptor&zipkinServiceName=tac_db

Expected Behaviour

App should still boot, however in practice it is now stuck on startup after line 52 of TracingQueryInterceptor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions