This commit is contained in:
lytscu 2017-11-16 20:04:46 +08:00
parent 484d43cbf7
commit 1182e8a9bf
3 changed files with 3 additions and 2 deletions

View File

@ -94,6 +94,7 @@ public class MongoDBCollectionMethodInterceptor implements InstanceMethodsAround
for (ServerAddress address : servers) {
peers.append(address.getHost() + ":" + address.getPort() + ";");
}
objInst.setSkyWalkingDynamicField(peers.subSequence(0, peers.length() - 1).toString());
}

View File

@ -32,7 +32,7 @@ import static org.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
/**
* {@link MongoDBCollectionImplInstrumentation} presents that skywalking intercepts {@link
* com.mongodb.DBCollection#find()}, {@link com.mongodb.DBCollection#mapReduce} by using {@link
* com.mongodb.DBCollection#find()}, {@link com.mongodb.DBCollection#createIndex} by using {@link
* MongoDBCollectionMethodInterceptor}.
*/
public class MongoDBCollectionImplInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {

View File

@ -32,7 +32,7 @@ import static org.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMat
import static org.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
/**
* {@link MongoDBCollectionInstrumentation} presents that skywalking intercepts {@link com.mongodb.DBCollection#find()},
* {@link MongoDBCollectionInstrumentation} presents that skywalking intercepts {@link com.mongodb.DBCollection#getCount()},
* {@link com.mongodb.DBCollection#mapReduce} by using {@link MongoDBCollectionMethodInterceptor}.
*/
public class MongoDBCollectionInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {