Turn on micrometer via auto configuration
diff --git a/opentelemetry/CarBooking/src/main/java/com/example/demo/AppConfig.java b/opentelemetry/CarBooking/src/main/java/com/example/demo/AppConfig.java
deleted file mode 100644
index 977d5fb..0000000
--- a/opentelemetry/CarBooking/src/main/java/com/example/demo/AppConfig.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.example.demo;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.component.micrometer.messagehistory.MicrometerMessageHistoryFactory;
-import org.apache.camel.component.micrometer.routepolicy.MicrometerRoutePolicyFactory;
-import org.apache.camel.spring.boot.CamelContextConfiguration;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-public class AppConfig {
-
- @Bean
- public CamelContextConfiguration camelContextConfiguration() {
-
- return new CamelContextConfiguration() {
- @Override
- public void beforeApplicationStart(CamelContext camelContext) {
- camelContext.addRoutePolicyFactory(new MicrometerRoutePolicyFactory());
- camelContext.setMessageHistoryFactory(new MicrometerMessageHistoryFactory());
- }
-
- @Override
- public void afterApplicationStart(CamelContext camelContext) {
-
- }
- };
- }
-
-}
diff --git a/opentelemetry/CarBooking/src/main/resources/application.properties b/opentelemetry/CarBooking/src/main/resources/application.properties
index 218d9e3..fe4e779 100644
--- a/opentelemetry/CarBooking/src/main/resources/application.properties
+++ b/opentelemetry/CarBooking/src/main/resources/application.properties
@@ -18,6 +18,7 @@
camel.springboot.use-mdc-logging = true
camel.component.micrometer.enabled=true
camel.component.metrics.metric-registry=prometheusMeterRegistry
+camel.metrics.enable-message-history=true
management.endpoint.metrics.enabled=true
management.endpoints.web.exposure.include=*
spring.application.name=CarBooking
diff --git a/opentelemetry/FlightBooking/src/main/java/com/example/demo/AppConfig.java b/opentelemetry/FlightBooking/src/main/java/com/example/demo/AppConfig.java
deleted file mode 100644
index 977d5fb..0000000
--- a/opentelemetry/FlightBooking/src/main/java/com/example/demo/AppConfig.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.example.demo;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.component.micrometer.messagehistory.MicrometerMessageHistoryFactory;
-import org.apache.camel.component.micrometer.routepolicy.MicrometerRoutePolicyFactory;
-import org.apache.camel.spring.boot.CamelContextConfiguration;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-public class AppConfig {
-
- @Bean
- public CamelContextConfiguration camelContextConfiguration() {
-
- return new CamelContextConfiguration() {
- @Override
- public void beforeApplicationStart(CamelContext camelContext) {
- camelContext.addRoutePolicyFactory(new MicrometerRoutePolicyFactory());
- camelContext.setMessageHistoryFactory(new MicrometerMessageHistoryFactory());
- }
-
- @Override
- public void afterApplicationStart(CamelContext camelContext) {
-
- }
- };
- }
-
-}
diff --git a/opentelemetry/FlightBooking/src/main/resources/application.properties b/opentelemetry/FlightBooking/src/main/resources/application.properties
index 6c1cb61..fe5e78d 100644
--- a/opentelemetry/FlightBooking/src/main/resources/application.properties
+++ b/opentelemetry/FlightBooking/src/main/resources/application.properties
@@ -18,6 +18,7 @@
camel.springboot.use-mdc-logging = true
camel.component.micrometer.enabled=true
camel.component.metrics.metric-registry=prometheusMeterRegistry
+camel.metrics.enable-message-history=true
management.endpoint.metrics.enabled=true
management.endpoints.web.exposure.include=*
spring.application.name=FlightBooking
diff --git a/opentelemetry/HotelBooking/src/main/java/com/example/demo/AppConfig.java b/opentelemetry/HotelBooking/src/main/java/com/example/demo/AppConfig.java
deleted file mode 100644
index 977d5fb..0000000
--- a/opentelemetry/HotelBooking/src/main/java/com/example/demo/AppConfig.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.example.demo;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.component.micrometer.messagehistory.MicrometerMessageHistoryFactory;
-import org.apache.camel.component.micrometer.routepolicy.MicrometerRoutePolicyFactory;
-import org.apache.camel.spring.boot.CamelContextConfiguration;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-public class AppConfig {
-
- @Bean
- public CamelContextConfiguration camelContextConfiguration() {
-
- return new CamelContextConfiguration() {
- @Override
- public void beforeApplicationStart(CamelContext camelContext) {
- camelContext.addRoutePolicyFactory(new MicrometerRoutePolicyFactory());
- camelContext.setMessageHistoryFactory(new MicrometerMessageHistoryFactory());
- }
-
- @Override
- public void afterApplicationStart(CamelContext camelContext) {
-
- }
- };
- }
-
-}
diff --git a/opentelemetry/HotelBooking/src/main/resources/application.properties b/opentelemetry/HotelBooking/src/main/resources/application.properties
index f6b9a42..9bf4e1f 100644
--- a/opentelemetry/HotelBooking/src/main/resources/application.properties
+++ b/opentelemetry/HotelBooking/src/main/resources/application.properties
@@ -18,6 +18,7 @@
camel.springboot.use-mdc-logging = true
camel.component.micrometer.enabled=true
camel.component.metrics.metric-registry=prometheusMeterRegistry
+camel.metrics.enable-message-history=true
management.endpoint.metrics.enabled=true
management.endpoints.web.exposure.include=*
spring.application.name=HotelBooking
diff --git a/opentelemetry/TripBooking/src/main/java/com/example/demo/AppConfig.java b/opentelemetry/TripBooking/src/main/java/com/example/demo/AppConfig.java
deleted file mode 100644
index 977d5fb..0000000
--- a/opentelemetry/TripBooking/src/main/java/com/example/demo/AppConfig.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.example.demo;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.component.micrometer.messagehistory.MicrometerMessageHistoryFactory;
-import org.apache.camel.component.micrometer.routepolicy.MicrometerRoutePolicyFactory;
-import org.apache.camel.spring.boot.CamelContextConfiguration;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-public class AppConfig {
-
- @Bean
- public CamelContextConfiguration camelContextConfiguration() {
-
- return new CamelContextConfiguration() {
- @Override
- public void beforeApplicationStart(CamelContext camelContext) {
- camelContext.addRoutePolicyFactory(new MicrometerRoutePolicyFactory());
- camelContext.setMessageHistoryFactory(new MicrometerMessageHistoryFactory());
- }
-
- @Override
- public void afterApplicationStart(CamelContext camelContext) {
-
- }
- };
- }
-
-}
diff --git a/opentelemetry/TripBooking/src/main/resources/application.properties b/opentelemetry/TripBooking/src/main/resources/application.properties
index 6470dad..1ef168a 100644
--- a/opentelemetry/TripBooking/src/main/resources/application.properties
+++ b/opentelemetry/TripBooking/src/main/resources/application.properties
@@ -18,6 +18,7 @@
camel.springboot.use-mdc-logging = true
camel.component.micrometer.enabled=true
camel.component.metrics.metric-registry=prometheusMeterRegistry
+camel.metrics.enable-message-history=true
management.endpoint.metrics.enabled=true
management.endpoints.web.exposure.include=*
spring.application.name=TripBooking