diff --git a/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/interceptor/SpanRecursiveAroundInterceptor.java b/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/interceptor/SpanRecursiveAroundInterceptor.java index 92fc8e2aea3b..fe9d451d8ab3 100644 --- a/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/interceptor/SpanRecursiveAroundInterceptor.java +++ b/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/interceptor/SpanRecursiveAroundInterceptor.java @@ -176,10 +176,9 @@ private boolean initScope(final Trace trace) { } private void entryScope(final Trace trace) { - if (ScopeUtils.entryScope(trace, this.scopeName)) { - if (isDebug) { - logger.debug("Try enter trace scope={}", scopeName); - } + ScopeUtils.entryScope(trace, this.scopeName); + if (isDebug) { + logger.debug("Try enter trace scope={}", scopeName); } } diff --git a/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/util/ScopeUtils.java b/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/util/ScopeUtils.java index 4dd182f56258..beb6d50015f6 100644 --- a/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/util/ScopeUtils.java +++ b/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/util/ScopeUtils.java @@ -11,17 +11,15 @@ public final class ScopeUtils { private ScopeUtils() { } - public static boolean entryAsyncTraceScope(final Trace trace) { - return entryScope(trace, ASYNC_TRACE_SCOPE); + public static void entryAsyncTraceScope(final Trace trace) { + entryScope(trace, ASYNC_TRACE_SCOPE); } - public static boolean entryScope(final Trace trace, final String scopeName) { + public static void entryScope(final Trace trace, final String scopeName) { final TraceScope scope = trace.getScope(scopeName); if (scope != null) { scope.tryEnter(); - return true; } - return false; } public static boolean leaveAsyncTraceScope(final Trace trace) { diff --git a/plugins/rocketmq/src/main/java/com/navercorp/pinpoint/plugin/rocketmq/interceptor/ProducerSendInterceptor.java b/plugins/rocketmq/src/main/java/com/navercorp/pinpoint/plugin/rocketmq/interceptor/ProducerSendInterceptor.java index a7d690395e71..649156c224a1 100644 --- a/plugins/rocketmq/src/main/java/com/navercorp/pinpoint/plugin/rocketmq/interceptor/ProducerSendInterceptor.java +++ b/plugins/rocketmq/src/main/java/com/navercorp/pinpoint/plugin/rocketmq/interceptor/ProducerSendInterceptor.java @@ -248,10 +248,9 @@ private boolean initScope(final Trace trace) { } private void entryScope(final Trace trace) { - if (ScopeUtils.entryScope(trace, SCOPE_NAME)) { - if (isDebug) { - logger.debug("Try enter trace scope={}", SCOPE_NAME); - } + ScopeUtils.entryScope(trace, SCOPE_NAME); + if (isDebug) { + logger.debug("Try enter trace scope={}", SCOPE_NAME); } } diff --git a/plugins/thrift/src/main/java/com/navercorp/pinpoint/plugin/thrift/interceptor/tprotocol/server/TProtocolReadMessageEndInterceptor.java b/plugins/thrift/src/main/java/com/navercorp/pinpoint/plugin/thrift/interceptor/tprotocol/server/TProtocolReadMessageEndInterceptor.java index 504236f90f16..a17dffcef172 100644 --- a/plugins/thrift/src/main/java/com/navercorp/pinpoint/plugin/thrift/interceptor/tprotocol/server/TProtocolReadMessageEndInterceptor.java +++ b/plugins/thrift/src/main/java/com/navercorp/pinpoint/plugin/thrift/interceptor/tprotocol/server/TProtocolReadMessageEndInterceptor.java @@ -379,10 +379,9 @@ private boolean initScope(final Trace trace) { } private void entryScope(final Trace trace) { - if (ScopeUtils.entryScope(trace, SCOPE_NAME)) { - if (isDebug) { - logger.debug("Try enter trace scope={}", SCOPE_NAME); - } + ScopeUtils.entryScope(trace, SCOPE_NAME); + if (isDebug) { + logger.debug("Try enter trace scope={}", SCOPE_NAME); } } diff --git a/plugins/user/src/main/java/com/navercorp/pinpoint/plugin/user/interceptor/UserIncludeMethodInterceptor.java b/plugins/user/src/main/java/com/navercorp/pinpoint/plugin/user/interceptor/UserIncludeMethodInterceptor.java index 2db15f774893..2a4b52a44ed2 100644 --- a/plugins/user/src/main/java/com/navercorp/pinpoint/plugin/user/interceptor/UserIncludeMethodInterceptor.java +++ b/plugins/user/src/main/java/com/navercorp/pinpoint/plugin/user/interceptor/UserIncludeMethodInterceptor.java @@ -181,10 +181,9 @@ private void deleteUserIncludeTrace(final Trace trace) { } private void entryUserIncludeTraceScope(final Trace trace) { - if (ScopeUtils.entryScope(trace, SCOPE_NAME)) { - if (isDebug) { - logger.debug("Try enter trace scope={}", SCOPE_NAME); - } + ScopeUtils.entryScope(trace, SCOPE_NAME); + if (isDebug) { + logger.debug("Try enter trace scope={}", SCOPE_NAME); } } diff --git a/plugins/vertx/src/main/java/com/navercorp/pinpoint/plugin/vertx/interceptor/ServerConnectionHandleRequestInterceptor.java b/plugins/vertx/src/main/java/com/navercorp/pinpoint/plugin/vertx/interceptor/ServerConnectionHandleRequestInterceptor.java index 55c9d5ba5e92..cf3ba97392cf 100644 --- a/plugins/vertx/src/main/java/com/navercorp/pinpoint/plugin/vertx/interceptor/ServerConnectionHandleRequestInterceptor.java +++ b/plugins/vertx/src/main/java/com/navercorp/pinpoint/plugin/vertx/interceptor/ServerConnectionHandleRequestInterceptor.java @@ -289,10 +289,9 @@ private boolean initScope(final Trace trace) { } private void entryScope(final Trace trace) { - if (ScopeUtils.entryScope(trace, SCOPE_NAME)) { - if (isDebug) { - logger.debug("Try enter trace scope={}", SCOPE_NAME); - } + ScopeUtils.entryScope(trace, SCOPE_NAME); + if (isDebug) { + logger.debug("Try enter trace scope={}", SCOPE_NAME); } } diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/id/LocalTraceRootImpl.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/id/LocalTraceRootImpl.java index d7dd0c390d89..322fa560db6b 100644 --- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/id/LocalTraceRootImpl.java +++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/id/LocalTraceRootImpl.java @@ -44,9 +44,11 @@ public Shared getShared() { @Override public String toString() { - return "DefaultLocalTraceRoot{" + - ", agentId='" + agentId + '\'' + + return "LocalTraceRootImpl{" + + "agentId='" + agentId + '\'' + + ", localTransactionId=" + localTransactionId + ", traceStartTime=" + traceStartTime + + ", shared=" + shared + '}'; } } diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/id/RemoteTraceRootImpl.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/id/RemoteTraceRootImpl.java index 04487fe5685c..aac3050cf35d 100644 --- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/id/RemoteTraceRootImpl.java +++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/id/RemoteTraceRootImpl.java @@ -39,10 +39,12 @@ public TraceId getTraceId() { @Override public String toString() { - return "DefaultRemoteTraceRoot{" + + return "RemoteTraceRootImpl{" + "traceId=" + traceId + ", agentId='" + agentId + '\'' + + ", localTransactionId=" + localTransactionId + ", traceStartTime=" + traceStartTime + + ", shared=" + shared + '}'; }