Commit 96633124 authored by lytscu's avatar lytscu
Browse files

comments

parent 726d1d6b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -37,7 +37,8 @@ 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
 * {@link MongoDBCollectionMethodInterceptor} intercept {@link com.mongodb.DBCollectionImpl}{@link com.mongodb.DBCollection}class,
 * create the exit span when the client call the interceptor methods.
 */

public class MongoDBCollectionMethodInterceptor implements InstanceMethodsAroundInterceptor, InstanceConstructorInterceptor {
+0 −3
Original line number Diff line number Diff line
@@ -86,9 +86,6 @@ public class MongoDBCollectionInstrumentation extends ClassInstanceMethodsEnhanc
                    return named("findAndModify").and(takesArguments(9));
                }
            },
            /**
             *Involved db_command operation
            */
            new InterceptPoint() {
                @Override
                public ElementMatcher<MethodDescription> getMethodsMatcher() {
+1 −0
Original line number Diff line number Diff line
@@ -204,6 +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());
    }
}