Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
295 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
profiler/src/main/java/com/navercorp/pinpoint/profiler/context/AsyncScopeUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.navercorp.pinpoint.profiler.context; | ||
|
||
import com.navercorp.pinpoint.bootstrap.context.Trace; | ||
import com.navercorp.pinpoint.bootstrap.context.scope.TraceScope; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
|
||
public final class AsyncScopeUtils { | ||
private static final Logger logger = LogManager.getLogger(AsyncScopeUtils.class); | ||
|
||
private AsyncScopeUtils() { | ||
} | ||
|
||
public static boolean nested(Trace trace, String scopeName) { | ||
// add async scope. | ||
final TraceScope oldScope = trace.addScope(scopeName); | ||
if (oldScope != null) { | ||
if (logger.isWarnEnabled()) { | ||
logger.warn("Duplicated {} scope={}", trace.getClass().getSimpleName(), oldScope.getName()); | ||
} | ||
// delete corrupted trace. | ||
// deleteAsyncTrace(trace); | ||
return true; | ||
} else { | ||
if (logger.isDebugEnabled()) { | ||
logger.debug("start {} scope", trace.getClass().getSimpleName()); | ||
} | ||
} | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.