Interface ExtendedLongHistogram

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

public interface ExtendedLongHistogram extends io.opentelemetry.api.metrics.LongHistogram
Extended LongHistogram with experimental APIs.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns true if the histogram is enabled.

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

    record, record, record
  • Method Details

    • isEnabled

      default boolean isEnabled()
      Returns true if the histogram is enabled.

      This allows callers to avoid unnecessary compute when nothing is consuming the data. Because the response is subject to change over the application, callers should call this before each call to LongHistogram.record(long), LongHistogram.record(long, Attributes), or LongHistogram.record(long, Attributes, Context).