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

io.opentelemetry.contrib.metrics.micrometer.internal.state.MeterProviderSharedState 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.internal.state;

import io.micrometer.core.instrument.MeterRegistry;
import io.opentelemetry.contrib.metrics.micrometer.CallbackRegistrar;
import io.opentelemetry.contrib.metrics.micrometer.CallbackRegistration;
import java.util.function.Supplier;

/**
 * State for a meter provider.
 *
 * 

This class is internal and is hence not for public use. Its APIs are unstable and can change * at any time. */ public final class MeterProviderSharedState { private final Supplier meterRegistrySupplier; private final CallbackRegistrar callbackRegistrar; public MeterProviderSharedState( Supplier meterRegistrySupplier, CallbackRegistrar callbackRegistrar) { this.meterRegistrySupplier = meterRegistrySupplier; this.callbackRegistrar = callbackRegistrar; } public MeterRegistry meterRegistry() { return meterRegistrySupplier.get(); } public CallbackRegistration registerCallback(Runnable callback) { return callbackRegistrar.registerCallback(callback); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy