提交 4215fc62 编写于 作者: L lytscu

comments

上级 96633124
......@@ -37,8 +37,11 @@ import org.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptR
import org.skywalking.apm.network.trace.component.ComponentsDefine;
/**
* {@link MongoDBCollectionMethodInterceptor} intercept {@link com.mongodb.DBCollectionImpl}{@link com.mongodb.DBCollection}class,
* create the exit span when the client call the interceptor methods.
* {@link MongoDBCollectionMethodInterceptor}create the exit span when the client call the interceptor methods.
* <p>
* {@link MongoDBCollectionMethodInterceptor} intercept constructor of {@link com.mongodb.DBCollection}or {@link com.mongodb.DBCollectionImpl} for
* record the ServerAddress.
*
*/
public class MongoDBCollectionMethodInterceptor implements InstanceMethodsAroundInterceptor, InstanceConstructorInterceptor {
......
......@@ -204,7 +204,7 @@ public class MongoDBMethodInterceptor implements InstanceMethodsAroundIntercepto
ServerAddress address = description.getAddress();
peers.append(address.getHost() + ":" + address.getPort() + ";");
}
objInst.setSkyWalkingDynamicField(peers.subSequence(0, peers.length() - 1).toString());
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册