提交 d2a3a281 编写于 作者: L lytscu

Modify catalog

上级 f561b6ab
......@@ -53,7 +53,7 @@
<module>elastic-job-2.x-plugin</module>
<module>mongodb-2.x-plugin</module>
<module>httpasyncclient-4.x-plugin</module>
<module>servicecomb-java-chassis-plugin</module>
<module>servicecomb-plugin</module>
</modules>
<packaging>pom</packaging>
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-sdk-plugin</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>5.0.0-alpha</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>servicecomb-plugin</artifactId>
<modules>
<module>servicecomb-java-chassis-0.x-plugin</module>
</modules>
<packaging>pom</packaging>
<name>apm-sdk-plugin</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sdk.plugin.related.dir>/..</sdk.plugin.related.dir>
</properties>
</project>
\ No newline at end of file
......@@ -3,16 +3,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-sdk-plugin</artifactId>
<artifactId>servicecomb-plugin</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>5.0.0-alpha</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-servicecomb-java-chassis-plugin</artifactId>
<artifactId>apm-servicecomb-java-chassis-0.x-plugin</artifactId>
<packaging>jar</packaging>
<name>servicecomb-java-chassis-plugin</name>
<name>servicecomb-java-chassis-0.x-plugin</name>
<url>http://maven.apache.org</url>
......
......@@ -18,12 +18,12 @@
package org.apache.skywalking.apm.plugin.servicecomb;
import java.lang.reflect.Method;
import javax.ws.rs.core.Response.StatusType;
import io.servicecomb.core.Invocation;
import io.servicecomb.swagger.invocation.InvocationType;
import io.servicecomb.swagger.invocation.InvocationType;
import io.servicecomb.swagger.invocation.SwaggerInvocation;
import io.servicecomb.swagger.invocation.context.InvocationContext;
import io.servicecomb.swagger.invocation.context.InvocationContext;
import java.lang.reflect.Method;
import javax.ws.rs.core.Response.StatusType;
import org.apache.skywalking.apm.agent.core.context.CarrierItem;
import org.apache.skywalking.apm.agent.core.context.ContextCarrier;
import org.apache.skywalking.apm.agent.core.context.ContextManager;
......
......@@ -23,6 +23,7 @@ import io.servicecomb.swagger.invocation.InvocationType;
import io.servicecomb.swagger.invocation.SwaggerInvocation;
import io.servicecomb.swagger.invocation.context.InvocationContext;
import java.lang.reflect.Method;
import java.net.URI;
import javax.ws.rs.core.Response.StatusType;
import org.apache.skywalking.apm.agent.core.context.CarrierItem;
import org.apache.skywalking.apm.agent.core.context.ContextCarrier;
......@@ -61,7 +62,8 @@ public class NextInterceptor implements InstanceMethodsAroundInterceptor {
Integer count = (Integer)DEEP.get();
try {
if (count == 2) {
String peer = invocation.getEndpoint().getAddress().toString();
URI uri = new URI(invocation.getEndpoint().toString());
String peer = uri.getHost() + ":" + uri.getPort();
final ContextCarrier contextCarrier = new ContextCarrier();
span = ContextManager.createExitSpan(invocation.getOperationName(), contextCarrier, peer);
CarrierItem next = contextCarrier.items();
......
......@@ -18,9 +18,9 @@
package org.apache.skywalking.apm.plugin.servicecomb.define;
import io.servicecomb.core.Invocation;
import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.matcher.ElementMatcher;
import io.servicecomb.core.Invocation;
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;
......@@ -60,7 +60,7 @@ public class InvocationInstrumentation extends ClassInstanceMethodsEnhancePlugin
new InstanceMethodsInterceptPoint() {
@Override
public ElementMatcher<MethodDescription> getMethodsMatcher() {
return named("getHandlerChain");
return named("getHandlerContext");
}
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册