Skip to content

Commit 996a541

Browse files
committed
check file system first
1 parent 2c56c2b commit 996a541

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

agent/runtime-attach/src/main/java/com/microsoft/applicationinsights/attach/ApplicationInsights.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ public static void attach() {
5555
System.setProperty(RUNTIME_ATTACHED_ENABLED_PROPERTY, "true");
5656

5757
try {
58-
Optional<String> jsonConfig = findJsonConfigFromClasspath();
58+
// check from file system first so user can override the classpath file
59+
Optional<String> jsonConfig = findJsonConfigFromFileSystem();
5960
if (!jsonConfig.isPresent()) {
60-
jsonConfig = findJsonConfigFromFileSystem();
61+
jsonConfig = findJsonConfigFromClasspath();
6162
}
6263
if (jsonConfig.isPresent()) {
6364
System.setProperty(RUNTIME_ATTACHED_JSON_PROPERTY, jsonConfig.get());

0 commit comments

Comments
 (0)