Fix spanLayer is null in optional plugin(gateway-2.0.x-plugin gateway-2.1.x-plugin) (#6683)
This commit is contained in:
parent
f6e2467e09
commit
776f19c702
|
|
@ -31,6 +31,7 @@ Release Notes.
|
|||
* Fix NullPointerException with `ReactiveRequestHolder.getHeaders`.
|
||||
* Fix springmvc reactive api can't collect HTTP statusCode.
|
||||
* Fix bug that asynchttpclient plugin does not record the response status code
|
||||
* Fix spanLayer is null in optional plugin(gateway-2.0.x-plugin gateway-2.1.x-plugin).
|
||||
|
||||
#### OAP-Backend
|
||||
* Allow user-defined `JAVA_OPTS` in the startup script.
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ 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.tag.Tags;
|
||||
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;
|
||||
|
|
@ -52,7 +53,7 @@ public class HttpClientRequestInterceptor implements InstanceMethodsAroundInterc
|
|||
"SpringCloudGateway/sendRequest", contextCarrier, getPeer(url));
|
||||
abstractSpan.prepareForAsync();
|
||||
Tags.URL.set(abstractSpan, String.valueOf(allArguments[1]));
|
||||
|
||||
abstractSpan.setLayer(SpanLayer.HTTP);
|
||||
abstractSpan.setComponent(SPRING_CLOUD_GATEWAY);
|
||||
ContextManager.stopSpan(abstractSpan);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ 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.tag.Tags;
|
||||
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;
|
||||
|
|
@ -53,7 +54,7 @@ public class HttpClientFinalizerSendInterceptor implements InstanceMethodsAround
|
|||
Tags.URL.set(abstractSpan, enhanceObjectCache.getUrl());
|
||||
abstractSpan.prepareForAsync();
|
||||
abstractSpan.setComponent(SPRING_CLOUD_GATEWAY);
|
||||
|
||||
abstractSpan.setLayer(SpanLayer.HTTP);
|
||||
ContextManager.stopSpan(abstractSpan);
|
||||
ContextManager.stopSpan(span);
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ segmentItems:
|
|||
operationId: 0
|
||||
parentSpanId: 0
|
||||
spanId: 1
|
||||
spanLayer: Http
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 61
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ segmentItems:
|
|||
operationId: 0
|
||||
parentSpanId: 0
|
||||
spanId: 1
|
||||
spanLayer: Http
|
||||
startTime: nq 0
|
||||
endTime: nq 0
|
||||
componentId: 61
|
||||
|
|
|
|||
Loading…
Reference in New Issue