CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-io-quarkus--quarkus-micrometer-deployment

Quarkus Micrometer deployment module that provides build-time processing for metrics collection and monitoring capabilities in Quarkus applications

Pending
Overview
Eval results
Files

framework-binders.mddocs/

Framework Integration Binders

Automatic instrumentation processors that integrate metrics collection with various Quarkus frameworks and technologies. Each binder processor provides conditional activation and seamless metrics integration for specific technology stacks.

Capabilities

HTTP Binder Processor

Enables HTTP metrics for both client and server operations across various HTTP frameworks.

/**
 * Deployment processor for HTTP metrics integration
 */
public class HttpBinderProcessor {
    
    /**
     * Creates HTTP binder configuration
     * @return UnremovableBeanBuildItem for HTTP metrics configuration
     */
    @BuildStep(onlyIf = HttpServerBinderEnabled.class)
    public UnremovableBeanBuildItem enableHttpBinders();
    
    /**
     * Enables HTTP server metrics support
     * @return AdditionalBeanBuildItem for server metrics
     */
    @BuildStep(onlyIf = HttpServerBinderEnabled.class)
    public AdditionalBeanBuildItem enableHttpServerSupport();
    
    /**
     * Registers HTTP client metrics provider
     * @return UnremovableBeanBuildItem for client metrics
     */
    @BuildStep(onlyIf = HttpClientBinderEnabled.class)
    public UnremovableBeanBuildItem registerProvider();
    
    // Enablement conditions
    public static class HttpServerBinderEnabled implements BooleanSupplier;
    public static class HttpClientBinderEnabled implements BooleanSupplier;
}

Vert.x Binder Processor

Enables Vert.x instrumentation for metrics collection in reactive applications.

/**
 * Deployment processor for Vert.x metrics integration
 */
@BuildSteps
public class VertxBinderProcessor {
    
    /**
     * Preserves HTTP server metrics beans for Vert.x
     * @return UnremovableBeanBuildItem for server metrics preservation
     */
    @BuildStep(onlyIf = VertxBinderEnabled.class)
    public UnremovableBeanBuildItem unremoveableAdditionalHttpServerMetrics();
    
    /**
     * Preserves HTTP client metrics beans for Vert.x
     * @return UnremovableBeanBuildItem for client metrics preservation
     */
    @BuildStep(onlyIf = VertxBinderEnabled.class)
    public UnremovableBeanBuildItem unremoveableAdditionalHttpClientMetrics();
    
    /**
     * Configures Vert.x options for metrics
     * @return AdditionalBeanBuildItem for Vert.x configuration
     */
    @BuildStep(onlyIf = VertxBinderEnabled.class)
    public AdditionalBeanBuildItem build();
    
    /**
     * Sets Vert.x runtime configuration
     * @return RuntimeConfigSetterBuildItem for Vert.x config
     */
    @BuildStep(onlyIf = VertxBinderEnabled.class)
    @Record(ExecutionTime.RUNTIME_INIT)
    public RuntimeConfigSetterBuildItem setVertxConfig();
    
    // Enablement condition
    public static class VertxBinderEnabled implements BooleanSupplier;
}

gRPC Binder Processor

Enables gRPC client and server metrics through interceptors.

/**
 * Deployment processor for gRPC metrics integration
 */
public class GrpcBinderProcessor {
    
    /**
     * Adds gRPC client metrics interceptor
     * @return UnremovableBeanBuildItem for client interceptor
     */
    @BuildStep(onlyIf = GrpcClientSupportEnabled.class)
    public UnremovableBeanBuildItem addGrpcClientMetricInterceptor();
    
    /**
     * Adds gRPC server metrics interceptor
     * @return UnremovableBeanBuildItem for server interceptor
     */
    @BuildStep(onlyIf = GrpcServerSupportEnabled.class)
    public UnremovableBeanBuildItem addGrpcServerMetricInterceptor();
    
    // Enablement conditions
    public static class GrpcClientSupportEnabled implements BooleanSupplier;
    public static class GrpcServerSupportEnabled implements BooleanSupplier;
}

Kafka Binder Processor

Enables Kafka metrics for producer, consumer, and streams applications.

/**
 * Deployment processor for Kafka metrics integration
 */
public class KafkaBinderProcessor {
    
    /**
     * Creates CDI event consumer for Kafka metrics
     * @return SyntheticBeanBuildItem for Kafka event handling
     */
    @BuildStep(onlyIf = KafkaSupportEnabled.class)
    @Record(ExecutionTime.RUNTIME_INIT)
    public SyntheticBeanBuildItem createCDIEventConsumer();
    
    /**
     * Creates Kafka Streams event observer
     * @return SyntheticBeanBuildItem for Streams observation
     */
    @BuildStep(onlyIf = KafkaStreamsSupportEnabled.class)
    @Record(ExecutionTime.RUNTIME_INIT)
    public SyntheticBeanBuildItem createKafkaStreamsEventObserver();
    
    // Enablement conditions
    public static class KafkaSupportEnabled implements BooleanSupplier;
    public static class KafkaStreamsSupportEnabled implements BooleanSupplier;
}

Reactive Messaging Processor

Enables SmallRye Reactive Messaging metrics integration.

/**
 * Deployment processor for Reactive Messaging metrics
 */
public class ReactiveMessagingProcessor {
    
    /**
     * Creates CDI event consumer for reactive messaging
     * @return SyntheticBeanBuildItem for message observation
     */
    @BuildStep(onlyIf = ReactiveMessagingSupportEnabled.class)
    @Record(ExecutionTime.RUNTIME_INIT)
    public SyntheticBeanBuildItem createCDIEventConsumer();
    
    // Enablement condition
    public static class ReactiveMessagingSupportEnabled implements BooleanSupplier;
}

Netty Binder Processor

Enables Netty allocator and event executor metrics for memory and thread pool monitoring.

/**
 * Deployment processor for Netty metrics integration
 */
public class NettyBinderProcessor {
    
    /**
     * Creates Netty allocator metrics
     * @return SyntheticBeanBuildItem for Netty allocator monitoring
     */
    @BuildStep(onlyIf = NettySupportEnabled.class)
    @Record(ExecutionTime.RUNTIME_INIT)
    public SyntheticBeanBuildItem createNettyNettyAllocatorMetrics();
    
    /**
     * Creates Vert.x allocator metrics
     * @return SyntheticBeanBuildItem for Vert.x allocator monitoring
     */
    @BuildStep(onlyIf = VertxAllocatorSupportEnabled.class)
    @Record(ExecutionTime.RUNTIME_INIT)
    public SyntheticBeanBuildItem createVertxNettyAllocatorMetrics();
    
    /**
     * Creates Vert.x event executor metrics
     * @return SyntheticBeanBuildItem for event executor monitoring
     */
    @BuildStep(onlyIf = VertxEventExecutorSupportEnabled.class)
    @Record(ExecutionTime.RUNTIME_INIT)
    public SyntheticBeanBuildItem createVertxNettyEventExecutorMetrics();
    
    /**
     * Creates reactive Netty allocator metrics
     * @return SyntheticBeanBuildItem for reactive allocator monitoring
     */
    @BuildStep(onlyIf = ReactiveSupportEnabled.class)
    @Record(ExecutionTime.RUNTIME_INIT)
    public SyntheticBeanBuildItem createReactiveNettyAllocatorMetrics();
    
    // Base enablement condition
    public abstract static class AbstractSupportEnabled implements BooleanSupplier;
    
    // Specific enablement conditions
    public static class NettySupportEnabled extends AbstractSupportEnabled;
    public static class VertxAllocatorSupportEnabled extends AbstractSupportEnabled;
    public static class VertxEventExecutorSupportEnabled extends AbstractSupportEnabled;
    public static class ReactiveSupportEnabled extends AbstractSupportEnabled;
}

Redis Binder Processor

Enables Redis client metrics for cache and data store operations.

/**
 * Deployment processor for Redis metrics integration
 */
public class RedisBinderProcessor {
    
    /**
     * Adds Redis client metrics
     * @return SyntheticBeanBuildItem for Redis client monitoring
     */
    @BuildStep(onlyIf = RedisMetricsSupportEnabled.class)
    @Record(ExecutionTime.RUNTIME_INIT)
    public SyntheticBeanBuildItem addRedisClientMetric();
    
    // Enablement condition
    public static class RedisMetricsSupportEnabled implements BooleanSupplier;
}

Stork Binder Processor

Enables Stork service discovery metrics for load balancing and service resolution.

/**
 * Deployment processor for Stork service discovery metrics
 */
public class StorkBinderProcessor {
    
    /**
     * Adds Stork observation collector
     * @return SyntheticBeanBuildItem for service discovery monitoring
     */
    @BuildStep(onlyIf = StorkMetricsSupportEnabled.class)
    @Record(ExecutionTime.RUNTIME_INIT)
    public SyntheticBeanBuildItem addStorkObservationCollector();
    
    // Enablement condition  
    public static class StorkMetricsSupportEnabled implements BooleanSupplier;
}

WebSockets Binder Processor

Enables WebSockets Next instrumentation for real-time communication metrics.

/**
 * Deployment processor for WebSockets metrics integration
 */
@BuildSteps
public class WebSocketsBinderProcessor {
    
    /**
     * Registers WebSocket metrics interceptor
     * @return UnremovableBeanBuildItem for WebSocket monitoring
     */
    @BuildStep
    public UnremovableBeanBuildItem registerWebSocketMetricsInterceptor();
}

Virtual Thread Binder Processor

Enables virtual thread metrics for Java 21+ applications (Project Loom).

/**
 * Deployment processor for virtual thread metrics (Java 21+)
 */
public class VirtualThreadBinderProcessor {
    
    /**
     * Creates CDI event consumer for virtual thread metrics
     * @return SyntheticBeanBuildItem for virtual thread monitoring
     */
    @BuildStep(onlyIf = VirtualThreadSupportEnabled.class)
    @Record(ExecutionTime.RUNTIME_INIT)
    public SyntheticBeanBuildItem createCDIEventConsumer();
    
    /**
     * Adds native monitoring for JFR integration
     * @return NativeImageConfigBuildItem for native monitoring
     */
    @BuildStep(onlyIf = VirtualThreadSupportEnabled.class)
    public NativeImageConfigBuildItem addNativeMonitoring();
    
    // Enablement condition
    public static class VirtualThreadSupportEnabled implements BooleanSupplier;
}

Usage Examples:

// Custom framework integration following the binder pattern
@BuildSteps  
public class CustomFrameworkBinderProcessor {
    
    @BuildStep(onlyIf = CustomFrameworkEnabled.class)
    UnremovableBeanBuildItem enableCustomFrameworkMetrics() {
        return UnremovableBeanBuildItem.beanTypes(
            DotName.createSimple("com.example.CustomFrameworkMetrics")
        );
    }
    
    public static class CustomFrameworkEnabled implements BooleanSupplier {
        @Override
        public boolean getAsBoolean() {
            return ConfigProvider.getConfig()
                .getOptionalValue("quarkus.micrometer.binder.custom-framework.enabled", Boolean.class)
                .orElse(false);
        }
    }
}

// Conditional metrics activation
@BuildStep(onlyIf = HttpBinderProcessor.HttpServerBinderEnabled.class)
AdditionalBeanBuildItem addHttpServerMetrics() {
    return AdditionalBeanBuildItem.builder()
        .addBeanClass(HttpServerMetricsHandler.class)
        .setUnremovable()
        .build();
}

Install with Tessl CLI

npx tessl i tessl/maven-io-quarkus--quarkus-micrometer-deployment

docs

core-processors.md

framework-binders.md

index.md

mp-metrics-compatibility.md

registry-exports.md

tile.json