Class RuntimeMetricsBuilder

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

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

    • emitExperimentalTelemetry

      @CanIgnoreReturnValue public RuntimeMetricsBuilder emitExperimentalTelemetry()
      Enable all JMX telemetry collection.
    • enableExperimentalJmxTelemetry

      @Deprecated @CanIgnoreReturnValue public RuntimeMetricsBuilder enableExperimentalJmxTelemetry()
      Deprecated.
      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.