This PR is trying to address a potential issue with the ObservationAutoConfiguration: if tracing is configured DefaultMeterObservationHandler should be wrapped to TracingAwareMeterObservationHandler so that tracing will be interoperable with metrics.

~This PR depends on TracingAwareMeterObservationHandler which is only available in a SNAPSHOT release of Micrometer Tracing so either we wait till the RC release of it or we can do an off-cycle milestone release.~

Comment From: jonatan-ivanov

@wilkinsona Now that Boot moved to snapshots, is it possible to unblock this PR and the one that adds Exemplars support?

Comment From: wilkinsona

Having merged this, I've just realised that removing @ConditionalOnBean(MeterRegistry.class) will cause problems when micrometer-core isn't on the classpath. It needs to be replaced with @ConditionalOnClass(MeterRegistry.class) otherwise loading OnlyMetricsConfiguration will fail when micrometer-core is absent.

Comment From: wilkinsona

MetricsWithTracingConfiguration has a similar problem. I am going to revert so that we can revisit the conditions.