Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,19 @@ public void init(EarlyInitAgentConfig earlyConfig) {
startupLogger.debug("JAVA_TOOL_OPTIONS: " + System.getenv("JAVA_TOOL_OPTIONS"));
}

String classPath = System.getProperty("java.class.path");
// class path null with a Spring Boot executable JAR
if (classPath != null
&& classPath.contains(
"applicationinsights-agent")) { // JAR name in Maven central, the user could have
// renamed it
startupLogger.warn(
"The applicationinsights-agent JAR is in the class path. You should remove it because it could lead to unexpected results. You should configure the Java agent with -javaagent. You can also use the runtime attachment with Spring Boot applications.");
}

if (startupLogger.isTraceEnabled()) {
startupLogger.trace("OS: " + System.getProperty("os.name"));
startupLogger.trace("Classpath: " + System.getProperty("java.class.path"));
startupLogger.trace("Classpath: " + classPath);
startupLogger.trace("Netty versions: " + NettyVersions.extract());
startupLogger.trace("Env: " + System.getenv());
startupLogger.trace("System properties: " + findSystemProperties());
Expand Down
Loading