diff --git a/extensions/micrometer/deployment/src/main/java/io/quarkus/micrometer/deployment/MicrometerProcessor.java b/extensions/micrometer/deployment/src/main/java/io/quarkus/micrometer/deployment/MicrometerProcessor.java index cc01bcb212cc4..8e058dcfc9dc8 100644 --- a/extensions/micrometer/deployment/src/main/java/io/quarkus/micrometer/deployment/MicrometerProcessor.java +++ b/extensions/micrometer/deployment/src/main/java/io/quarkus/micrometer/deployment/MicrometerProcessor.java @@ -235,7 +235,7 @@ void registerExtensionMetrics(MicrometerRecorder recorder, // RootMeterRegistryBuildItem is present to indicate we call this after the root registry has been initialized for (MetricsFactoryConsumerBuildItem item : metricsFactoryConsumerBuildItems) { - if (item.executionTime() == ExecutionTime.STATIC_INIT) { + if (item != null && item.executionTime() == ExecutionTime.STATIC_INIT) { recorder.registerMetrics(item.getConsumer()); } } @@ -261,7 +261,7 @@ void configureRegistry(MicrometerRecorder recorder, recorder.configureRegistries(config, typeClasses, shutdownContextBuildItem); for (MetricsFactoryConsumerBuildItem item : metricsFactoryConsumerBuildItems) { - if (item.executionTime() == ExecutionTime.RUNTIME_INIT) { + if (item != null && item.executionTime() == ExecutionTime.RUNTIME_INIT) { recorder.registerMetrics(item.getConsumer()); } }