In Spring Boot 2 (Spring Cloud Sleuth), with tracing enabled, invocations of a MongoRepository automatically created a span. So without any custom code, it was possible to track down database roundtrip times.

Now in Spring Boot 3, there are now automatically created spans. And there also seems to be no options, to enable this behavior.

For most of the users, using tracing & MongoDB, this information should be interesting.

Comment From: wilkinsona

Observability is handled by Spring Data. For MongoDB, please refer to the relevant reference documentation.