[ 
https://issues.apache.org/jira/browse/CAMEL-22612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18033793#comment-18033793
 ] 

Pasquale Congiusti commented on CAMEL-22612:
--------------------------------------------

I can't reproduce this problem. I've tried with the dependencies you've 
suggested but in my case everything works as expected. However I think this is 
a runtime problem due to a clash in bean creations. It's clear that you may 
have additional configurations that are creating the Spring 
`tracingAwareMeterObservationHandler` versus Camel 
`tracingAwareMeterObservationHandler`. In theory such a clash should not 
happen, but I guess it depends on the different dependencies that may be 
available in a given project. The most immediate workaround is to instruct 
Spring not to use the `TracingAndMetricsObservationHandlerConfiguration` 
configuration. I think there may be some properties to set it up.

In the while I am preparing an alternative approach to let coexist the Spring 
configuration with our configuration without having any potential clash.

Stay tuned.

> camel-observation-starter + Spring Boot 3.5.7 fails to start
> ------------------------------------------------------------
>
>                 Key: CAMEL-22612
>                 URL: https://issues.apache.org/jira/browse/CAMEL-22612
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-spring-boot-starters
>    Affects Versions: 4.15.0
>         Environment: Apache Camel 4.15.0, including camel-observation-starter.
> Spring Boot 3.5.7, including spring-boot-actuator-autoconfigure.
>            Reporter: Mikołaj Nowak
>            Assignee: Pasquale Congiusti
>            Priority: Major
>             Fix For: 4.16.0
>
>
> With Apache Camel 4.15.0 and Spring Boot 3.5.7, camel-observation-starter 
> causes application startup error:
> The bean 'tracingAwareMeterObservationHandler', defined in class path 
> resource 
> [org/apache/camel/observation/starter/ObservationAutoConfiguration.class], 
> could not be registered. A bean with that name has already been defined in 
> class path resource 
> [org/springframework/boot/actuate/autoconfigure/observation/ObservationAutoConfiguration$MeterObservationHandlerConfiguration$TracingAndMetricsObservationHandlerConfiguration.class]
>  and overriding is disabled.
>  
> Setting camel.observation.enabled to false resolves the startup error, but 
> then tracing does not work for Camel routes. The issue might be related to 
> CAMEL-22349.
>  
> As a temporary workaround, I downgraded Camel to 4.14.0. The issue does not 
> occur in that version.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to