fix(prometheus): Only add MP Metrics dependency during initialisation phase
@@ -70,10 +70,11 @@ func (t *prometheusTrait) Configure(e *Environment) (bool, error) {
), nil
}
-func (t *prometheusTrait) Apply(e *Environment) (err error) {
+func (t *prometheusTrait) Apply(e *Environment) error {
if e.IntegrationInPhase(v1.IntegrationPhaseInitialization) {
// Add the Camel Quarkus MP Metrics extension
util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus:camel-quarkus-microprofile-metrics")
+ return nil
}
container := e.getIntegrationContainer()
