Skip to content

Commit

Permalink
add JFR queuetime threshold to recording settings (#7609)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardstartin authored Sep 12, 2024
1 parent bbd40f0 commit 2cbbb43
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
import static datadog.trace.api.config.ProfilingConfig.PROFILING_HEAP_HISTOGRAM_ENABLED_DEFAULT;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_HEAP_HISTOGRAM_MODE;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_HEAP_HISTOGRAM_MODE_DEFAULT;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_QUEUEING_TIME_ENABLED;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_QUEUEING_TIME_ENABLED_DEFAULT;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_QUEUEING_TIME_THRESHOLD_MILLIS;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_QUEUEING_TIME_THRESHOLD_MILLIS_DEFAULT;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_ULTRA_MINIMAL;

import com.datadog.profiling.controller.ConfigurationException;
Expand Down Expand Up @@ -159,6 +163,15 @@ public OpenJdkController(final ConfigProvider configProvider)
}
}

if (configProvider.getBoolean(
PROFILING_QUEUEING_TIME_ENABLED, PROFILING_QUEUEING_TIME_ENABLED_DEFAULT)) {
long threshold =
configProvider.getLong(
PROFILING_QUEUEING_TIME_THRESHOLD_MILLIS,
PROFILING_QUEUEING_TIME_THRESHOLD_MILLIS_DEFAULT);
recordingSettings.put("datadog.QueueTime#threshold", threshold + " ms");
}

// Toggle settings from override file

try {
Expand Down

0 comments on commit 2cbbb43

Please sign in to comment.