Skip to content

Commit a9c6a05

Browse files
committed
clarified log message and exception path
1 parent 5aa145e commit a9c6a05

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/main/java/com/microsoft/applicationinsights/internal/perfcounter/JniPCConnector.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,17 @@ public static double getValueOfPerformanceCounter(String name) {
150150
return getPerformanceCounterValue(name);
151151
}
152152

153+
/**
154+
* @throws NumberFormatException if pid cannot be parsed.
155+
*/
153156
private static void initNativeCode() {
154157
int processId = Integer.parseInt(SystemInformation.INSTANCE.getProcessId());
155158

156159
currentInstanceName = getInstanceName(processId);
157160
if (StringUtils.isEmpty(currentInstanceName)) {
158161
InternalLogger.INSTANCE.error("Failed to fetch current process instance name, process counters for for the process level will not be activated.");
159162
} else {
160-
InternalLogger.INSTANCE.trace("Java process name is set to '%s'", currentInstanceName);
163+
InternalLogger.INSTANCE.info("Java process instance name is set to '%s'", currentInstanceName);
161164
}
162165
}
163166

0 commit comments

Comments
 (0)