You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/01/05 07:48:51 UTC
[GitHub] [skywalking] dengliming opened a new pull request #4173: Support
plugin for mongodb v3.6.x
dengliming opened a new pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173
Please answer these questions before submitting pull request
- Why submit this pull request?
- [ ] Bug fix
- [ ] New feature provided
- [ ] Improve performance
- Related issues
___
### Bug fix
- Bug description.
- How to fix?
___
### New feature or improvement
- Describe the details and related test reports.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363077575
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
If that method is not existing in other versions, it is safe. If they have different behaviors in different versions, then you need witness class.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363080080
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBOperationExecutorInstrumentation.java
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.HierarchyMatch;
+
+/**
+ * intercepts the following methods that the class which implements {@code com.mongodb.OperationExecutor}
+ *
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBOperationExecutorInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.OperationExecutor";
+ private static final String METHOD_NAME = "execute";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBOperationExecutorInterceptor";
+
+ @Override
+ protected ClassMatch enhanceClass() {
+ return HierarchyMatch.byHierarchyMatch(new String[]{ENHANCE_CLASS});
+ }
+
+ @Override
+ public ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
+ return new ConstructorInterceptPoint[0];
+ }
+
+ @Override
+ public InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
+ return new InstanceMethodsInterceptPoint[]{new InstanceMethodsInterceptPoint() {
+ @Override
+ public ElementMatcher<MethodDescription> getMethodsMatcher() {
+ return ElementMatchers
+ // 3.6.x
+ .named(METHOD_NAME);
Review comment:
I've adjusted the MongoDB test case versions.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wayilau commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wayilau commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363144273
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBOperationExecutorInstrumentation.java
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.HierarchyMatch;
+
+/**
+ * intercepts the following methods that the class which implements {@code com.mongodb.OperationExecutor}
+ *
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBOperationExecutorInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.OperationExecutor";
+ private static final String METHOD_NAME = "execute";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBOperationExecutorInterceptor";
+
+ @Override
+ protected ClassMatch enhanceClass() {
+ return HierarchyMatch.byHierarchyMatch(new String[]{ENHANCE_CLASS});
+ }
+
+ @Override
+ public ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
+ return new ConstructorInterceptPoint[0];
+ }
+
+ @Override
+ public InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
+ return new InstanceMethodsInterceptPoint[]{new InstanceMethodsInterceptPoint() {
+ @Override
+ public ElementMatcher<MethodDescription> getMethodsMatcher() {
+ return ElementMatchers
+ // 3.6.x
+ .named(METHOD_NAME);
Review comment:
You should adjust tests cases, i think. @dengliming
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363077227
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
> I don't look carefully yet, I think there is missing `WITNESS_CLASS`?
I can't find a class that can be witnessed for now,But "createOperationExecutor" this method it is called in 3.6
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363076522
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
Yes, I think it is same treatment code, If special treatment is needed, I will move it to new package.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> Merging [#4173](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/23b15e645bf30b29281aa34e6f37322941cae558?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
==========================================
+ Coverage 26.82% 26.84% +0.01%
==========================================
Files 1163 1163
Lines 25428 25428
Branches 3691 3691
==========================================
+ Hits 6820 6825 +5
+ Misses 18000 17993 -7
- Partials 608 610 +2
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...walking/apm/agent/core/context/TracingContext.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvY29udGV4dC9UcmFjaW5nQ29udGV4dC5qYXZh) | `58.2% <0%> (-0.5%)` | :arrow_down: |
| [...apm/agent/core/remote/GRPCStreamServiceStatus.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvcmVtb3RlL0dSUENTdHJlYW1TZXJ2aWNlU3RhdHVzLmphdmE=) | `54.16% <0%> (+25%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [23b15e6...6c0d4b9](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363079378
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
Conflict should be reviewed from codes level, rather than guess or through tests. The tests wouldn't cover all cases. If you found out instrumentation definition will trigger conflict, then witness class is required.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on issue #4173: Support plugin for
mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570887688
FYI @scolia
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363095827
##########
File path: docs/en/setup/service-agent/java-agent/Supported-list.md
##########
@@ -52,7 +52,7 @@
* [Jedis](https://github.com/xetorthio/jedis) 2.x
* [Redisson](https://github.com/redisson/redisson) Easy Java Redis client 3.5.2+
* [Lettuce](https://github.com/lettuce-io/lettuce-core) 5.x
- * [MongoDB Java Driver](https://github.com/mongodb/mongo-java-driver) 2.13-2.14, 3.4.0-3.5.0, 3.7.x-3.11.1
+ * [MongoDB Java Driver](https://github.com/mongodb/mongo-java-driver) 2.13-2.14, 3.4.0-3.5.0, 3.6.0-3.6.4, 3.7.x-3.11.1
Review comment:
I think this should be 3.4 - 3.11 ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363343504
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
I added witness class “com.mongodb.client.model.changestream.ChangeStreamDocument” for v3.6, This class only exist in version: 3.6.x or higher, This can solve the possible conflicts between V3.0.x-3.5.x and v3.6.x .(I think). See. https://mongodb.github.io/mongo-java-driver/3.6/whats-new/ @wu-sheng @dmsolr
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@f181f7b`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
=========================================
Coverage ? 26.76%
=========================================
Files ? 1163
Lines ? 25428
Branches ? 3691
=========================================
Hits ? 6807
Misses ? 18015
Partials ? 606
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [f181f7b...5b94b42](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wayilau commented on issue #4173: Support plugin for
mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wayilau commented on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-571442810
tests failed several times. @wu-sheng @dmsolr
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363096678
##########
File path: docs/en/setup/service-agent/java-agent/Supported-list.md
##########
@@ -52,7 +52,7 @@
* [Jedis](https://github.com/xetorthio/jedis) 2.x
* [Redisson](https://github.com/redisson/redisson) Easy Java Redis client 3.5.2+
* [Lettuce](https://github.com/lettuce-io/lettuce-core) 5.x
- * [MongoDB Java Driver](https://github.com/mongodb/mongo-java-driver) 2.13-2.14, 3.4.0-3.5.0, 3.7.x-3.11.1
+ * [MongoDB Java Driver](https://github.com/mongodb/mongo-java-driver) 2.13-2.14, 3.4.0-3.5.0, 3.6.0-3.6.4, 3.7.x-3.11.1
Review comment:
Thanks for your reviewed,I have resubmitted it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363076791
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBOperationExecutorInstrumentation.java
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.HierarchyMatch;
+
+/**
+ * intercepts the following methods that the class which implements {@code com.mongodb.OperationExecutor}
+ *
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBOperationExecutorInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.OperationExecutor";
+ private static final String METHOD_NAME = "execute";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBOperationExecutorInterceptor";
+
+ @Override
+ protected ClassMatch enhanceClass() {
+ return HierarchyMatch.byHierarchyMatch(new String[]{ENHANCE_CLASS});
+ }
+
+ @Override
+ public ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
+ return new ConstructorInterceptPoint[0];
+ }
+
+ @Override
+ public InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
+ return new InstanceMethodsInterceptPoint[]{new InstanceMethodsInterceptPoint() {
+ @Override
+ public ElementMatcher<MethodDescription> getMethodsMatcher() {
+ return ElementMatchers
+ // 3.6.x
+ .named(METHOD_NAME);
Review comment:
Then please adjust the tests. We need the CI env to check.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363196164
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
Yes, that is.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dmsolr commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dmsolr commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363179151
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
Sorry, I am late.
I notice that `Mongo` has been enhanced by `v30/MongoDBInstrumentation.java`. But they intercepted different methods. PLS, recheck it, maybe we can combine those Interceptor. (I will follow this too)
https://github.com/apache/skywalking/blob/f181f7b4830b05c6812878ccd4b23633163ea39a/apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v30/MongoDBInstrumentation.java#L44-L50
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> Merging [#4173](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/f181f7b4830b05c6812878ccd4b23633163ea39a?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
=======================================
Coverage 26.84% 26.84%
=======================================
Files 1163 1163
Lines 25426 25426
Branches 3691 3691
=======================================
Hits 6826 6826
Misses 17991 17991
Partials 609 609
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [f181f7b...5b94b42](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dmsolr commented on issue #4173: Support plugin for
mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dmsolr commented on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570888045
> [Supported-list.md](https://github.com/apache/skywalking/blob/master/docs/en/setup/service-agent/java-agent/Supported-list.md) also needs to be updated.
Yes. Besides this, we need to provide the Plugin-Test case. But it is easy.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> Merging [#4173](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/3440947bb161ab724a1ec3697143a5839696bedc?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
==========================================
- Coverage 26.84% 26.84% -0.01%
==========================================
Files 1163 1163
Lines 25428 25428
Branches 3691 3691
==========================================
- Hits 6827 6825 -2
- Misses 17992 17993 +1
- Partials 609 610 +1
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...ache/skywalking/apm/agent/core/jvm/JVMService.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvanZtL0pWTVNlcnZpY2UuamF2YQ==) | `77.04% <0%> (-3.28%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [3440947...6c0d4b9](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363075808
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
A v37 interceptor for v36?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363194871
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
Removing witness class is very dangerous, needs a little more deep dive. Because the old versions require that, then, it should have reasons.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> Merging [#4173](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/23b15e645bf30b29281aa34e6f37322941cae558?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
==========================================
+ Coverage 26.82% 26.84% +0.01%
==========================================
Files 1163 1163
Lines 25428 25428
Branches 3691 3691
==========================================
+ Hits 6820 6825 +5
+ Misses 18000 17993 -7
- Partials 608 610 +2
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...walking/apm/agent/core/context/TracingContext.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvY29udGV4dC9UcmFjaW5nQ29udGV4dC5qYXZh) | `58.2% <0%> (-0.5%)` | :arrow_down: |
| [...apm/agent/core/remote/GRPCStreamServiceStatus.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvcmVtb3RlL0dSUENTdHJlYW1TZXJ2aWNlU3RhdHVzLmphdmE=) | `54.16% <0%> (+25%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [23b15e6...10cb508](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on issue #4173: Support plugin for
mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-571444439
>tests failed several times.
Rerun e2e.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363075827
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBOperationExecutorInstrumentation.java
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.HierarchyMatch;
+
+/**
+ * intercepts the following methods that the class which implements {@code com.mongodb.OperationExecutor}
+ *
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBOperationExecutorInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.OperationExecutor";
+ private static final String METHOD_NAME = "execute";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBOperationExecutorInterceptor";
+
+ @Override
+ protected ClassMatch enhanceClass() {
+ return HierarchyMatch.byHierarchyMatch(new String[]{ENHANCE_CLASS});
+ }
+
+ @Override
+ public ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
+ return new ConstructorInterceptPoint[0];
+ }
+
+ @Override
+ public InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
+ return new InstanceMethodsInterceptPoint[]{new InstanceMethodsInterceptPoint() {
+ @Override
+ public ElementMatcher<MethodDescription> getMethodsMatcher() {
+ return ElementMatchers
+ // 3.6.x
+ .named(METHOD_NAME);
Review comment:
Is this name unique in the 3.6?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> Merging [#4173](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/3440947bb161ab724a1ec3697143a5839696bedc?src=pr&el=desc) will **decrease** coverage by `0.07%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
==========================================
- Coverage 26.84% 26.76% -0.08%
==========================================
Files 1163 1163
Lines 25428 25428
Branches 3691 3691
==========================================
- Hits 6827 6807 -20
- Misses 17992 18015 +23
+ Partials 609 606 -3
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...apm/agent/core/remote/GRPCStreamServiceStatus.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvcmVtb3RlL0dSUENTdHJlYW1TZXJ2aWNlU3RhdHVzLmphdmE=) | `29.16% <0%> (-25.01%)` | :arrow_down: |
| [.../core/remote/ServiceAndEndpointRegisterClient.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvcmVtb3RlL1NlcnZpY2VBbmRFbmRwb2ludFJlZ2lzdGVyQ2xpZW50LmphdmE=) | `31.46% <0%> (-13.49%)` | :arrow_down: |
| [...ache/skywalking/apm/agent/core/jvm/JVMService.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvanZtL0pWTVNlcnZpY2UuamF2YQ==) | `77.04% <0%> (-3.28%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [3440947...10cb508](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> Merging [#4173](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/10cb5081217c2df193a4397b92b6d842403f4c30?src=pr&el=desc) will **increase** coverage by `0.04%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
==========================================
+ Coverage 26.76% 26.81% +0.04%
==========================================
Files 1163 1163
Lines 25428 25426 -2
Branches 3691 3691
==========================================
+ Hits 6807 6819 +12
+ Misses 18015 17998 -17
- Partials 606 609 +3
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [.../java/org/apache/skywalking/oal/rt/OALRuntime.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-b2FwLXNlcnZlci9vYWwtcnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvb2FsL3J0L09BTFJ1bnRpbWUuamF2YQ==) | `0% <ø> (ø)` | :arrow_up: |
| [.../core/remote/ServiceAndEndpointRegisterClient.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvcmVtb3RlL1NlcnZpY2VBbmRFbmRwb2ludFJlZ2lzdGVyQ2xpZW50LmphdmE=) | `44.94% <0%> (+13.48%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [10cb508...5b94b42](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363193964
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
But v30/MongoDBInstrumentation.java provided an witness class,It only exist in version: 3.0.x~3.5.x.If we combine those Interceptor,we need to remove the witness class?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dmsolr commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dmsolr commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363194567
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
But the witness class exists in v3.6.x too, right?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> Merging [#4173](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/10cb5081217c2df193a4397b92b6d842403f4c30?src=pr&el=desc) will **increase** coverage by `0.07%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
==========================================
+ Coverage 26.76% 26.84% +0.07%
==========================================
Files 1163 1163
Lines 25428 25426 -2
Branches 3691 3691
==========================================
+ Hits 6807 6826 +19
+ Misses 18015 17991 -24
- Partials 606 609 +3
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [.../java/org/apache/skywalking/oal/rt/OALRuntime.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-b2FwLXNlcnZlci9vYWwtcnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvb2FsL3J0L09BTFJ1bnRpbWUuamF2YQ==) | `0% <ø> (ø)` | :arrow_up: |
| [.../agent/core/context/trace/AbstractTracingSpan.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvY29udGV4dC90cmFjZS9BYnN0cmFjdFRyYWNpbmdTcGFuLmphdmE=) | `61.26% <0%> (+0.9%)` | :arrow_up: |
| [.../core/remote/ServiceAndEndpointRegisterClient.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvcmVtb3RlL1NlcnZpY2VBbmRFbmRwb2ludFJlZ2lzdGVyQ2xpZW50LmphdmE=) | `44.94% <0%> (+13.48%)` | :arrow_up: |
| [...apm/agent/core/remote/GRPCStreamServiceStatus.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvcmVtb3RlL0dSUENTdHJlYW1TZXJ2aWNlU3RhdHVzLmphdmE=) | `54.16% <0%> (+25%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [10cb508...5b94b42](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363080112
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
@dmsolr Which version you tried will conflict,I just tried 3.4.0 works.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363077227
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
> I don't look carefully yet, I think there is missing `WITNESS_CLASS`?
I can't find a class that can be witnessed for now,But "createOperationExecutor" this method it is called in 3.6
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> Merging [#4173](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/3440947bb161ab724a1ec3697143a5839696bedc?src=pr&el=desc) will **decrease** coverage by `0.03%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
==========================================
- Coverage 26.84% 26.81% -0.04%
==========================================
Files 1163 1163
Lines 25428 25428
Branches 3691 3691
==========================================
- Hits 6827 6819 -8
- Misses 17992 18000 +8
Partials 609 609
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...apm/agent/core/remote/GRPCStreamServiceStatus.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvcmVtb3RlL0dSUENTdHJlYW1TZXJ2aWNlU3RhdHVzLmphdmE=) | `29.16% <0%> (-25.01%)` | :arrow_down: |
| [...ache/skywalking/apm/agent/core/jvm/JVMService.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvanZtL0pWTVNlcnZpY2UuamF2YQ==) | `77.04% <0%> (-3.28%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [3440947...6c0d4b9](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363077025
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBOperationExecutorInstrumentation.java
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.HierarchyMatch;
+
+/**
+ * intercepts the following methods that the class which implements {@code com.mongodb.OperationExecutor}
+ *
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBOperationExecutorInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.OperationExecutor";
+ private static final String METHOD_NAME = "execute";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBOperationExecutorInterceptor";
+
+ @Override
+ protected ClassMatch enhanceClass() {
+ return HierarchyMatch.byHierarchyMatch(new String[]{ENHANCE_CLASS});
+ }
+
+ @Override
+ public ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
+ return new ConstructorInterceptPoint[0];
+ }
+
+ @Override
+ public InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
+ return new InstanceMethodsInterceptPoint[]{new InstanceMethodsInterceptPoint() {
+ @Override
+ public ElementMatcher<MethodDescription> getMethodsMatcher() {
+ return ElementMatchers
+ // 3.6.x
+ .named(METHOD_NAME);
Review comment:
I'm doing this for the first time.Would you mind telling me where the test case of this plug-in was written before? I would like to refer to it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> Merging [#4173](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/23b15e645bf30b29281aa34e6f37322941cae558?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
==========================================
+ Coverage 26.82% 26.84% +0.01%
==========================================
Files 1163 1163
Lines 25428 25428
Branches 3691 3691
==========================================
+ Hits 6820 6825 +5
+ Misses 18000 17993 -7
- Partials 608 610 +2
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...walking/apm/agent/core/context/TracingContext.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvY29udGV4dC9UcmFjaW5nQ29udGV4dC5qYXZh) | `58.2% <0%> (-0.5%)` | :arrow_down: |
| [...apm/agent/core/remote/GRPCStreamServiceStatus.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvcmVtb3RlL0dSUENTdHJlYW1TZXJ2aWNlU3RhdHVzLmphdmE=) | `54.16% <0%> (+25%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [23b15e6...6c0d4b9](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on issue #4173: Support plugin
for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570906244
> [Supported-list.md](https://github.com/apache/skywalking/blob/master/docs/en/setup/service-agent/java-agent/Supported-list.md) also needs to be updated.
It has been updated.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dmsolr removed a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dmsolr removed a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570888045
> [Supported-list.md](https://github.com/apache/skywalking/blob/master/docs/en/setup/service-agent/java-agent/Supported-list.md) also needs to be updated.
Yes. Besides this, we need to provide the Plugin-Test case. But it is easy.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on issue #4173: Support plugin
for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570914184
CI AND IT / CI-on-MacOS check fail. @wu-sheng
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dmsolr commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dmsolr commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363078310
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
I conflict with `V3.0.x-3.5.x`, so we need to witness class.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@f181f7b`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
=========================================
Coverage ? 26.76%
=========================================
Files ? 1163
Lines ? 25428
Branches ? 3691
=========================================
Hits ? 6807
Misses ? 18015
Partials ? 606
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [f181f7b...5b94b42](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363076335
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBOperationExecutorInstrumentation.java
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.HierarchyMatch;
+
+/**
+ * intercepts the following methods that the class which implements {@code com.mongodb.OperationExecutor}
+ *
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBOperationExecutorInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.OperationExecutor";
+ private static final String METHOD_NAME = "execute";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBOperationExecutorInterceptor";
+
+ @Override
+ protected ClassMatch enhanceClass() {
+ return HierarchyMatch.byHierarchyMatch(new String[]{ENHANCE_CLASS});
+ }
+
+ @Override
+ public ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
+ return new ConstructorInterceptPoint[0];
+ }
+
+ @Override
+ public InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
+ return new InstanceMethodsInterceptPoint[]{new InstanceMethodsInterceptPoint() {
+ @Override
+ public ElementMatcher<MethodDescription> getMethodsMatcher() {
+ return ElementMatchers
+ // 3.6.x
+ .named(METHOD_NAME);
Review comment:
Yes, I checked in version 3.6.0~3.6.4
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363077116
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBOperationExecutorInstrumentation.java
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.HierarchyMatch;
+
+/**
+ * intercepts the following methods that the class which implements {@code com.mongodb.OperationExecutor}
+ *
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBOperationExecutorInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.OperationExecutor";
+ private static final String METHOD_NAME = "execute";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBOperationExecutorInterceptor";
+
+ @Override
+ protected ClassMatch enhanceClass() {
+ return HierarchyMatch.byHierarchyMatch(new String[]{ENHANCE_CLASS});
+ }
+
+ @Override
+ public ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
+ return new ConstructorInterceptPoint[0];
+ }
+
+ @Override
+ public InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
+ return new InstanceMethodsInterceptPoint[]{new InstanceMethodsInterceptPoint() {
+ @Override
+ public ElementMatcher<MethodDescription> getMethodsMatcher() {
+ return ElementMatchers
+ // 3.6.x
+ .named(METHOD_NAME);
Review comment:
Read document first, https://github.com/apache/skywalking/blob/master/docs/en/guides/Plugin-test.md
Then, the existing MongoDB case is here, https://github.com/apache/skywalking/tree/master/test/plugin/scenarios/mongodb-3.x-scenario
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363150187
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBOperationExecutorInstrumentation.java
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.HierarchyMatch;
+
+/**
+ * intercepts the following methods that the class which implements {@code com.mongodb.OperationExecutor}
+ *
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBOperationExecutorInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.OperationExecutor";
+ private static final String METHOD_NAME = "execute";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBOperationExecutorInterceptor";
+
+ @Override
+ protected ClassMatch enhanceClass() {
+ return HierarchyMatch.byHierarchyMatch(new String[]{ENHANCE_CLASS});
+ }
+
+ @Override
+ public ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
+ return new ConstructorInterceptPoint[0];
+ }
+
+ @Override
+ public InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
+ return new InstanceMethodsInterceptPoint[]{new InstanceMethodsInterceptPoint() {
+ @Override
+ public ElementMatcher<MethodDescription> getMethodsMatcher() {
+ return ElementMatchers
+ // 3.6.x
+ .named(METHOD_NAME);
Review comment:
I will add test cases for version 3.6 in mongodb-3.6.x-scenario later.But the tests also wouldn't cover all cases.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363077265
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBOperationExecutorInstrumentation.java
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.HierarchyMatch;
+
+/**
+ * intercepts the following methods that the class which implements {@code com.mongodb.OperationExecutor}
+ *
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBOperationExecutorInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.OperationExecutor";
+ private static final String METHOD_NAME = "execute";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBOperationExecutorInterceptor";
+
+ @Override
+ protected ClassMatch enhanceClass() {
+ return HierarchyMatch.byHierarchyMatch(new String[]{ENHANCE_CLASS});
+ }
+
+ @Override
+ public ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
+ return new ConstructorInterceptPoint[0];
+ }
+
+ @Override
+ public InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
+ return new InstanceMethodsInterceptPoint[]{new InstanceMethodsInterceptPoint() {
+ @Override
+ public ElementMatcher<MethodDescription> getMethodsMatcher() {
+ return ElementMatchers
+ // 3.6.x
+ .named(METHOD_NAME);
Review comment:
ok, thanks
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] arugal commented on issue #4173: Support plugin for
mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
arugal commented on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570887772
[Supported-list.md](https://github.com/apache/skywalking/blob/master/docs/en/setup/service-agent/java-agent/Supported-list.md) also needs to be updated.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363150187
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBOperationExecutorInstrumentation.java
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.HierarchyMatch;
+
+/**
+ * intercepts the following methods that the class which implements {@code com.mongodb.OperationExecutor}
+ *
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBOperationExecutorInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.OperationExecutor";
+ private static final String METHOD_NAME = "execute";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBOperationExecutorInterceptor";
+
+ @Override
+ protected ClassMatch enhanceClass() {
+ return HierarchyMatch.byHierarchyMatch(new String[]{ENHANCE_CLASS});
+ }
+
+ @Override
+ public ConstructorInterceptPoint[] getConstructorsInterceptPoints() {
+ return new ConstructorInterceptPoint[0];
+ }
+
+ @Override
+ public InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
+ return new InstanceMethodsInterceptPoint[]{new InstanceMethodsInterceptPoint() {
+ @Override
+ public ElementMatcher<MethodDescription> getMethodsMatcher() {
+ return ElementMatchers
+ // 3.6.x
+ .named(METHOD_NAME);
Review comment:
I will add test cases for version 3.6 in mongodb-3.6.x-scenario later.But the tests wouldn't cover all cases.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> Merging [#4173](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/3440947bb161ab724a1ec3697143a5839696bedc?src=pr&el=desc) will **decrease** coverage by `0.03%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
==========================================
- Coverage 26.84% 26.81% -0.04%
==========================================
Files 1163 1163
Lines 25428 25428
Branches 3691 3691
==========================================
- Hits 6827 6819 -8
- Misses 17992 18000 +8
Partials 609 609
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...apm/agent/core/remote/GRPCStreamServiceStatus.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvcmVtb3RlL0dSUENTdHJlYW1TZXJ2aWNlU3RhdHVzLmphdmE=) | `29.16% <0%> (-25.01%)` | :arrow_down: |
| [...ache/skywalking/apm/agent/core/jvm/JVMService.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvanZtL0pWTVNlcnZpY2UuamF2YQ==) | `77.04% <0%> (-3.28%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [3440947...6be2610](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on issue #4173: Support plugin for
mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570906776
> It has been updated.
We mean this one, https://github.com/apache/skywalking/blob/master/docs/en/setup/service-agent/java-agent/Supported-list.md
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363079234
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
> I conflict with `V3.0.x-3.5.x`, so we need to witness class.
My understanding is that you suggest adding witness class to resolve the conflict between V3.0.x-3.5.x and V3.6?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io commented on issue #4173: Support plugin
for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> Merging [#4173](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/4e03d5e6d73ac32093960a5cdf3de5863ad6aede?src=pr&el=desc) will **increase** coverage by `0.05%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
==========================================
+ Coverage 26.76% 26.81% +0.05%
==========================================
Files 1163 1163
Lines 25428 25428
Branches 3691 3691
==========================================
+ Hits 6805 6819 +14
+ Misses 18017 18000 -17
- Partials 606 609 +3
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...ache/skywalking/apm/agent/core/jvm/JVMService.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvanZtL0pWTVNlcnZpY2UuamF2YQ==) | `77.04% <0%> (+3.27%)` | :arrow_up: |
| [.../core/remote/ServiceAndEndpointRegisterClient.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvcmVtb3RlL1NlcnZpY2VBbmRFbmRwb2ludFJlZ2lzdGVyQ2xpZW50LmphdmE=) | `44.94% <0%> (+13.48%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [4e03d5e...ed50d94](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> Merging [#4173](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/8d0c3b912fadcb8452572864f9afcf29ba2d4b0e?src=pr&el=desc) will **decrease** coverage by `0.05%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
==========================================
- Coverage 26.81% 26.76% -0.06%
==========================================
Files 1163 1163
Lines 25428 25428
Branches 3691 3691
==========================================
- Hits 6819 6805 -14
- Misses 18000 18017 +17
+ Partials 609 606 -3
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [.../core/remote/ServiceAndEndpointRegisterClient.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvcmVtb3RlL1NlcnZpY2VBbmRFbmRwb2ludFJlZ2lzdGVyQ2xpZW50LmphdmE=) | `31.46% <0%> (-13.49%)` | :arrow_down: |
| [...ache/skywalking/apm/agent/core/jvm/JVMService.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvanZtL0pWTVNlcnZpY2UuamF2YQ==) | `73.77% <0%> (-3.28%)` | :arrow_down: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [8d0c3b9...6be2610](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363193964
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
But v30/MongoDBInstrumentation.java provided an witness class,It only exist in version: 3.0.x~3.5.x.If we ombine those Interceptor,we need to remove the witness class?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dmsolr commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dmsolr commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363076360
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
I don't look carefully yet, I think there is missing `WITNESS_CLASS`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng merged pull request #4173: Support plugin for
mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng merged pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dengliming commented on a change in pull request
#4173: Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dengliming commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363195917
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
I think try to provide an witness class in v3.6 maybe a good solution?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] codecov-io edited a comment on issue #4173: Support
plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#issuecomment-570889361
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@85e15a6`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `0%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4173/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4173 +/- ##
=========================================
Coverage ? 26.84%
=========================================
Files ? 1163
Lines ? 25428
Branches ? 3691
=========================================
Hits ? 6827
Misses ? 17992
Partials ? 609
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [.../apm/network/trace/component/ComponentsDefine.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXByb3RvY29sL2FwbS1uZXR3b3JrL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9uZXR3b3JrL3RyYWNlL2NvbXBvbmVudC9Db21wb25lbnRzRGVmaW5lLmphdmE=) | `0% <0%> (ø)` | |
| [...g/apm/plugin/kotlin/coroutine/TracingRunnable.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvb3B0aW9uYWwtcGx1Z2lucy9rb3RsaW4tY29yb3V0aW5lLXBsdWdpbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2t5d2Fsa2luZy9hcG0vcGx1Z2luL2tvdGxpbi9jb3JvdXRpbmUvVHJhY2luZ1J1bm5hYmxlLmphdmE=) | `0% <0%> (ø)` | |
| [...plugin/kotlin/coroutine/DispatcherInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4173/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvb3B0aW9uYWwtcGx1Z2lucy9rb3RsaW4tY29yb3V0aW5lLXBsdWdpbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2t5d2Fsa2luZy9hcG0vcGx1Z2luL2tvdGxpbi9jb3JvdXRpbmUvRGlzcGF0Y2hlckludGVyY2VwdG9yLmphdmE=) | `0% <0%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=footer). Last update [85e15a6...3440947](https://codecov.io/gh/apache/skywalking/pull/4173?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] dmsolr commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
dmsolr commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363197137
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
I think so! I have a glance. it is compatible with v3.0-v3.7. (I am not very sure).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363579387
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
Got it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [skywalking] wu-sheng commented on a change in pull request #4173:
Support plugin for mongodb v3.6.x
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #4173: Support plugin for mongodb v3.6.x
URL: https://github.com/apache/skywalking/pull/4173#discussion_r363096906
##########
File path: apm-sniffer/apm-sdk-plugin/mongodb-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/mongodb/v3/define/v36/MongoDBInstrumentation.java
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.plugin.mongodb.v3.define.v36;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
+
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+
+/**
+ * Enhance {@code com.mongodb.Mongo} instance, and intercept {@code com.mongodb.Mongo#createOperationExecutor(...)} method
+ * <p>
+ * support: 3.6.x
+ *
+ * @author dengliming
+ */
+public class MongoDBInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
+
+ private static final String ENHANCE_CLASS = "com.mongodb.Mongo";
+ private static final String METHOD_NAME = "createOperationExecutor";
+ private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBClientDelegateInterceptor";
Review comment:
@dmsolr Please confirm the confliction. It doesn't show up in the plugin CI tests.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services