use of org.apache.skywalking.apm.plugin.jdbc.trace.ConnectionInfo in project incubator-skywalking by apache.
the class ConnectionServiceMethodInterceptor method beforeMethod.
@Override
public final void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, MethodInterceptResult result) throws Throwable {
ConnectionInfo connectInfo = (ConnectionInfo) objInst.getSkyWalkingDynamicField();
AbstractSpan span = ContextManager.createExitSpan(connectInfo.getDBType() + "/JDBI/Connection/" + method.getName(), connectInfo.getDatabasePeer());
Tags.DB_TYPE.set(span, "sql");
Tags.DB_INSTANCE.set(span, connectInfo.getDatabaseName());
Tags.DB_STATEMENT.set(span, "");
span.setComponent(connectInfo.getComponent());
SpanLayer.asDB(span);
}
Aggregations