add ContextManager.isActive() (#1070)

This commit is contained in:
carlvine500 2018-04-12 11:35:19 +08:00 committed by 吴晟 Wu Sheng
parent 564239f1a2
commit 5ea5471c96
1 changed files with 4 additions and 0 deletions

View File

@ -200,4 +200,8 @@ public class ContextManager implements TracingContextListener, BootService, Igno
public void afterFinished(IgnoredTracerContext traceSegment) {
CONTEXT.remove();
}
public static boolean isActive() {
return CONTEXT.get() != null;
}
}