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/03/15 17:24:43 UTC
[GitHub] [skywalking] Indifer opened a new pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Indifer opened a new pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517
**fix elasticsearch-5.x-plugin when use es6.x TransportClient error:**
_class[class org.elasticsearch.client.transport.TransportClientNodesService] after method[addTransportAddresses] intercept failure
java.lang.IncompatibleClassChangeError: Found class org.elasticsearch.common.transport.TransportAddress, but interface was expected_
![image](https://user-images.githubusercontent.com/7918822/76705731-04c5b600-671d-11ea-97e0-1403aa736743.png)
because the org.elasticsearch.common.transport.TransportAddress is class in es6.x
![image](https://user-images.githubusercontent.com/7918822/76705811-bf55b880-671d-11ea-87a5-af670e4f2c37.png)
so, up es5.x plugin, make it inoperative on es6.x client
![image](https://user-images.githubusercontent.com/7918822/76705881-718d8000-671e-11ea-8025-a97b9a8472c5.png)
**up es6.x plugin to support TransportClient**
----------------------------------------------------------------
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] Indifer commented on issue #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
Indifer commented on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-603626411
> These two plugin tests should be enhanced to test your scenarios.
>
> 1. https://github.com/apache/skywalking/tree/master/test/plugin/scenarios/elasticsearch-5.x-scenario
> 2. https://github.com/apache/skywalking/tree/master/test/plugin/scenarios/elasticsearch-6.x-scenario
>
> If you haven't familiar with the plugin test, read this doc, https://github.com/apache/skywalking/blob/master/docs/en/guides/Plugin-test.md. You should only need to use the ES APIs in the way used to have issue, and change the expected data file to prove it is working now.
i have 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] codecov-io commented on issue #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-600967432
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=h1) Report
> Merging [#4517](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/61f98c81f036ca394ca879355c72735c1f95357e?src=pr&el=desc) will **increase** coverage by `0.02%`.
> The diff coverage is `32.63%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4517/graphs/tree.svg?width=650&token=qrILxY5yA8&height=150&src=pr)](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4517 +/- ##
==========================================
+ Coverage 25.56% 25.58% +0.02%
==========================================
Files 1244 1251 +7
Lines 28951 29141 +190
Branches 3968 4005 +37
==========================================
+ Hits 7400 7455 +55
- Misses 20867 20991 +124
- Partials 684 695 +11
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [.../apache/skywalking/apm/agent/core/conf/Config.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvY29uZi9Db25maWcuamF2YQ==) | `67.85% <0%> (-1.24%)` | :arrow_down: |
| [...ceptor/TransportClientNodesServiceInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRDbGllbnROb2Rlc1NlcnZpY2VJbnRlcmNlcHRvci5qYXZh) | `0% <0%> (ø)` | |
| [...n/elasticsearch/v6/TransportClientEnhanceInfo.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9UcmFuc3BvcnRDbGllbnRFbmhhbmNlSW5mby5qYXZh) | `0% <0%> (ø)` | |
| [...plugin/elasticsearch/v6/interceptor/Constants.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9Db25zdGFudHMuamF2YQ==) | `100% <100%> (ø)` | |
| [...v6/interceptor/TransportServiceConInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRTZXJ2aWNlQ29uSW50ZXJjZXB0b3IuamF2YQ==) | `100% <100%> (ø)` | |
| [...plugin/elasticsearch/v6/TransportAddressCache.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9UcmFuc3BvcnRBZGRyZXNzQ2FjaGUuamF2YQ==) | `15% <15%> (ø)` | |
| [...dapterActionFutureActionGetMethodsInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9BZGFwdGVyQWN0aW9uRnV0dXJlQWN0aW9uR2V0TWV0aG9kc0ludGVyY2VwdG9yLmphdmE=) | `33.82% <33.82%> (ø)` | |
| [...sportActionNodeProxyExecuteMethodsInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRBY3Rpb25Ob2RlUHJveHlFeGVjdXRlTWV0aG9kc0ludGVyY2VwdG9yLmphdmE=) | `38.33% <38.33%> (ø)` | |
| [...walking/oap/server/core/analysis/Downsampling.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-b2FwLXNlcnZlci9zZXJ2ZXItY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2t5d2Fsa2luZy9vYXAvc2VydmVyL2NvcmUvYW5hbHlzaXMvRG93bnNhbXBsaW5nLmphdmE=) | `0% <0%> (-100%)` | :arrow_down: |
| ... and [6 more](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4517?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/4517?src=pr&el=footer). Last update [61f98c8...03bb721](https://codecov.io/gh/apache/skywalking/pull/4517?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] aderm commented on a change in pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r398693655
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/TransportActionNodeProxyExecuteMethodsInterceptorTest.java
##########
@@ -0,0 +1,241 @@
+/*
+ * 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.elasticsearch.v6.interceptor;
+
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.ExitSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.TraceSegment;
+import org.apache.skywalking.apm.agent.core.context.util.TagValuePair;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+import org.apache.skywalking.apm.agent.test.helper.SegmentHelper;
+import org.apache.skywalking.apm.agent.test.helper.SpanHelper;
+import org.apache.skywalking.apm.agent.test.tools.AgentServiceRule;
+import org.apache.skywalking.apm.agent.test.tools.SegmentStorage;
+import org.apache.skywalking.apm.agent.test.tools.SegmentStoragePoint;
+import org.apache.skywalking.apm.agent.test.tools.TracingSegmentRunner;
+import org.apache.skywalking.apm.plugin.elasticsearch.v6.TransportClientEnhanceInfo;
+import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
+import org.elasticsearch.action.delete.DeleteRequest;
+import org.elasticsearch.action.get.GetRequest;
+import org.elasticsearch.action.index.IndexRequest;
+import org.elasticsearch.action.search.SearchRequest;
+import org.elasticsearch.action.update.UpdateRequest;
+import org.elasticsearch.cluster.node.DiscoveryNode;
+import org.elasticsearch.common.transport.TransportAddress;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.powermock.modules.junit4.PowerMockRunnerDelegate;
+
+import java.net.InetSocketAddress;
+import java.util.List;
+
+import static org.apache.skywalking.apm.agent.core.conf.Config.Plugin.Elasticsearch.TRACE_DSL;
+import static org.apache.skywalking.apm.network.trace.component.ComponentsDefine.TRANSPORT_CLIENT;
+import static org.junit.Assert.assertThat;
+import static org.hamcrest.CoreMatchers.is;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+@RunWith(PowerMockRunner.class)
+@PowerMockRunnerDelegate(TracingSegmentRunner.class)
+public class TransportActionNodeProxyExecuteMethodsInterceptorTest {
+
+ @SegmentStoragePoint
+ private SegmentStorage segmentStorage;
+
+ @Rule
+ public AgentServiceRule serviceRule = new AgentServiceRule();
+
+ @Mock
+ private EnhancedInstance enhancedInstance;
+
+ @Mock
+ private DiscoveryNode discoveryNode;
+
+// @Mock
+// private SearchRequest searchRequest;
+
+ @Mock
+ private GetRequest getRequest;
+
+ @Mock
+ private IndexRequest indexRequest;
+
+ @Mock
+ private UpdateRequest updateRequest;
+
+ @Mock
+ private DeleteRequest deleteRequest;
+
+ @Mock
+ private DeleteIndexRequest deleteIndexRequest;
+
+ @Mock
+ private TransportClientEnhanceInfo enhanceInfo;
+
+ private TransportActionNodeProxyExecuteMethodsInterceptor interceptor;
+
+ @Before
+ public void setUp() {
+
+ InetSocketAddress inetSocketAddress = new InetSocketAddress("122.122.122.122", 9300);
+ TransportAddress transportAddress = new TransportAddress(inetSocketAddress);
+ when(discoveryNode.getAddress()).thenReturn(transportAddress);
+
+ when(enhanceInfo.transportAddresses()).thenReturn("122.122.122.122:9300");
+ when(enhanceInfo.getClusterName()).thenReturn("skywalking-es");
+ when(enhancedInstance.getSkyWalkingDynamicField()).thenReturn(enhanceInfo);
+
+// when(searchRequest.indices()).thenReturn(new String[]{"endpoint"});
+// when(searchRequest.types()).thenReturn(new String[]{"searchType"});
+
+ when(getRequest.index()).thenReturn("endpoint");
+ when(getRequest.type()).thenReturn("getType");
+
+ when(indexRequest.index()).thenReturn("endpoint");
+ when(indexRequest.type()).thenReturn("indexType");
+
+ when(updateRequest.index()).thenReturn("endpoint");
+ when(updateRequest.type()).thenReturn("updateType");
+
+ when(deleteRequest.index()).thenReturn("endpoint");
+ when(deleteRequest.type()).thenReturn("deleteType");
+
+ when(deleteIndexRequest.indices()).thenReturn(new String[]{"endpoint"});
+
+ interceptor = new TransportActionNodeProxyExecuteMethodsInterceptor();
+ }
+
+ @Test
+ public void testConstruct() {
+
+ final EnhancedInstance objInst1 = new EnhancedInstance() {
+ private Object object = null;
+
+ @Override
+ public Object getSkyWalkingDynamicField() {
+ return object;
+ }
+
+ @Override
+ public void setSkyWalkingDynamicField(Object value) {
+ this.object = value;
+ }
+ };
+
+ final EnhancedInstance objInst2 = new EnhancedInstance() {
+ private Object object = null;
+
+ @Override
+ public Object getSkyWalkingDynamicField() {
+ return object;
+ }
+
+ @Override
+ public void setSkyWalkingDynamicField(Object value) {
+ this.object = value;
+ }
+ };
+
+ objInst1.setSkyWalkingDynamicField(123);
+ Object[] allArguments = new Object[]{null, null, objInst1};
+
+ interceptor.onConstruct(objInst2, allArguments);
+ assertThat(objInst1.getSkyWalkingDynamicField(), is(objInst2.getSkyWalkingDynamicField()));
+ }
+
+ @Test
+ public void testGetRequest() throws Throwable {
+
+ AbstractTracingSpan getSpan = getSpan();
+ assertGetSpan(getSpan, getRequest);
+ }
+
+ @Test
+ public void testIndexRequest() throws Throwable {
+
+ AbstractTracingSpan getSpan = getSpan();
+ assertGetSpan(getSpan, getRequest);
+ }
+
+ @Test
+ public void testUpdateRequest() throws Throwable {
+
+ AbstractTracingSpan getSpan = getSpan();
+ assertGetSpan(getSpan, getRequest);
Review comment:
`getRequest ` maybe `updateRequest`?
----------------------------------------------------------------
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 #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-600967432
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=h1) Report
> Merging [#4517](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/e7f66c911eaf18a14793e5edf09788cb5f391f29&el=desc) will **increase** coverage by `0.36%`.
> The diff coverage is `36.08%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4517/graphs/tree.svg?width=650&height=150&src=pr&token=qrILxY5yA8)](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4517 +/- ##
==========================================
+ Coverage 25.57% 25.93% +0.36%
==========================================
Files 1246 1253 +7
Lines 28975 29169 +194
Branches 3974 4011 +37
==========================================
+ Hits 7410 7565 +155
- Misses 20873 20899 +26
- Partials 692 705 +13
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [.../apache/skywalking/apm/agent/core/conf/Config.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvY29uZi9Db25maWcuamF2YQ==) | `67.85% <0.00%> (-1.24%)` | :arrow_down: |
| [...walking/apm/plugin/elasticsearch/v5/Constants.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC01LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92NS9Db25zdGFudHMuamF2YQ==) | `0.00% <ø> (ø)` | |
| [...n/elasticsearch/v6/TransportClientEnhanceInfo.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9UcmFuc3BvcnRDbGllbnRFbmhhbmNlSW5mby5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...ceptor/TransportClientNodesServiceInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRDbGllbnROb2Rlc1NlcnZpY2VJbnRlcmNlcHRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...dapterActionFutureActionGetMethodsInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9BZGFwdGVyQWN0aW9uRnV0dXJlQWN0aW9uR2V0TWV0aG9kc0ludGVyY2VwdG9yLmphdmE=) | `33.82% <33.82%> (ø)` | |
| [...sportActionNodeProxyExecuteMethodsInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRBY3Rpb25Ob2RlUHJveHlFeGVjdXRlTWV0aG9kc0ludGVyY2VwdG9yLmphdmE=) | `35.38% <35.38%> (ø)` | |
| [...plugin/elasticsearch/v6/TransportAddressCache.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9UcmFuc3BvcnRBZGRyZXNzQ2FjaGUuamF2YQ==) | `57.89% <57.89%> (ø)` | |
| [...plugin/elasticsearch/v6/interceptor/Constants.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9Db25zdGFudHMuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...v6/interceptor/TransportServiceConInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRTZXJ2aWNlQ29uSW50ZXJjZXB0b3IuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...walking/oap/server/core/analysis/Downsampling.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-b2FwLXNlcnZlci9zZXJ2ZXItY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2t5d2Fsa2luZy9vYXAvc2VydmVyL2NvcmUvYW5hbHlzaXMvRG93bnNhbXBsaW5nLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [19 more](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4517?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/4517?src=pr&el=footer). Last update [e7f66c9...1347f94](https://codecov.io/gh/apache/skywalking/pull/4517?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] Indifer commented on issue #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
Indifer commented on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-603626204
@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] Indifer closed pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
Indifer closed pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517
----------------------------------------------------------------
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] aderm commented on a change in pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r393397762
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/TransportAddressCache.java
##########
@@ -0,0 +1,64 @@
+/*
+ * 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.elasticsearch.v6;
+
+import org.elasticsearch.common.transport.TransportAddress;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * date 2020.02.13 20:50
+ */
+public class TransportAddressCache {
+
+ private List<TransportAddress> transportAddresses = new ArrayList<TransportAddress>();
+ private String transportAddressesStr = "";
+
+ public synchronized void addDiscoveryNode(TransportAddress... transportAddress) {
+ transportAddresses.addAll(Arrays.asList(transportAddress));
+ transportAddressesStr = format();
+ }
+
+ public synchronized void removeDiscoveryNode(TransportAddress transportAddress) {
+ List<TransportAddress> nodesBuilder = new ArrayList<TransportAddress>();
+
+ for (TransportAddress otherNode : transportAddresses) {
+ if (!otherNode.getAddress().equals(transportAddress.getAddress())) {
+ nodesBuilder.add(otherNode);
+ }
+ }
+
+ transportAddresses = nodesBuilder;
+ transportAddressesStr = format();
+ }
+
+ private String format() {
+ StringBuilder stringBuilder = new StringBuilder();
+ for (TransportAddress node : transportAddresses) {
+ stringBuilder.append(node.getAddress()).append(":").append(node.getPort()).append(";");
Review comment:
recommended to change `;` to `,` here, which is also consistent with the ES multi-hosts configuration method.
----------------------------------------------------------------
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 #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-600967432
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=h1) Report
> Merging [#4517](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/203097446a9d7e5050c49d46e07afc324721ea9b&el=desc) will **increase** coverage by `0.15%`.
> The diff coverage is `49.48%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4517/graphs/tree.svg?width=650&height=150&src=pr&token=qrILxY5yA8)](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4517 +/- ##
==========================================
+ Coverage 25.99% 26.14% +0.15%
==========================================
Files 1250 1257 +7
Lines 29071 29265 +194
Branches 3990 4027 +37
==========================================
+ Hits 7556 7651 +95
- Misses 20822 20906 +84
- Partials 693 708 +15
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [.../apache/skywalking/apm/agent/core/conf/Config.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvY29uZi9Db25maWcuamF2YQ==) | `68.96% <0.00%> (-1.21%)` | :arrow_down: |
| [...walking/apm/plugin/elasticsearch/v5/Constants.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC01LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92NS9Db25zdGFudHMuamF2YQ==) | `0.00% <ø> (ø)` | |
| [...n/elasticsearch/v6/TransportClientEnhanceInfo.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9UcmFuc3BvcnRDbGllbnRFbmhhbmNlSW5mby5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...ceptor/TransportClientNodesServiceInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRDbGllbnROb2Rlc1NlcnZpY2VJbnRlcmNlcHRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...dapterActionFutureActionGetMethodsInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9BZGFwdGVyQWN0aW9uRnV0dXJlQWN0aW9uR2V0TWV0aG9kc0ludGVyY2VwdG9yLmphdmE=) | `33.82% <33.82%> (ø)` | |
| [...plugin/elasticsearch/v6/TransportAddressCache.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9UcmFuc3BvcnRBZGRyZXNzQ2FjaGUuamF2YQ==) | `57.89% <57.89%> (ø)` | |
| [...sportActionNodeProxyExecuteMethodsInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRBY3Rpb25Ob2RlUHJveHlFeGVjdXRlTWV0aG9kc0ludGVyY2VwdG9yLmphdmE=) | `75.38% <75.38%> (ø)` | |
| [...plugin/elasticsearch/v6/interceptor/Constants.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9Db25zdGFudHMuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...v6/interceptor/TransportServiceConInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRTZXJ2aWNlQ29uSW50ZXJjZXB0b3IuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...ache/skywalking/apm/agent/core/jvm/JVMService.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvanZtL0pWTVNlcnZpY2UuamF2YQ==) | `58.33% <0.00%> (-1.67%)` | :arrow_down: |
| ... and [7 more](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4517?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/4517?src=pr&el=footer). Last update [2030974...84361da](https://codecov.io/gh/apache/skywalking/pull/4517?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] Indifer commented on issue #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
Indifer commented on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-599870825
> These two plugin tests should be enhanced to test your scenarios.
>
> 1. https://github.com/apache/skywalking/tree/master/test/plugin/scenarios/elasticsearch-5.x-scenario
> 2. https://github.com/apache/skywalking/tree/master/test/plugin/scenarios/elasticsearch-6.x-scenario
>
> If you haven't familiar with the plugin test, read this doc, https://github.com/apache/skywalking/blob/master/docs/en/guides/Plugin-test.md. You should only need to use the ES APIs in the way used to have issue, and change the expected data file to prove it is working now.
ok
----------------------------------------------------------------
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] aderm commented on a change in pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r393394789
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/TransportAddressCache.java
##########
@@ -0,0 +1,64 @@
+/*
+ * 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.elasticsearch.v6;
+
+import org.elasticsearch.common.transport.TransportAddress;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * date 2020.02.13 20:50
Review comment:
This comment be modified to describe the function of the class, same as follows.
----------------------------------------------------------------
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] Indifer removed a comment on issue #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
Indifer removed a comment on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-603626204
@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] wu-sheng commented on issue #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-604242785
@aderm Please recheck this PR.
----------------------------------------------------------------
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] Indifer commented on issue #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
Indifer commented on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-604579779
@aderm I have 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] aderm commented on a change in pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r398691211
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/TransportActionNodeProxyExecuteMethodsInterceptorTest.java
##########
@@ -0,0 +1,241 @@
+/*
+ * 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.elasticsearch.v6.interceptor;
+
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.ExitSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.TraceSegment;
+import org.apache.skywalking.apm.agent.core.context.util.TagValuePair;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+import org.apache.skywalking.apm.agent.test.helper.SegmentHelper;
+import org.apache.skywalking.apm.agent.test.helper.SpanHelper;
+import org.apache.skywalking.apm.agent.test.tools.AgentServiceRule;
+import org.apache.skywalking.apm.agent.test.tools.SegmentStorage;
+import org.apache.skywalking.apm.agent.test.tools.SegmentStoragePoint;
+import org.apache.skywalking.apm.agent.test.tools.TracingSegmentRunner;
+import org.apache.skywalking.apm.plugin.elasticsearch.v6.TransportClientEnhanceInfo;
+import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
+import org.elasticsearch.action.delete.DeleteRequest;
+import org.elasticsearch.action.get.GetRequest;
+import org.elasticsearch.action.index.IndexRequest;
+import org.elasticsearch.action.search.SearchRequest;
+import org.elasticsearch.action.update.UpdateRequest;
+import org.elasticsearch.cluster.node.DiscoveryNode;
+import org.elasticsearch.common.transport.TransportAddress;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.powermock.modules.junit4.PowerMockRunnerDelegate;
+
+import java.net.InetSocketAddress;
+import java.util.List;
+
+import static org.apache.skywalking.apm.agent.core.conf.Config.Plugin.Elasticsearch.TRACE_DSL;
+import static org.apache.skywalking.apm.network.trace.component.ComponentsDefine.TRANSPORT_CLIENT;
+import static org.junit.Assert.assertThat;
+import static org.hamcrest.CoreMatchers.is;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+@RunWith(PowerMockRunner.class)
+@PowerMockRunnerDelegate(TracingSegmentRunner.class)
+public class TransportActionNodeProxyExecuteMethodsInterceptorTest {
+
+ @SegmentStoragePoint
+ private SegmentStorage segmentStorage;
+
+ @Rule
+ public AgentServiceRule serviceRule = new AgentServiceRule();
+
+ @Mock
+ private EnhancedInstance enhancedInstance;
+
+ @Mock
+ private DiscoveryNode discoveryNode;
+
+// @Mock
+// private SearchRequest searchRequest;
+
Review comment:
comment should delete
----------------------------------------------------------------
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] Indifer opened a new pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
Indifer opened a new pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517
**fix elasticsearch-5.x-plugin when use es6.x TransportClient error:**
_class[class org.elasticsearch.client.transport.TransportClientNodesService] after method[addTransportAddresses] intercept failure
java.lang.IncompatibleClassChangeError: Found class org.elasticsearch.common.transport.TransportAddress, but interface was expected_
![image](https://user-images.githubusercontent.com/7918822/76705731-04c5b600-671d-11ea-97e0-1403aa736743.png)
because the org.elasticsearch.common.transport.TransportAddress is class in es6.x
![image](https://user-images.githubusercontent.com/7918822/76705811-bf55b880-671d-11ea-87a5-af670e4f2c37.png)
so, up es5.x plugin, make it inoperative on es6.x client
![image](https://user-images.githubusercontent.com/7918822/76705881-718d8000-671e-11ea-8025-a97b9a8472c5.png)
**up es6.x plugin to support TransportClient**
----------------------------------------------------------------
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 #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-600967432
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=h1) Report
> Merging [#4517](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/e7f66c911eaf18a14793e5edf09788cb5f391f29&el=desc) will **increase** coverage by `0.36%`.
> The diff coverage is `36.08%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4517/graphs/tree.svg?width=650&height=150&src=pr&token=qrILxY5yA8)](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4517 +/- ##
==========================================
+ Coverage 25.57% 25.93% +0.36%
==========================================
Files 1246 1253 +7
Lines 28975 29169 +194
Branches 3974 4011 +37
==========================================
+ Hits 7410 7565 +155
- Misses 20873 20899 +26
- Partials 692 705 +13
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [.../apache/skywalking/apm/agent/core/conf/Config.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvY29uZi9Db25maWcuamF2YQ==) | `67.85% <0.00%> (-1.24%)` | :arrow_down: |
| [...walking/apm/plugin/elasticsearch/v5/Constants.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC01LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92NS9Db25zdGFudHMuamF2YQ==) | `0.00% <ø> (ø)` | |
| [...n/elasticsearch/v6/TransportClientEnhanceInfo.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9UcmFuc3BvcnRDbGllbnRFbmhhbmNlSW5mby5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...ceptor/TransportClientNodesServiceInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRDbGllbnROb2Rlc1NlcnZpY2VJbnRlcmNlcHRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...dapterActionFutureActionGetMethodsInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9BZGFwdGVyQWN0aW9uRnV0dXJlQWN0aW9uR2V0TWV0aG9kc0ludGVyY2VwdG9yLmphdmE=) | `33.82% <33.82%> (ø)` | |
| [...sportActionNodeProxyExecuteMethodsInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRBY3Rpb25Ob2RlUHJveHlFeGVjdXRlTWV0aG9kc0ludGVyY2VwdG9yLmphdmE=) | `35.38% <35.38%> (ø)` | |
| [...plugin/elasticsearch/v6/TransportAddressCache.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9UcmFuc3BvcnRBZGRyZXNzQ2FjaGUuamF2YQ==) | `57.89% <57.89%> (ø)` | |
| [...plugin/elasticsearch/v6/interceptor/Constants.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9Db25zdGFudHMuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...v6/interceptor/TransportServiceConInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRTZXJ2aWNlQ29uSW50ZXJjZXB0b3IuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...walking/oap/server/core/analysis/Downsampling.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-b2FwLXNlcnZlci9zZXJ2ZXItY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2t5d2Fsa2luZy9vYXAvc2VydmVyL2NvcmUvYW5hbHlzaXMvRG93bnNhbXBsaW5nLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [19 more](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4517?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/4517?src=pr&el=footer). Last update [e7f66c9...96b4835](https://codecov.io/gh/apache/skywalking/pull/4517?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] aderm commented on a change in pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r398693220
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/TransportActionNodeProxyExecuteMethodsInterceptorTest.java
##########
@@ -0,0 +1,241 @@
+/*
+ * 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.elasticsearch.v6.interceptor;
+
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.ExitSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.TraceSegment;
+import org.apache.skywalking.apm.agent.core.context.util.TagValuePair;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+import org.apache.skywalking.apm.agent.test.helper.SegmentHelper;
+import org.apache.skywalking.apm.agent.test.helper.SpanHelper;
+import org.apache.skywalking.apm.agent.test.tools.AgentServiceRule;
+import org.apache.skywalking.apm.agent.test.tools.SegmentStorage;
+import org.apache.skywalking.apm.agent.test.tools.SegmentStoragePoint;
+import org.apache.skywalking.apm.agent.test.tools.TracingSegmentRunner;
+import org.apache.skywalking.apm.plugin.elasticsearch.v6.TransportClientEnhanceInfo;
+import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
+import org.elasticsearch.action.delete.DeleteRequest;
+import org.elasticsearch.action.get.GetRequest;
+import org.elasticsearch.action.index.IndexRequest;
+import org.elasticsearch.action.search.SearchRequest;
+import org.elasticsearch.action.update.UpdateRequest;
+import org.elasticsearch.cluster.node.DiscoveryNode;
+import org.elasticsearch.common.transport.TransportAddress;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.powermock.modules.junit4.PowerMockRunnerDelegate;
+
+import java.net.InetSocketAddress;
+import java.util.List;
+
+import static org.apache.skywalking.apm.agent.core.conf.Config.Plugin.Elasticsearch.TRACE_DSL;
+import static org.apache.skywalking.apm.network.trace.component.ComponentsDefine.TRANSPORT_CLIENT;
+import static org.junit.Assert.assertThat;
+import static org.hamcrest.CoreMatchers.is;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+@RunWith(PowerMockRunner.class)
+@PowerMockRunnerDelegate(TracingSegmentRunner.class)
+public class TransportActionNodeProxyExecuteMethodsInterceptorTest {
+
+ @SegmentStoragePoint
+ private SegmentStorage segmentStorage;
+
+ @Rule
+ public AgentServiceRule serviceRule = new AgentServiceRule();
+
+ @Mock
+ private EnhancedInstance enhancedInstance;
+
+ @Mock
+ private DiscoveryNode discoveryNode;
+
+// @Mock
+// private SearchRequest searchRequest;
+
+ @Mock
+ private GetRequest getRequest;
+
+ @Mock
+ private IndexRequest indexRequest;
+
+ @Mock
+ private UpdateRequest updateRequest;
+
+ @Mock
+ private DeleteRequest deleteRequest;
+
+ @Mock
+ private DeleteIndexRequest deleteIndexRequest;
+
+ @Mock
+ private TransportClientEnhanceInfo enhanceInfo;
+
+ private TransportActionNodeProxyExecuteMethodsInterceptor interceptor;
+
+ @Before
+ public void setUp() {
+
+ InetSocketAddress inetSocketAddress = new InetSocketAddress("122.122.122.122", 9300);
+ TransportAddress transportAddress = new TransportAddress(inetSocketAddress);
+ when(discoveryNode.getAddress()).thenReturn(transportAddress);
+
+ when(enhanceInfo.transportAddresses()).thenReturn("122.122.122.122:9300");
+ when(enhanceInfo.getClusterName()).thenReturn("skywalking-es");
+ when(enhancedInstance.getSkyWalkingDynamicField()).thenReturn(enhanceInfo);
+
+// when(searchRequest.indices()).thenReturn(new String[]{"endpoint"});
+// when(searchRequest.types()).thenReturn(new String[]{"searchType"});
+
+ when(getRequest.index()).thenReturn("endpoint");
+ when(getRequest.type()).thenReturn("getType");
+
+ when(indexRequest.index()).thenReturn("endpoint");
+ when(indexRequest.type()).thenReturn("indexType");
+
+ when(updateRequest.index()).thenReturn("endpoint");
+ when(updateRequest.type()).thenReturn("updateType");
+
+ when(deleteRequest.index()).thenReturn("endpoint");
+ when(deleteRequest.type()).thenReturn("deleteType");
+
+ when(deleteIndexRequest.indices()).thenReturn(new String[]{"endpoint"});
+
+ interceptor = new TransportActionNodeProxyExecuteMethodsInterceptor();
+ }
+
+ @Test
+ public void testConstruct() {
+
+ final EnhancedInstance objInst1 = new EnhancedInstance() {
+ private Object object = null;
+
+ @Override
+ public Object getSkyWalkingDynamicField() {
+ return object;
+ }
+
+ @Override
+ public void setSkyWalkingDynamicField(Object value) {
+ this.object = value;
+ }
+ };
+
+ final EnhancedInstance objInst2 = new EnhancedInstance() {
+ private Object object = null;
+
+ @Override
+ public Object getSkyWalkingDynamicField() {
+ return object;
+ }
+
+ @Override
+ public void setSkyWalkingDynamicField(Object value) {
+ this.object = value;
+ }
+ };
+
+ objInst1.setSkyWalkingDynamicField(123);
+ Object[] allArguments = new Object[]{null, null, objInst1};
+
+ interceptor.onConstruct(objInst2, allArguments);
+ assertThat(objInst1.getSkyWalkingDynamicField(), is(objInst2.getSkyWalkingDynamicField()));
+ }
+
+ @Test
+ public void testGetRequest() throws Throwable {
+
+ AbstractTracingSpan getSpan = getSpan();
+ assertGetSpan(getSpan, getRequest);
+ }
+
+ @Test
+ public void testIndexRequest() throws Throwable {
+
+ AbstractTracingSpan getSpan = getSpan();
+ assertGetSpan(getSpan, getRequest);
Review comment:
`getRequest ` maybe `indexRequest`?
----------------------------------------------------------------
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] Indifer commented on a change in pull request #4517:
fix elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
Indifer commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r393437905
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v5/define/GenericActionInstrumentation.java
##########
@@ -60,4 +60,10 @@ public String getConstructorInterceptor() {
protected ClassMatch enhanceClass() {
return byHierarchyMatch(new String[] {"org.elasticsearch.action.GenericAction"});
}
+
+ @Override
+ protected String[] witnessClasses() {
+ return new String[]{"org.elasticsearch.common.transport.InetSocketTransportAddress"};
Review comment:
ok
----------------------------------------------------------------
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 #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-600967432
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=h1) Report
> Merging [#4517](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/e7f66c911eaf18a14793e5edf09788cb5f391f29&el=desc) will **increase** coverage by `0.07%`.
> The diff coverage is `37.03%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4517/graphs/tree.svg?width=650&height=150&src=pr&token=qrILxY5yA8)](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4517 +/- ##
==========================================
+ Coverage 25.57% 25.64% +0.07%
==========================================
Files 1246 1253 +7
Lines 28975 29164 +189
Branches 3974 4010 +36
==========================================
+ Hits 7410 7480 +70
- Misses 20873 20981 +108
- Partials 692 703 +11
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [.../apache/skywalking/apm/agent/core/conf/Config.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvY29uZi9Db25maWcuamF2YQ==) | `67.85% <0.00%> (-1.24%)` | :arrow_down: |
| [...walking/apm/plugin/elasticsearch/v5/Constants.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC01LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92NS9Db25zdGFudHMuamF2YQ==) | `0.00% <ø> (ø)` | |
| [...n/elasticsearch/v6/TransportClientEnhanceInfo.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9UcmFuc3BvcnRDbGllbnRFbmhhbmNlSW5mby5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...ceptor/TransportClientNodesServiceInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRDbGllbnROb2Rlc1NlcnZpY2VJbnRlcmNlcHRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...dapterActionFutureActionGetMethodsInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9BZGFwdGVyQWN0aW9uRnV0dXJlQWN0aW9uR2V0TWV0aG9kc0ludGVyY2VwdG9yLmphdmE=) | `33.82% <33.82%> (ø)` | |
| [...sportActionNodeProxyExecuteMethodsInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRBY3Rpb25Ob2RlUHJveHlFeGVjdXRlTWV0aG9kc0ludGVyY2VwdG9yLmphdmE=) | `38.33% <38.33%> (ø)` | |
| [...plugin/elasticsearch/v6/TransportAddressCache.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9UcmFuc3BvcnRBZGRyZXNzQ2FjaGUuamF2YQ==) | `57.89% <57.89%> (ø)` | |
| [...plugin/elasticsearch/v6/interceptor/Constants.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9Db25zdGFudHMuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...v6/interceptor/TransportServiceConInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRTZXJ2aWNlQ29uSW50ZXJjZXB0b3IuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| ... and [6 more](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4517?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/4517?src=pr&el=footer). Last update [e7f66c9...96b4835](https://codecov.io/gh/apache/skywalking/pull/4517?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] aderm commented on a change in pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r398695604
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/TransportActionNodeProxyExecuteMethodsInterceptorTest.java
##########
@@ -0,0 +1,241 @@
+/*
+ * 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.elasticsearch.v6.interceptor;
+
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.ExitSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.TraceSegment;
+import org.apache.skywalking.apm.agent.core.context.util.TagValuePair;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+import org.apache.skywalking.apm.agent.test.helper.SegmentHelper;
+import org.apache.skywalking.apm.agent.test.helper.SpanHelper;
+import org.apache.skywalking.apm.agent.test.tools.AgentServiceRule;
+import org.apache.skywalking.apm.agent.test.tools.SegmentStorage;
+import org.apache.skywalking.apm.agent.test.tools.SegmentStoragePoint;
+import org.apache.skywalking.apm.agent.test.tools.TracingSegmentRunner;
+import org.apache.skywalking.apm.plugin.elasticsearch.v6.TransportClientEnhanceInfo;
+import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
+import org.elasticsearch.action.delete.DeleteRequest;
+import org.elasticsearch.action.get.GetRequest;
+import org.elasticsearch.action.index.IndexRequest;
+import org.elasticsearch.action.search.SearchRequest;
+import org.elasticsearch.action.update.UpdateRequest;
+import org.elasticsearch.cluster.node.DiscoveryNode;
+import org.elasticsearch.common.transport.TransportAddress;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.powermock.modules.junit4.PowerMockRunnerDelegate;
+
+import java.net.InetSocketAddress;
+import java.util.List;
+
+import static org.apache.skywalking.apm.agent.core.conf.Config.Plugin.Elasticsearch.TRACE_DSL;
+import static org.apache.skywalking.apm.network.trace.component.ComponentsDefine.TRANSPORT_CLIENT;
+import static org.junit.Assert.assertThat;
+import static org.hamcrest.CoreMatchers.is;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+@RunWith(PowerMockRunner.class)
+@PowerMockRunnerDelegate(TracingSegmentRunner.class)
+public class TransportActionNodeProxyExecuteMethodsInterceptorTest {
+
+ @SegmentStoragePoint
+ private SegmentStorage segmentStorage;
+
+ @Rule
+ public AgentServiceRule serviceRule = new AgentServiceRule();
+
+ @Mock
+ private EnhancedInstance enhancedInstance;
+
+ @Mock
+ private DiscoveryNode discoveryNode;
+
+// @Mock
+// private SearchRequest searchRequest;
+
+ @Mock
+ private GetRequest getRequest;
+
+ @Mock
+ private IndexRequest indexRequest;
+
+ @Mock
+ private UpdateRequest updateRequest;
+
+ @Mock
+ private DeleteRequest deleteRequest;
+
+ @Mock
+ private DeleteIndexRequest deleteIndexRequest;
+
+ @Mock
+ private TransportClientEnhanceInfo enhanceInfo;
+
+ private TransportActionNodeProxyExecuteMethodsInterceptor interceptor;
+
+ @Before
+ public void setUp() {
+
+ InetSocketAddress inetSocketAddress = new InetSocketAddress("122.122.122.122", 9300);
+ TransportAddress transportAddress = new TransportAddress(inetSocketAddress);
+ when(discoveryNode.getAddress()).thenReturn(transportAddress);
+
+ when(enhanceInfo.transportAddresses()).thenReturn("122.122.122.122:9300");
+ when(enhanceInfo.getClusterName()).thenReturn("skywalking-es");
+ when(enhancedInstance.getSkyWalkingDynamicField()).thenReturn(enhanceInfo);
+
+// when(searchRequest.indices()).thenReturn(new String[]{"endpoint"});
+// when(searchRequest.types()).thenReturn(new String[]{"searchType"});
+
+ when(getRequest.index()).thenReturn("endpoint");
+ when(getRequest.type()).thenReturn("getType");
+
+ when(indexRequest.index()).thenReturn("endpoint");
+ when(indexRequest.type()).thenReturn("indexType");
+
+ when(updateRequest.index()).thenReturn("endpoint");
+ when(updateRequest.type()).thenReturn("updateType");
+
+ when(deleteRequest.index()).thenReturn("endpoint");
+ when(deleteRequest.type()).thenReturn("deleteType");
+
+ when(deleteIndexRequest.indices()).thenReturn(new String[]{"endpoint"});
+
+ interceptor = new TransportActionNodeProxyExecuteMethodsInterceptor();
+ }
+
+ @Test
+ public void testConstruct() {
+
+ final EnhancedInstance objInst1 = new EnhancedInstance() {
+ private Object object = null;
+
+ @Override
+ public Object getSkyWalkingDynamicField() {
+ return object;
+ }
+
+ @Override
+ public void setSkyWalkingDynamicField(Object value) {
+ this.object = value;
+ }
+ };
+
+ final EnhancedInstance objInst2 = new EnhancedInstance() {
+ private Object object = null;
+
+ @Override
+ public Object getSkyWalkingDynamicField() {
+ return object;
+ }
+
+ @Override
+ public void setSkyWalkingDynamicField(Object value) {
+ this.object = value;
+ }
+ };
+
+ objInst1.setSkyWalkingDynamicField(123);
+ Object[] allArguments = new Object[]{null, null, objInst1};
+
+ interceptor.onConstruct(objInst2, allArguments);
+ assertThat(objInst1.getSkyWalkingDynamicField(), is(objInst2.getSkyWalkingDynamicField()));
+ }
+
+ @Test
+ public void testGetRequest() throws Throwable {
+
+ AbstractTracingSpan getSpan = getSpan();
+ assertGetSpan(getSpan, getRequest);
+ }
+
+ @Test
+ public void testIndexRequest() throws Throwable {
+
+ AbstractTracingSpan getSpan = getSpan();
+ assertGetSpan(getSpan, getRequest);
+ }
+
+ @Test
+ public void testUpdateRequest() throws Throwable {
+
+ AbstractTracingSpan getSpan = getSpan();
+ assertGetSpan(getSpan, getRequest);
+ }
+
+ @Test
+ public void testDeleteRequest() throws Throwable {
+
+ AbstractTracingSpan getSpan = getSpan();
+ assertGetSpan(getSpan, getRequest);
Review comment:
`getRequest ` maybe `deleteRequest`?
----------------------------------------------------------------
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] Indifer commented on a change in pull request #4517:
fix elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
Indifer commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r393437940
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/TransportAddressCache.java
##########
@@ -0,0 +1,64 @@
+/*
+ * 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.elasticsearch.v6;
+
+import org.elasticsearch.common.transport.TransportAddress;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * date 2020.02.13 20:50
+ */
+public class TransportAddressCache {
+
+ private List<TransportAddress> transportAddresses = new ArrayList<TransportAddress>();
+ private String transportAddressesStr = "";
+
+ public synchronized void addDiscoveryNode(TransportAddress... transportAddress) {
+ transportAddresses.addAll(Arrays.asList(transportAddress));
+ transportAddressesStr = format();
+ }
+
+ public synchronized void removeDiscoveryNode(TransportAddress transportAddress) {
+ List<TransportAddress> nodesBuilder = new ArrayList<TransportAddress>();
+
+ for (TransportAddress otherNode : transportAddresses) {
+ if (!otherNode.getAddress().equals(transportAddress.getAddress())) {
+ nodesBuilder.add(otherNode);
+ }
+ }
+
+ transportAddresses = nodesBuilder;
+ transportAddressesStr = format();
+ }
+
+ private String format() {
+ StringBuilder stringBuilder = new StringBuilder();
+ for (TransportAddress node : transportAddresses) {
+ stringBuilder.append(node.getAddress()).append(":").append(node.getPort()).append(";");
Review comment:
ok
----------------------------------------------------------------
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] aderm merged pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm merged pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517
----------------------------------------------------------------
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 #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-604816354
@aderm Please approve directly.
----------------------------------------------------------------
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] aderm commented on issue #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-604780305
LGTM
----------------------------------------------------------------
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] aderm commented on issue #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-604827689
Done
----------------------------------------------------------------
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 #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-601987336
@Indifer We are still waiting for your update.
----------------------------------------------------------------
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] aderm commented on a change in pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r398691449
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/TransportActionNodeProxyExecuteMethodsInterceptorTest.java
##########
@@ -0,0 +1,241 @@
+/*
+ * 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.elasticsearch.v6.interceptor;
+
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.ExitSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.TraceSegment;
+import org.apache.skywalking.apm.agent.core.context.util.TagValuePair;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+import org.apache.skywalking.apm.agent.test.helper.SegmentHelper;
+import org.apache.skywalking.apm.agent.test.helper.SpanHelper;
+import org.apache.skywalking.apm.agent.test.tools.AgentServiceRule;
+import org.apache.skywalking.apm.agent.test.tools.SegmentStorage;
+import org.apache.skywalking.apm.agent.test.tools.SegmentStoragePoint;
+import org.apache.skywalking.apm.agent.test.tools.TracingSegmentRunner;
+import org.apache.skywalking.apm.plugin.elasticsearch.v6.TransportClientEnhanceInfo;
+import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
+import org.elasticsearch.action.delete.DeleteRequest;
+import org.elasticsearch.action.get.GetRequest;
+import org.elasticsearch.action.index.IndexRequest;
+import org.elasticsearch.action.search.SearchRequest;
+import org.elasticsearch.action.update.UpdateRequest;
+import org.elasticsearch.cluster.node.DiscoveryNode;
+import org.elasticsearch.common.transport.TransportAddress;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.powermock.modules.junit4.PowerMockRunnerDelegate;
+
+import java.net.InetSocketAddress;
+import java.util.List;
+
+import static org.apache.skywalking.apm.agent.core.conf.Config.Plugin.Elasticsearch.TRACE_DSL;
+import static org.apache.skywalking.apm.network.trace.component.ComponentsDefine.TRANSPORT_CLIENT;
+import static org.junit.Assert.assertThat;
+import static org.hamcrest.CoreMatchers.is;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+@RunWith(PowerMockRunner.class)
+@PowerMockRunnerDelegate(TracingSegmentRunner.class)
+public class TransportActionNodeProxyExecuteMethodsInterceptorTest {
+
+ @SegmentStoragePoint
+ private SegmentStorage segmentStorage;
+
+ @Rule
+ public AgentServiceRule serviceRule = new AgentServiceRule();
+
+ @Mock
+ private EnhancedInstance enhancedInstance;
+
+ @Mock
+ private DiscoveryNode discoveryNode;
+
+// @Mock
+// private SearchRequest searchRequest;
+
+ @Mock
+ private GetRequest getRequest;
+
+ @Mock
+ private IndexRequest indexRequest;
+
+ @Mock
+ private UpdateRequest updateRequest;
+
+ @Mock
+ private DeleteRequest deleteRequest;
+
+ @Mock
+ private DeleteIndexRequest deleteIndexRequest;
+
+ @Mock
+ private TransportClientEnhanceInfo enhanceInfo;
+
+ private TransportActionNodeProxyExecuteMethodsInterceptor interceptor;
+
+ @Before
+ public void setUp() {
+
+ InetSocketAddress inetSocketAddress = new InetSocketAddress("122.122.122.122", 9300);
+ TransportAddress transportAddress = new TransportAddress(inetSocketAddress);
+ when(discoveryNode.getAddress()).thenReturn(transportAddress);
+
+ when(enhanceInfo.transportAddresses()).thenReturn("122.122.122.122:9300");
+ when(enhanceInfo.getClusterName()).thenReturn("skywalking-es");
+ when(enhancedInstance.getSkyWalkingDynamicField()).thenReturn(enhanceInfo);
+
+// when(searchRequest.indices()).thenReturn(new String[]{"endpoint"});
+// when(searchRequest.types()).thenReturn(new String[]{"searchType"});
Review comment:
also this
----------------------------------------------------------------
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] aderm commented on a change in pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r393391421
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v5/define/GenericActionInstrumentation.java
##########
@@ -60,4 +60,10 @@ public String getConstructorInterceptor() {
protected ClassMatch enhanceClass() {
return byHierarchyMatch(new String[] {"org.elasticsearch.action.GenericAction"});
}
+
+ @Override
+ protected String[] witnessClasses() {
+ return new String[]{"org.elasticsearch.common.transport.InetSocketTransportAddress"};
Review comment:
recommended to put these and below const string witnesses in one place better.
----------------------------------------------------------------
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] Indifer commented on issue #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
Indifer commented on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-603627710
Wrong operation
----------------------------------------------------------------
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] aderm commented on a change in pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r393407480
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/interceptor/TransportActionNodeProxyExecuteMethodsInterceptorTest.java
##########
@@ -0,0 +1,160 @@
+/*
+ * 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.elasticsearch.v6.interceptor;
+
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractTracingSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.ExitSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.TraceSegment;
+import org.apache.skywalking.apm.agent.core.context.util.TagValuePair;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+import org.apache.skywalking.apm.agent.test.helper.SegmentHelper;
+import org.apache.skywalking.apm.agent.test.helper.SpanHelper;
+import org.apache.skywalking.apm.agent.test.tools.AgentServiceRule;
+import org.apache.skywalking.apm.agent.test.tools.SegmentStorage;
+import org.apache.skywalking.apm.agent.test.tools.SegmentStoragePoint;
+import org.apache.skywalking.apm.agent.test.tools.TracingSegmentRunner;
+import org.apache.skywalking.apm.plugin.elasticsearch.v6.TransportClientEnhanceInfo;
+import org.elasticsearch.action.get.GetRequest;
+import org.elasticsearch.cluster.node.DiscoveryNode;
+import org.elasticsearch.common.transport.TransportAddress;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.powermock.modules.junit4.PowerMockRunnerDelegate;
+
+import java.net.InetSocketAddress;
+import java.util.List;
+
+import static org.apache.skywalking.apm.agent.core.conf.Config.Plugin.Elasticsearch.TRACE_DSL;
+import static org.apache.skywalking.apm.network.trace.component.ComponentsDefine.TRANSPORT_CLIENT;
+import static org.junit.Assert.assertThat;
+import static org.hamcrest.CoreMatchers.is;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * date 2020.03.15 21:02
+ */
+@RunWith(PowerMockRunner.class)
+@PowerMockRunnerDelegate(TracingSegmentRunner.class)
+public class TransportActionNodeProxyExecuteMethodsInterceptorTest {
+
+ @SegmentStoragePoint
+ private SegmentStorage segmentStorage;
+
+ @Rule
+ public AgentServiceRule serviceRule = new AgentServiceRule();
+
+ @Mock
+ private EnhancedInstance enhancedInstance;
+
+ @Mock
+ private DiscoveryNode discoveryNode;
+
+ @Mock
+ private GetRequest getRequest;
+
+ @Mock
+ private TransportClientEnhanceInfo enhanceInfo;
+
+ private TransportActionNodeProxyExecuteMethodsInterceptor interceptor;
+
+ @Before
+ public void setUp() {
+
+ InetSocketAddress inetSocketAddress = new InetSocketAddress("122.122.122.122", 9300);
+ TransportAddress transportAddress = new TransportAddress(inetSocketAddress);
+ when(discoveryNode.getAddress()).thenReturn(transportAddress);
+
+ when(enhanceInfo.transportAddresses()).thenReturn("122.122.122.122:9300;");
+ when(enhancedInstance.getSkyWalkingDynamicField()).thenReturn(enhanceInfo);
+
+ interceptor = new TransportActionNodeProxyExecuteMethodsInterceptor();
+ }
+
+ @Test
+ public void testConstruct() {
+
+ final EnhancedInstance objInst1 = new EnhancedInstance() {
+ private Object object = null;
+
+ @Override
+ public Object getSkyWalkingDynamicField() {
+ return object;
+ }
+
+ @Override
+ public void setSkyWalkingDynamicField(Object value) {
+ this.object = value;
+ }
+ };
+
+ final EnhancedInstance objInst2 = new EnhancedInstance() {
+ private Object object = null;
+
+ @Override
+ public Object getSkyWalkingDynamicField() {
+ return object;
+ }
+
+ @Override
+ public void setSkyWalkingDynamicField(Object value) {
+ this.object = value;
+ }
+ };
+
+ objInst1.setSkyWalkingDynamicField(123);
+ Object[] allArguments = new Object[]{null, null, objInst1};
+
+ interceptor.onConstruct(objInst2, allArguments);
+ assertThat(objInst1.getSkyWalkingDynamicField(), is(objInst2.getSkyWalkingDynamicField()));
+ }
+
+ @Test
+ public void testMethodsAround() throws Throwable {
+ TRACE_DSL = true;
+ Object[] allArguments = new Object[]{discoveryNode, getRequest};
+
+ interceptor.beforeMethod(enhancedInstance, null, allArguments, null, null);
+ interceptor.afterMethod(enhancedInstance, null, allArguments, null, null);
+
+ List<TraceSegment> traceSegmentList = segmentStorage.getTraceSegments();
+ Assert.assertThat(traceSegmentList.size(), is(1));
+ TraceSegment traceSegment = traceSegmentList.get(0);
+
+ AbstractTracingSpan getSpan = SegmentHelper.getSpans(traceSegment).get(0);
+ assertGetSpan(getSpan, getRequest);
+ }
+
+ private void assertGetSpan(AbstractTracingSpan getSpan, Object ret) {
+ assertThat(getSpan instanceof ExitSpan, is(true));
+
+ ExitSpan span = (ExitSpan) getSpan;
+ assertThat(span.getOperationName().split("[$$]")[0], is("Elasticsearch/GetRequest"));
+ assertThat(SpanHelper.getComponentId(span), is(TRANSPORT_CLIENT.getId()));
+
+ List<TagValuePair> tags = SpanHelper.getTags(span);
+ Assert.assertTrue(tags.size() > 4);
+
Review comment:
It is recommended that the content of tags here be tested and verified.
----------------------------------------------------------------
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 #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-600967432
# [Codecov](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=h1) Report
> Merging [#4517](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=desc) into [master](https://codecov.io/gh/apache/skywalking/commit/e7f66c911eaf18a14793e5edf09788cb5f391f29&el=desc) will **increase** coverage by `0.07%`.
> The diff coverage is `37.03%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/skywalking/pull/4517/graphs/tree.svg?width=650&height=150&src=pr&token=qrILxY5yA8)](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #4517 +/- ##
==========================================
+ Coverage 25.57% 25.64% +0.07%
==========================================
Files 1246 1253 +7
Lines 28975 29164 +189
Branches 3974 4010 +36
==========================================
+ Hits 7410 7480 +70
- Misses 20873 20981 +108
- Partials 692 703 +11
```
| [Impacted Files](https://codecov.io/gh/apache/skywalking/pull/4517?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [.../apache/skywalking/apm/agent/core/conf/Config.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLWFnZW50LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NreXdhbGtpbmcvYXBtL2FnZW50L2NvcmUvY29uZi9Db25maWcuamF2YQ==) | `67.85% <0.00%> (-1.24%)` | :arrow_down: |
| [...walking/apm/plugin/elasticsearch/v5/Constants.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC01LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92NS9Db25zdGFudHMuamF2YQ==) | `0.00% <ø> (ø)` | |
| [...n/elasticsearch/v6/TransportClientEnhanceInfo.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9UcmFuc3BvcnRDbGllbnRFbmhhbmNlSW5mby5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...ceptor/TransportClientNodesServiceInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRDbGllbnROb2Rlc1NlcnZpY2VJbnRlcmNlcHRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...dapterActionFutureActionGetMethodsInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9BZGFwdGVyQWN0aW9uRnV0dXJlQWN0aW9uR2V0TWV0aG9kc0ludGVyY2VwdG9yLmphdmE=) | `33.82% <33.82%> (ø)` | |
| [...sportActionNodeProxyExecuteMethodsInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRBY3Rpb25Ob2RlUHJveHlFeGVjdXRlTWV0aG9kc0ludGVyY2VwdG9yLmphdmE=) | `38.33% <38.33%> (ø)` | |
| [...plugin/elasticsearch/v6/TransportAddressCache.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9UcmFuc3BvcnRBZGRyZXNzQ2FjaGUuamF2YQ==) | `57.89% <57.89%> (ø)` | |
| [...plugin/elasticsearch/v6/interceptor/Constants.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9Db25zdGFudHMuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| [...v6/interceptor/TransportServiceConInterceptor.java](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree#diff-YXBtLXNuaWZmZXIvYXBtLXNkay1wbHVnaW4vZWxhc3RpY3NlYXJjaC02LngtcGx1Z2luL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9za3l3YWxraW5nL2FwbS9wbHVnaW4vZWxhc3RpY3NlYXJjaC92Ni9pbnRlcmNlcHRvci9UcmFuc3BvcnRTZXJ2aWNlQ29uSW50ZXJjZXB0b3IuamF2YQ==) | `100.00% <100.00%> (ø)` | |
| ... and [6 more](https://codecov.io/gh/apache/skywalking/pull/4517/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/skywalking/pull/4517?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/4517?src=pr&el=footer). Last update [e7f66c9...916e979](https://codecov.io/gh/apache/skywalking/pull/4517?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] aderm commented on a change in pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r398644512
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/define/TransportActionNodeProxyInstrumentation.java
##########
@@ -0,0 +1,93 @@
+/*
+ * 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.elasticsearch.v6.define;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+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.StaticMethodsInterceptPoint;
+import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassEnhancePluginDefine;
+import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
+import org.apache.skywalking.apm.plugin.elasticsearch.v6.interceptor.Constants;
+
+import static net.bytebuddy.matcher.ElementMatchers.any;
+import static net.bytebuddy.matcher.ElementMatchers.named;
+import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
+
+/**
+ * date 2020.02.13 20:32
+ */
Review comment:
this comment is meaningless, it is recommended to add class comment, as are other important classes.
----------------------------------------------------------------
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] aderm commented on a change in pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r398680963
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/define/TransportServiceInstrumentation.java
##########
@@ -0,0 +1,76 @@
+/*
+ * 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.elasticsearch.v6.define;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+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.StaticMethodsInterceptPoint;
+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.plugin.elasticsearch.v6.interceptor.Constants;
+
+import static net.bytebuddy.matcher.ElementMatchers.any;
+import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
+
+/**
+ * date 2020.02.13 20:49
+ */
Review comment:
same as above
----------------------------------------------------------------
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 #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#issuecomment-600957300
@Indifer Have you finished the change?
----------------------------------------------------------------
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] aderm commented on a change in pull request #4517: fix
elasticsearch-5.x-plugin when use es6.x TransportClient error
Posted by GitBox <gi...@apache.org>.
aderm commented on a change in pull request #4517: fix elasticsearch-5.x-plugin when use es6.x TransportClient error
URL: https://github.com/apache/skywalking/pull/4517#discussion_r398645844
##########
File path: apm-sniffer/apm-sdk-plugin/elasticsearch-6.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/elasticsearch/v6/define/TransportClientNodesServiceInstrumentation.java
##########
@@ -0,0 +1,112 @@
+/*
+ * 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.elasticsearch.v6.define;
+
+import net.bytebuddy.description.method.MethodDescription;
+import net.bytebuddy.matcher.ElementMatcher;
+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.plugin.elasticsearch.v6.interceptor.Constants;
+
+import static net.bytebuddy.matcher.ElementMatchers.named;
+import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType;
+import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
+
+/**
+ * date 2020.02.13 22:29
+ */
Review comment:
this is same as above.
----------------------------------------------------------------
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