Search code examples
prometheusquarkuskogito

monitoring-prometheus-quarkus-addon jar is not working in Kogito


I am trying to build a Kogito application and adding a Prometheus jar to my project for monitoring metrics. But while adding this dependency to my project but getting this error:

Build step org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor#generateModel threw an exception: java.lang.IllegalStateException: src/main/java/org/kie/kogito/app/DecisionModels.java (24:907) : The method init(Function<String,KieRuntimeFactory>, ExecutionIdSupplier, BiFunction<DecisionModel,KogitoGAV,DecisionModel>, Reader...) in the type AbstractDecisionModels is not applicable for the arguments (Function<String,KieRuntimeFactory>, null, MonitoredDecisionModelTransformer).

Dependency added in pom.xml:

<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>monitoring-prometheus-quarkus-addon</artifactId>
<version>1.7.0.Final</version>
</dependency>

How to add Prometheus jar for monitoring?


Solution

  • Yup. I was using the wrong dependency. The issue was resolved after adding:

    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-addons-quarkus-monitoring-prometheus</artifactId>
      <version>KOGITO_VERSION</version>
    </dependency>