监控-prometheus-quarkus-addon jar 在 Kogito 中不起作用
monitoring-prometheus-quarkus-addon jar is not working in Kogito
我正在尝试构建一个 Kogito 应用程序并向我的项目添加一个 Prometheus jar 以监控指标。但是在将此依赖项添加到我的项目时却出现此错误:
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).
在pom.xml中添加的依赖项:
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>monitoring-prometheus-quarkus-addon</artifactId>
<version>1.7.0.Final</version>
</dependency>
如何添加Prometheus jar进行监控?
我的猜测是您混合了不同版本的 Kogito 工件。
运行 mvn dependency:tree
(或 Gradle 等效项)并确保您使用的是 Kogito 工件的一致版本。
是的。我使用了错误的依赖项。添加后问题解决:
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-monitoring-prometheus</artifactId>
<version>KOGITO_VERSION</version>
</dependency>
我正在尝试构建一个 Kogito 应用程序并向我的项目添加一个 Prometheus jar 以监控指标。但是在将此依赖项添加到我的项目时却出现此错误:
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).
在pom.xml中添加的依赖项:
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>monitoring-prometheus-quarkus-addon</artifactId>
<version>1.7.0.Final</version>
</dependency>
如何添加Prometheus jar进行监控?
我的猜测是您混合了不同版本的 Kogito 工件。
运行 mvn dependency:tree
(或 Gradle 等效项)并确保您使用的是 Kogito 工件的一致版本。
是的。我使用了错误的依赖项。添加后问题解决:
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-addons-quarkus-monitoring-prometheus</artifactId>
<version>KOGITO_VERSION</version>
</dependency>