This is an automated email from the ASF dual-hosted git repository.

jooks pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new 2603db2  [type: fix]: fix JaegerGlobalPluginHandler.class to resolve 
NPE. (#2933)
2603db2 is described below

commit 2603db2df10448c836933e7711a5c4daae28d087
Author: YuI <[email protected]>
AuthorDate: Thu Feb 24 15:00:56 2022 +0800

    [type: fix]: fix JaegerGlobalPluginHandler.class to resolve NPE. (#2933)
    
    * [type: modify]: remove tag of big object in trace.
    
    * [type: feature]: add a part of metrics in agent
    
    * [type: modify]: delete test code.
    
    * [type: modify]: modify shenyu-agent-plugin-metrics-prometheus's module 
pom.xml.
    
    * [type: fix]: fix JaegerGlobalPluginHandler.class to resolve NPE.
    
    Co-authored-by: 艺铭 <[email protected]>
---
 .../agent/plugin/tracing/jaeger/handler/JaegerGlobalPluginHandler.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/shenyu-agent/shenyu-agent-plugins/shenyu-agent-plugin-tracing/shenyu-agent-plugin-tracing-jaeger/src/main/java/org/apache/shenyu/agent/plugin/tracing/jaeger/handler/JaegerGlobalPluginHandler.java
 
b/shenyu-agent/shenyu-agent-plugins/shenyu-agent-plugin-tracing/shenyu-agent-plugin-tracing-jaeger/src/main/java/org/apache/shenyu/agent/plugin/tracing/jaeger/handler/JaegerGlobalPluginHandler.java
index 95cab3c..80b748b 100644
--- 
a/shenyu-agent/shenyu-agent-plugins/shenyu-agent-plugin-tracing/shenyu-agent-plugin-tracing-jaeger/src/main/java/org/apache/shenyu/agent/plugin/tracing/jaeger/handler/JaegerGlobalPluginHandler.java
+++ 
b/shenyu-agent/shenyu-agent-plugins/shenyu-agent-plugin-tracing/shenyu-agent-plugin-tracing-jaeger/src/main/java/org/apache/shenyu/agent/plugin/tracing/jaeger/handler/JaegerGlobalPluginHandler.java
@@ -58,7 +58,7 @@ public final class JaegerGlobalPluginHandler implements 
InstanceMethodHandler {
         Object result = methodResult.getResult();
         Span span = (Span) target.getContext();
         ServerWebExchange exchange = (ServerWebExchange) args[0];
-        JaegerSpanManager manager = (JaegerSpanManager) 
exchange.getAttributes().get(TracingConstants.ROOT_SPAN);
+        JaegerSpanManager manager = (JaegerSpanManager) 
exchange.getAttributes().get(TracingConstants.SHENYU_AGENT);
 
         if (result instanceof Mono) {
             return ((Mono) result).doFinally(s -> {

Reply via email to