java.lang.Object
io.opentelemetry.instrumentation.runtimetelemetry.internal.JfrConfig

public class JfrConfig extends Object
Configuration holder for JFR telemetry. On Java 8, this is a no-op implementation since JFR is not available. On Java 17+, this is replaced by an implementation that manages JFR features.

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

  • Method Details

    • create

      public static JfrConfig create()
    • enableAllFeatures

      @CanIgnoreReturnValue public JfrConfig enableAllFeatures()
    • disableAllFeatures

      @CanIgnoreReturnValue public JfrConfig disableAllFeatures()
    • enableExperimentalFeatures

      @CanIgnoreReturnValue public JfrConfig enableExperimentalFeatures()
    • enableFeature

      @CanIgnoreReturnValue public JfrConfig enableFeature(String featureName)
    • disableFeature

      @CanIgnoreReturnValue public JfrConfig disableFeature(String featureName)
    • setUseLegacyJfrCpuCountMetric

      @CanIgnoreReturnValue public JfrConfig setUseLegacyJfrCpuCountMetric(boolean useLegacy)
    • isJfrAvailable

      public boolean isJfrAvailable()
    • buildJfrTelemetry

      @Nullable public AutoCloseable buildJfrTelemetry(boolean preferJfrMetrics, io.opentelemetry.api.metrics.Meter meter)