You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: instrumentation/jmx-metrics/javaagent/src/main/java/io/opentelemetry/instrumentation/javaagent/jmx/JmxMetricInsightInstaller.java
+5-6
Original file line number
Diff line number
Diff line change
@@ -33,23 +33,22 @@ public void afterAgent(AutoConfiguredOpenTelemetrySdk autoConfiguredSdk) {
33
33
34
34
if (config.getBoolean("otel.jmx.enabled", true)) {
Copy file name to clipboardExpand all lines: instrumentation/jmx-metrics/library/src/main/java/io/opentelemetry/instrumentation/jmx/engine/BeanFinder.java
+12-6
Original file line number
Diff line number
Diff line change
@@ -39,12 +39,18 @@ class BeanFinder {
39
39
voiddiscoverBeans(MetricConfigurationconf) {
40
40
this.conf = conf;
41
41
42
-
if (!conf.isEmpty()) {
43
-
// Issue 9336: Corner case: PlatformMBeanServer will remain unitialized until a direct
44
-
// reference to it is made. This call makes sure that the PlatformMBeanServer will be in
45
-
// the set of MBeanServers reported by MBeanServerFactory.
46
-
ManagementFactory.getPlatformMBeanServer();
47
-
}
42
+
exec.schedule(
43
+
() -> {
44
+
// Issue 9336: Corner case: PlatformMBeanServer will remain unitialized until a direct
45
+
// reference to it is made. This call makes sure that the PlatformMBeanServer will be in
46
+
// the set of MBeanServers reported by MBeanServerFactory.
47
+
// Issue 11143: This call initializes java.util.logging.LogManager. We should not call it
48
+
// before application has had a chance to configure custom log manager. This is needed for
0 commit comments