All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opentelemetry.api.metrics.ObservableLongCounter Maven / Gradle / Ivy

The newest version!
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package io.opentelemetry.api.metrics;

import java.util.function.Consumer;

/**
 * A reference to an observable instrument registered with {@link
 * LongCounterBuilder#buildWithCallback(Consumer)}.
 *
 * @since 1.10.0
 */
public interface ObservableLongCounter extends AutoCloseable {

  /**
   * Remove the callback registered via {@link LongCounterBuilder#buildWithCallback(Consumer)}.
   * After this is called, the callback won't be invoked on future collections. Subsequent calls to
   * {@link #close()} have no effect.
   *
   * 

Note: other callbacks registered to the instrument with the same identity are unaffected. * * @since 1.12.0 */ @Override default void close() {} }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy