Class RuntimeMetricsBuilder

java.lang.Object
io.opentelemetry.instrumentation.runtimemetrics.java17.RuntimeMetricsBuilder

public final class RuntimeMetricsBuilder extends Object
Builder for RuntimeMetrics.
  • Method Details

    • enableAllFeatures

      @CanIgnoreReturnValue public RuntimeMetricsBuilder enableAllFeatures()
      Enable telemetry collection for all JfrFeatures.
    • enableFeature

      @CanIgnoreReturnValue public RuntimeMetricsBuilder enableFeature(JfrFeature feature)
      Enable telemetry collection associated with the JfrFeature.
    • disableAllFeatures

      @CanIgnoreReturnValue public RuntimeMetricsBuilder disableAllFeatures()
      Disable telemetry collection for all JfrFeatures.
    • disableAllMetrics

      @CanIgnoreReturnValue public RuntimeMetricsBuilder disableAllMetrics()
      Disable telemetry collection for all metrics.
    • disableFeature

      @CanIgnoreReturnValue public RuntimeMetricsBuilder disableFeature(JfrFeature feature)
      Disable telemetry collection associated with the JfrFeature.
    • disableAllJmx

      @CanIgnoreReturnValue public RuntimeMetricsBuilder disableAllJmx()
      Disable all JMX telemetry collection.
    • emitExperimentalTelemetry

      @CanIgnoreReturnValue public RuntimeMetricsBuilder emitExperimentalTelemetry()
      Enable experimental JMX telemetry collection.
    • captureGcCause

      @CanIgnoreReturnValue public RuntimeMetricsBuilder captureGcCause()
      Enable the capture of the jvm.gc.cause attribute with the jvm.gc.duration metric.
    • build

      public RuntimeMetrics build()
      Build and start an RuntimeMetrics with the config from this builder.