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 2018/04/12 03:35:23 UTC

[GitHub] wu-sheng closed pull request #1070: add ContextManager.isActive()

wu-sheng closed pull request #1070: add ContextManager.isActive()
URL: https://github.com/apache/incubator-skywalking/pull/1070
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/ContextManager.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/ContextManager.java
index 16b6a1dd2..b2d3a995a 100644
--- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/ContextManager.java
+++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/ContextManager.java
@@ -200,4 +200,8 @@ public void afterFinished(TraceSegment traceSegment) {
     public void afterFinished(IgnoredTracerContext traceSegment) {
         CONTEXT.remove();
     }
+
+    public static boolean isActive() {
+        return CONTEXT.get() != null;
+    }
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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