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

io.quarkus.micrometer.runtime.binder.mpmetrics.MpMetricsRegistryProducer Maven / Gradle / Ivy

Go to download

Instrument the runtime and your application with dimensional metrics using Micrometer.

There is a newer version: 3.17.5
Show newest version
package io.quarkus.micrometer.runtime.binder.mpmetrics;

import jakarta.enterprise.inject.Produces;
import jakarta.inject.Singleton;

import org.eclipse.microprofile.metrics.*;
import org.eclipse.microprofile.metrics.annotation.RegistryType;

import io.micrometer.core.instrument.MeterRegistry;

@Singleton
@SuppressWarnings("unused")
class MpMetricsRegistryProducer {
    @Produces
    @Singleton
    public MetricRegistryAdapter produceRegistry(MeterRegistry registry) {
        return MpMetricsRecorder.getRegistry(MetricRegistry.Type.APPLICATION);
    }

    @Produces
    @Singleton
    @RegistryType(type = MetricRegistry.Type.APPLICATION)
    public MetricRegistryAdapter produceApplicationRegistry(MeterRegistry registry) {
        return MpMetricsRecorder.getRegistry(MetricRegistry.Type.APPLICATION);
    }

    @Produces
    @Singleton
    @RegistryType(type = MetricRegistry.Type.BASE)
    public MetricRegistry produceBaseRegistry(MeterRegistry registry) {
        return MpMetricsRecorder.getRegistry(MetricRegistry.Type.BASE);
    }

    @Produces
    @Singleton
    @RegistryType(type = MetricRegistry.Type.VENDOR)
    public MetricRegistry produceVendorRegistry(MeterRegistry registry) {
        return MpMetricsRecorder.getRegistry(MetricRegistry.Type.VENDOR);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy