io.quarkus.micrometer.runtime.binder.netty.VertxNettyAllocatorMetricsProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-micrometer Show documentation
Show all versions of quarkus-micrometer Show documentation
Instrument the runtime and your application with dimensional metrics using Micrometer.
package io.quarkus.micrometer.runtime.binder.netty;
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Singleton;
import io.micrometer.core.instrument.binder.MeterBinder;
import io.micrometer.core.instrument.binder.netty4.NettyAllocatorMetrics;
import io.netty.buffer.ByteBufAllocatorMetricProvider;
import io.vertx.core.buffer.impl.VertxByteBufAllocator;
@Singleton
public class VertxNettyAllocatorMetricsProvider {
@Produces
@Singleton
public MeterBinder vertxPooledByteBufAllocatorMetrics() {
return new NettyAllocatorMetrics((ByteBufAllocatorMetricProvider) VertxByteBufAllocator.POOLED_ALLOCATOR);
}
@Produces
@Singleton
public MeterBinder vertxUnpooledByteBufAllocatorMetrics() {
return new NettyAllocatorMetrics((ByteBufAllocatorMetricProvider) VertxByteBufAllocator.UNPOOLED_ALLOCATOR);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy