[GitHub] [skywalking] mrproliu commented on a change in pull request #3640: Provide agent plugin netty-socketio

2019-10-23 Thread GitBox
mrproliu commented on a change in pull request #3640: Provide agent plugin 
netty-socketio
URL: https://github.com/apache/skywalking/pull/3640#discussion_r337890743
 
 

 ##
 File path: 
apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOOnEventInterceptor.java
 ##
 @@ -0,0 +1,63 @@
+/*
+ * 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.netty.socketio;
+
+import org.apache.skywalking.apm.agent.core.context.ContextCarrier;
+import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
+import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
+
+import java.lang.reflect.Method;
+
+/**
+ * @author MrPro
+ */
+public class NettySocketIOOnEventInterceptor implements 
InstanceMethodsAroundInterceptor {
+
+@Override
+public void beforeMethod(EnhancedInstance objInst, Method method, Object[] 
allArguments, Class[] argumentsTypes, MethodInterceptResult result) throws 
Throwable {
+String eventName = (String) allArguments[1];
+
+// no place to get context carrier
+ContextCarrier contextCarrier = new ContextCarrier();
+contextCarrier.items();
 
 Review comment:
   resolved, delete `contextCarrier.items()` method invoke and blank line.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [skywalking] mrproliu commented on a change in pull request #3640: Provide agent plugin netty-socketio

2019-10-22 Thread GitBox
mrproliu commented on a change in pull request #3640: Provide agent plugin 
netty-socketio
URL: https://github.com/apache/skywalking/pull/3640#discussion_r337829296
 
 

 ##
 File path: 
apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOOnEventInterceptor.java
 ##
 @@ -0,0 +1,61 @@
+/*
+ * 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.netty.socketio;
+
+import org.apache.skywalking.apm.agent.core.context.ContextCarrier;
+import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
+import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
+
+import java.lang.reflect.Method;
+
+/**
+ * @author MrPro
+ */
+public class NettySocketIOOnEventInterceptor implements 
InstanceMethodsAroundInterceptor {
+
+@Override
+public void beforeMethod(EnhancedInstance objInst, Method method, Object[] 
allArguments, Class[] argumentsTypes, MethodInterceptResult result) throws 
Throwable {
+String eventName = (String) allArguments[1];
+
+// no place to get context carrier
+ContextCarrier contextCarrier = new ContextCarrier();
+contextCarrier.items();
+
+AbstractSpan span = ContextManager.createEntrySpan("SocketIO/" + 
eventName + "/receive", contextCarrier);
+span.setComponent(ComponentsDefine.SOCKET_IO);
+SpanLayer.asHttp(span);
+}
+
+@Override
+public Object afterMethod(EnhancedInstance objInst, Method method, 
Object[] allArguments, Class[] argumentsTypes, Object ret) throws Throwable {
+ContextManager.stopSpan();
+return ret;
+}
+
+@Override
+public void handleMethodException(EnhancedInstance objInst, Method method, 
Object[] allArguments, Class[] argumentsTypes, Throwable t) {
+ContextManager.activeSpan().errorOccurred().log(t);
+}
 
 Review comment:
   resolved.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [skywalking] mrproliu commented on a change in pull request #3640: Provide agent plugin netty-socketio

2019-10-22 Thread GitBox
mrproliu commented on a change in pull request #3640: Provide agent plugin 
netty-socketio
URL: https://github.com/apache/skywalking/pull/3640#discussion_r337825252
 
 

 ##
 File path: 
test/plugin/scenarios/netty-socketio-scenario/config/expectedData.yaml
 ##
 @@ -0,0 +1,97 @@
+# 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.
+
+registryItems:
+  applications:
+- {netty-socketio-scenario: 2}
+  instances:
+- {netty-socketio-scenario: 1}
+  operationNames:
+- netty-socketio-scenario: [/netty-socketio-scenario/case/netty-socketio, 
/socket.io/,
+/netty-socketio-scenario/healthCheck, 
SocketIO/onConnect, SocketIO/send_data/receive]
+  heartbeat: []
+segmentItems:
+  - applicationCode: netty-socketio-scenario
+segmentSize: ge 5
+segments:
+  - segmentId: not null
+spans:
+  - operationName: /netty-socketio-scenario/healthCheck
+operationId: 0
+parentSpanId: -1
 
 Review comment:
   resolved. 


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [skywalking] mrproliu commented on a change in pull request #3640: Provide agent plugin netty-socketio

2019-10-21 Thread GitBox
mrproliu commented on a change in pull request #3640: Provide agent plugin 
netty-socketio
URL: https://github.com/apache/skywalking/pull/3640#discussion_r337314201
 
 

 ##
 File path: Jenkinsfile-Agent-Test
 ##
 @@ -88,6 +88,12 @@ pipeline {
 sh 'bash test/plugin/run.sh 
--build_id=wl1_${BUILD_ID} spring-async-scenario'
 }
 }
+
+stage('netty-socketio 1.x (4)') {
+steps {
+sh 'bash test/plugin/run.sh 
--build_id=${BUILD_ID} netty-socketio-scenario'
 
 Review comment:
   resolved


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [skywalking] mrproliu commented on a change in pull request #3640: Provide agent plugin netty-socketio

2019-10-20 Thread GitBox
mrproliu commented on a change in pull request #3640: Provide agent plugin 
netty-socketio
URL: https://github.com/apache/skywalking/pull/3640#discussion_r336828653
 
 

 ##
 File path: Jenkinsfile-Agent-Test
 ##
 @@ -81,11 +81,17 @@ pipeline {
 }
 }
 
-stage('spring async 4.3.x-5.1.x (35)') {
-steps {
 
 Review comment:
   fixed.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [skywalking] mrproliu commented on a change in pull request #3640: Provide agent plugin netty-socketio

2019-10-20 Thread GitBox
mrproliu commented on a change in pull request #3640: Provide agent plugin 
netty-socketio
URL: https://github.com/apache/skywalking/pull/3640#discussion_r336826468
 
 

 ##
 File path: 
test/plugin/scenarios/netty-socketio-scenario/config/expectedData.yaml
 ##
 @@ -0,0 +1,97 @@
+# 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.
+
+registryItems:
+  applications:
+- {netty-socketio-scenario: 2}
+  instances:
+- {netty-socketio-scenario: 1}
+  operationNames:
+- netty-socketio-scenario: [/netty-socketio-scenario/case/netty-socketio, 
/socket.io/,
+/netty-socketio-scenario/healthCheck, 
SocketIO/onConnect, SocketIO/send_data/receive]
+  heartbeat: []
+segmentItems:
+  - applicationCode: netty-socketio-scenario
+segmentSize: ge 5
 
 Review comment:
   cause In this plugin, we havent provide socket.io-client intercept.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [skywalking] mrproliu commented on a change in pull request #3640: Provide agent plugin netty-socketio

2019-10-20 Thread GitBox
mrproliu commented on a change in pull request #3640: Provide agent plugin 
netty-socketio
URL: https://github.com/apache/skywalking/pull/3640#discussion_r336818914
 
 

 ##
 File path: Jenkinsfile-Agent-Test
 ##
 @@ -81,11 +81,17 @@ pipeline {
 }
 }
 
-stage('spring async 4.3.x-5.1.x (35)') {
-steps {
 
 Review comment:
   sorry? what can I do?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [skywalking] mrproliu commented on a change in pull request #3640: Provide agent plugin netty-socketio

2019-10-20 Thread GitBox
mrproliu commented on a change in pull request #3640: Provide agent plugin 
netty-socketio
URL: https://github.com/apache/skywalking/pull/3640#discussion_r336818344
 
 

 ##
 File path: 
apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/test/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOTest.java
 ##
 @@ -0,0 +1,154 @@
+/*
+ * 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.netty.socketio;
+
+import com.corundumstudio.socketio.SocketIOClient;
+import com.corundumstudio.socketio.handler.ClientHead;
+import com.corundumstudio.socketio.namespace.Namespace;
+import com.corundumstudio.socketio.protocol.Packet;
+import com.corundumstudio.socketio.transport.NamespaceClient;
+import org.apache.skywalking.apm.agent.core.context.trace.TraceSegment;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+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.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 org.powermock.reflect.Whitebox;
+
+import java.lang.reflect.Method;
+import java.net.InetSocketAddress;
+import java.util.List;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+/**
+ * @author MrPro
+ */
+@RunWith(PowerMockRunner.class)
+@PowerMockRunnerDelegate(TracingSegmentRunner.class)
+public class NettySocketIOTest {
+
+@SegmentStoragePoint
+private SegmentStorage segmentStorage;
+
+@Rule
+public AgentServiceRule serviceRule = new AgentServiceRule();
+
+private NettySocketIOConnectionInterceptor connectionInterceptor;
+private NettySocketIOOnEventInterceptor onEventInterceptor;
+private NettySocketIORoomInterceptor roomInterceptor;
+private NettySocketIOConstructorInterceptor constructorInterceptor;
+
+@Mock
+private SocketIOClient socketIOClient;
+@Mock
+private Packet sendPacket;
+@Mock
+private ClientHead clientHead;
+@Mock
+private Namespace namespace;
+
+private Method connectOnConnectMethod;
+private Method connectOnDisConnectMethod;
+private Method roomLeaveMethod;
+private Method roomJoinMethod;
+
+private NettySocketIOClientInfo socketIOClientInfo = new 
NettySocketIOClientInfo(null, null, "127.0.0.1:9092");
+
+private EnhancedInstance enhancedInstance = new EnhancedInstance() {
+@Override
+public Object getSkyWalkingDynamicField() {
+return socketIOClientInfo;
+}
+
+@Override
+public void setSkyWalkingDynamicField(Object value) {
+
+}
+};
+
+@Before
+public void setUp() {
+InetSocketAddress addr = new InetSocketAddress("127.0.0.1", 9092);
 
 Review comment:
   It just for declear, not bind system port actually. but I also change it to 
prevent confusion.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [skywalking] mrproliu commented on a change in pull request #3640: Provide agent plugin netty-socketio

2019-10-18 Thread GitBox
mrproliu commented on a change in pull request #3640: Provide agent plugin 
netty-socketio
URL: https://github.com/apache/skywalking/pull/3640#discussion_r336426810
 
 

 ##
 File path: 
apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOSendInterceptor.java
 ##
 @@ -0,0 +1,58 @@
+/*
+ * 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.netty.socketio;
+
+import com.corundumstudio.socketio.protocol.Packet;
+import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
+import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
+
+import java.lang.reflect.Method;
+
+/**
+ * @author MrPro
+ */
+public class NettySocketIOSendInterceptor implements 
InstanceMethodsAroundInterceptor {
+
+@Override
+public void beforeMethod(EnhancedInstance objInst, Method method, Object[] 
allArguments, Class[] argumentsTypes, MethodInterceptResult result) throws 
Throwable {
+
+NettySocketIOClientInfo clientInfo = (NettySocketIOClientInfo) 
objInst.getSkyWalkingDynamicField();
+Packet packet = (Packet) allArguments[0];
+
+AbstractSpan span = ContextManager.createExitSpan("SocketIO/" + 
packet.getName() + "/send", clientInfo.getClientAddress());
 
 Review comment:
   ok, deleted.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [skywalking] mrproliu commented on a change in pull request #3640: Provide agent plugin netty-socketio

2019-10-18 Thread GitBox
mrproliu commented on a change in pull request #3640: Provide agent plugin 
netty-socketio
URL: https://github.com/apache/skywalking/pull/3640#discussion_r336339580
 
 

 ##
 File path: 
apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOSendInterceptor.java
 ##
 @@ -0,0 +1,58 @@
+/*
+ * 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.netty.socketio;
+
+import com.corundumstudio.socketio.protocol.Packet;
+import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
+import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
+
+import java.lang.reflect.Method;
+
+/**
+ * @author MrPro
+ */
+public class NettySocketIOSendInterceptor implements 
InstanceMethodsAroundInterceptor {
+
+@Override
+public void beforeMethod(EnhancedInstance objInst, Method method, Object[] 
allArguments, Class[] argumentsTypes, MethodInterceptResult result) throws 
Throwable {
+
+NettySocketIOClientInfo clientInfo = (NettySocketIOClientInfo) 
objInst.getSkyWalkingDynamicField();
+Packet packet = (Packet) allArguments[0];
+
+AbstractSpan span = ContextManager.createExitSpan("SocketIO/" + 
packet.getName() + "/send", clientInfo.getClientAddress());
 
 Review comment:
   I think what you said is right. The exit span IPs is from Internet, and It 
will create a lot of nodes and topology, that's not what we need. Maybe I 
should delete the exit span create?


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [skywalking] mrproliu commented on a change in pull request #3640: Provide agent plugin netty-socketio

2019-10-17 Thread GitBox
mrproliu commented on a change in pull request #3640: Provide agent plugin 
netty-socketio
URL: https://github.com/apache/skywalking/pull/3640#discussion_r336291179
 
 

 ##
 File path: 
apm-sniffer/apm-sdk-plugin/netty-socketio-plugin/src/main/java/org/apache/skywalking/apm/plugin/netty/socketio/NettySocketIOOnEventInterceptor.java
 ##
 @@ -0,0 +1,61 @@
+/*
+ * 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.netty.socketio;
+
+import org.apache.skywalking.apm.agent.core.context.ContextCarrier;
+import org.apache.skywalking.apm.agent.core.context.ContextManager;
+import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
+import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
+import 
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
+import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
+
+import java.lang.reflect.Method;
+
+/**
+ * @author MrPro
+ */
+public class NettySocketIOOnEventInterceptor implements 
InstanceMethodsAroundInterceptor {
+
+@Override
+public void beforeMethod(EnhancedInstance objInst, Method method, Object[] 
allArguments, Class[] argumentsTypes, MethodInterceptResult result) throws 
Throwable {
+String eventName = (String) allArguments[1];
+
+// no place to get context carrier
+ContextCarrier contextCarrier = new ContextCarrier();
 
 Review comment:
   Could we discuss why there is no place to get context?
   Cause It's always works on cross-language. like browser client use 
[SocketIO](https://socket.io/) send message/event to server using javascript, 
or server push message/event to client.
   
   What is point of providing this plugin?
   Our company using socketIO for a while, we don't know server handle client 
request is correct, so we want to monitor on it. It's help us positioning many 
issue.
   If don't need this plugin, I can close it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services