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

io.opentelemetry.contrib.metrics.micrometer.CallbackRegistration Maven / Gradle / Ivy

There is a newer version: 1.42.0-alpha
Show newest version
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package io.opentelemetry.contrib.metrics.micrometer;

import io.opentelemetry.api.metrics.ObservableDoubleCounter;
import io.opentelemetry.api.metrics.ObservableDoubleGauge;
import io.opentelemetry.api.metrics.ObservableDoubleUpDownCounter;
import io.opentelemetry.api.metrics.ObservableLongCounter;
import io.opentelemetry.api.metrics.ObservableLongGauge;
import io.opentelemetry.api.metrics.ObservableLongUpDownCounter;

/** Helper interface representing any of the observable instruments. */
@FunctionalInterface
public interface CallbackRegistration
    extends ObservableLongCounter,
        ObservableDoubleCounter,
        ObservableLongUpDownCounter,
        ObservableDoubleUpDownCounter,
        ObservableLongGauge,
        ObservableDoubleGauge,
        AutoCloseable {

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy