Interface ExtendedDoubleGaugeBuilder

All Superinterfaces:
io.opentelemetry.api.metrics.DoubleGaugeBuilder

public interface ExtendedDoubleGaugeBuilder extends io.opentelemetry.api.metrics.DoubleGaugeBuilder
Extended DoubleGaugeBuilder with experimental APIs.
  • Method Summary

    Modifier and Type
    Method
    Description
    Builds and returns a DoubleGauge instrument with the configuration.
    setAttributesAdvice(List<io.opentelemetry.api.common.AttributeKey<?>> attributes)
    Specify the attribute advice, which suggests the recommended set of attribute keys to be used for this gauge.

    Methods inherited from interface io.opentelemetry.api.metrics.DoubleGaugeBuilder

    buildObserver, buildWithCallback, ofLongs, setDescription, setUnit
  • Method Details

    • build

      DoubleGauge build()
      Builds and returns a DoubleGauge instrument with the configuration.

      NOTE: This produces a synchronous gauge which records gauge values as they occur. Most users will want to instead register an DoubleGaugeBuilder.buildWithCallback(Consumer) to asynchronously observe the value of the gauge when metrics are collected.

      Returns:
      The DoubleGauge instrument.
    • setAttributesAdvice

      default ExtendedDoubleGaugeBuilder setAttributesAdvice(List<io.opentelemetry.api.common.AttributeKey<?>> attributes)
      Specify the attribute advice, which suggests the recommended set of attribute keys to be used for this gauge.