'Spring Cloud Sleuth instrumentation constantly prints TODO before/after removeServiceName=
After migrating from Spring Boot 2.3 to 2.6 I have weird behavior in Spring Cloud Sleuth. Instrumentation constantly prints to the console these messages
2022-02-10 11:59:46.804 INFO [SERVICE,4b9b266d4e1cf475,0bd79e17d007e0ce] 6412 --- [nio-8890-exec-6] o.s.c.s.i.jdbc.TraceListenerStrategy : TODO before removeServiceName=serviceDataSource
2022-02-10 11:59:46.804 INFO [SERVICE,4b9b266d4e1cf475,0bd79e17d007e0ce] 6412 --- [nio-8890-exec-6] o.s.c.s.i.jdbc.TraceListenerStrategy : TODO after removeServiceName=serviceDataSource
I have found this snippet code in Spring Cloud Sleuth source code
void afterGetConnection(CON connectionKey, @Nullable Connection connection, String dataSourceName,
@Nullable Throwable t) {
if (log.isTraceEnabled()) {
log.trace("After get connection [" + connectionKey + "]. Current span is [" + tracer.currentSpan() + "]");
}
ConnectionInfo connectionInfo = this.openConnections.get(connectionKey);
SpanAndScope connectionSpan = connectionInfo.span;
if (connection != null) {
log.info("TODO before removeServiceName=" + connectionInfo.remoteServiceName);
parseAndSetServerIpAndPort(connectionInfo, connection, dataSourceName);
log.info("TODO after removeServiceName=" + connectionInfo.remoteServiceName);
if (connectionSpan != null) {
connectionSpan.getSpan().remoteServiceName(connectionInfo.remoteServiceName);
connectionSpan.getSpan().remoteIpAndPort(connectionInfo.url.getHost(), connectionInfo.url.getPort());
}
}
Is this correct behavior? how to disable these messages? Or something is wrong with my database connection or Spring Cloud Sleuth after migration?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
