Interface ExtendedLongGaugeBuilder

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

public interface ExtendedLongGaugeBuilder extends io.opentelemetry.api.metrics.LongGaugeBuilder
Extended LongGaugeBuilder with experimental APIs.
  • Method Summary

    Modifier and Type
    Method
    Description
    Builds and returns a LongGauge instrument with the configuration.
    default io.opentelemetry.api.metrics.LongGaugeBuilder
    Specify advice for gauge implementations.

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

    buildObserver, buildWithCallback, setDescription, setUnit
  • Method Details

    • build

      LongGauge build()
      Builds and returns a LongGauge 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 LongGaugeBuilder.buildWithCallback(Consumer) to asynchronously observe the value of the gauge when metrics are collected.

      Returns:
      The LongGauge instrument.
    • setAdvice

      default io.opentelemetry.api.metrics.LongGaugeBuilder setAdvice(Consumer<LongGaugeAdviceConfigurer> adviceConsumer)
      Specify advice for gauge implementations.