diff --git a/pom.xml b/pom.xml index befe21708..f6fe5948d 100644 --- a/pom.xml +++ b/pom.xml @@ -125,6 +125,10 @@ org.springframework.cloud spring-cloud-starter-sleuth + + io.zipkin.brave + brave-instrumentation-mysql8 + org.springframework.boot diff --git a/src/main/resources/application-mysql.properties b/src/main/resources/application-mysql.properties index d388c9e6d..f57245964 100644 --- a/src/main/resources/application-mysql.properties +++ b/src/main/resources/application-mysql.properties @@ -1,6 +1,6 @@ # database init, supports mysql too database=mysql -spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/petclinic} +spring.datasource.url=${MYSQL_URL:jdbc:mysql://localhost/petclinic?serverTimezone=UTC&queryInterceptors=brave.mysql8.TracingQueryInterceptor&exceptionInterceptors=brave.mysql8.TracingExceptionInterceptor} spring.datasource.username=${MYSQL_USER:petclinic} spring.datasource.password=${MYSQL_PASS:petclinic} # SQL is written to be idempotent so this is safe