Skip to content

Set the dataSourceName as remoteServiceName in TracingListenerStrategy #59

@klu2

Description

@klu2

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions