File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -812,6 +812,14 @@ private static synchronized void startJmx() {
812812 registerSmapEntryEvent ();
813813 if (PROFILER_INIT_AFTER_JMX != null ) {
814814 try {
815+ /*
816+ When getJmxStartDelay() is set to 0 we will attempt to initialize the JMX subsystem as soon as available.
817+ But, this can cause issues with JFR as it needs some 'grace period' after JMX is ready. That's why we are
818+ re-scheduling the profiler initialization code just a tad later.
819+
820+ If the jmx start delay is set, we are already delayed relative to the jmx init so we can just plainly
821+ run the initialization code.
822+ */
815823 if (getJmxStartDelay () == 0 ) {
816824 log .debug ("Waiting for profiler initialization" );
817825 AgentTaskScheduler .INSTANCE .scheduleWithJitter (
You can’t perform that action at this time.
0 commit comments