Merge pull request #563 from jaehong-kim/user-include

User include
This commit is contained in:
Jaehong Kim
2015-06-08 17:27:24 +09:00
2 changed files with 4 additions and 3 deletions
+3
View File
@@ -66,6 +66,9 @@ profiler.type.detect.order=
###########################################################
profiler.include=
# jetty entry point
profiler.user.include=org.eclipse.jetty.servlet.ServletHandler.doHandle, org.eclipse.jetty.server.Server.handle
###########################################################
# TOMCAT #
###########################################################
@@ -35,7 +35,6 @@ public class UserIncludeMethodInterceptor implements SimpleAroundInterceptor {
private TraceContext traceContext;
private MethodDescriptor descriptor;
private boolean span = false;
public UserIncludeMethodInterceptor(TraceContext traceContext, MethodDescriptor methodDescriptor) {
this.traceContext = traceContext;
@@ -53,7 +52,6 @@ public class UserIncludeMethodInterceptor implements SimpleAroundInterceptor {
Trace trace = traceContext.currentTraceObject();
if (trace == null) {
trace = traceContext.newTraceObject();
span = true;
if (!trace.canSampled()) {
if(isDebug) {
logger.debug("New trace and can't sampled {}", trace);
@@ -95,7 +93,7 @@ public class UserIncludeMethodInterceptor implements SimpleAroundInterceptor {
trace.markAfterTime();
} finally {
trace.traceBlockEnd();
if(span) {
if(trace.isRootStack()) {
trace.markAfterTime();
trace.close();
traceContext.removeTraceObject();