Set the dataSourceName as remoteServiceName in TracingListenerStrategy
Closed this issue · 4 comments
Right now, in our Spring Sleuth Configuration you are using the dataSourceName
in TracingListenerStrategy.beforeGetConnection
only in the span name, but if you would also call connectionSpan.setRemoteServiceName(dataSourceName)
then then database name would be sent to Zipkin as well and the database then would also be shown in the dependencies-view of Zipkin.
Same would need to be done in beforeQuery
and beforeResultSetNext
This is how the brave-instrumentation library does exactly that job: https://github.com/openzipkin/brave/blob/master/instrumentation/p6spy/src/main/java/brave/p6spy/TracingJdbcEventListener.java#L118
Thank you for suggestion, I will make the change.
Does it make sense to set it for statement
and fetch
spans as well?
I would say so, yes.
Thanks for your quick response!
@klu2 released in 1.7.1
awesome, thanks!