|
10 | 10 | import static datadog.trace.util.AgentThreadFactory.AgentThread.PROFILER_STARTUP; |
11 | 11 | import static datadog.trace.util.AgentThreadFactory.AgentThread.TRACE_STARTUP; |
12 | 12 | import static datadog.trace.util.AgentThreadFactory.newAgentThread; |
13 | | -import static datadog.trace.util.Strings.getResourceName; |
14 | 13 | import static datadog.trace.util.Strings.propertyNameToSystemPropertyName; |
15 | 14 | import static datadog.trace.util.Strings.toEnvVar; |
16 | 15 |
|
@@ -1267,14 +1266,8 @@ private static boolean isAppUsingCustomLogManager(final EnumSet<Library> librari |
1267 | 1266 |
|
1268 | 1267 | final String logManagerProp = System.getProperty("java.util.logging.manager"); |
1269 | 1268 | if (logManagerProp != null) { |
1270 | | - final boolean onSysClasspath = |
1271 | | - ClassLoader.getSystemResource(getResourceName(logManagerProp)) != null; |
1272 | 1269 | log.debug("Prop - logging.manager: {}", logManagerProp); |
1273 | | - log.debug("logging.manager on system classpath: {}", onSysClasspath); |
1274 | | - // Some applications set java.util.logging.manager but never actually initialize the logger. |
1275 | | - // Check to see if the configured manager is on the system classpath. |
1276 | | - // If so, it should be safe to initialize jmxfetch which will setup the log manager. |
1277 | | - return !onSysClasspath; |
| 1270 | + return true; |
1278 | 1271 | } |
1279 | 1272 |
|
1280 | 1273 | return false; |
@@ -1305,14 +1298,8 @@ private static boolean isAppUsingCustomJMXBuilder(final EnumSet<Library> librari |
1305 | 1298 |
|
1306 | 1299 | final String jmxBuilderProp = System.getProperty("javax.management.builder.initial"); |
1307 | 1300 | if (jmxBuilderProp != null) { |
1308 | | - final boolean onSysClasspath = |
1309 | | - ClassLoader.getSystemResource(getResourceName(jmxBuilderProp)) != null; |
1310 | 1301 | log.debug("Prop - javax.management.builder.initial: {}", jmxBuilderProp); |
1311 | | - log.debug("javax.management.builder.initial on system classpath: {}", onSysClasspath); |
1312 | | - // Some applications set javax.management.builder.initial but never actually initialize JMX. |
1313 | | - // Check to see if the configured JMX builder is on the system classpath. |
1314 | | - // If so, it should be safe to initialize jmxfetch which will setup JMX. |
1315 | | - return !onSysClasspath; |
| 1302 | + return true; |
1316 | 1303 | } |
1317 | 1304 |
|
1318 | 1305 | return false; |
|
0 commit comments