File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
agent/agent/src/main/java/com/microsoft/applicationinsights/agent Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1717
1818final class StartupProfiler {
1919
20- private static final String STACKTRACES = "stacktrace.txt" ;
21-
2220 @ SuppressWarnings ("SystemOut" )
2321 public static void start () {
2422 String tempDirectory = System .getProperty ("java.io.tmpdir" );
@@ -28,7 +26,7 @@ public static void start() {
2826 return ;
2927 }
3028
31- File dumpFile = new File (folder , STACKTRACES );
29+ File dumpFile = new File (folder , getThreadDumpFilename () );
3230 System .out .println ("Writing startup profiler to '" + dumpFile .getPath () + "'" );
3331
3432 PrintWriter printWriter ;
@@ -50,6 +48,10 @@ private static void start(PrintWriter out) {
5048 thread .start ();
5149 }
5250
51+ private static String getThreadDumpFilename () {
52+ return "stacktrace-" + System .currentTimeMillis () + ".txt" ;
53+ }
54+
5355 private static class ThreadDump implements Runnable {
5456
5557 private final PrintWriter out ;
You can’t perform that action at this time.
0 commit comments