After upgrading to Spring Boot 3.1.4. we are experiencing OutOfMemoryErrors. I see an ever increasing number of io.micrometer.tracing.otel.bridge.OtelTraceContext / SpanFromSpanContext. Obviously, we are using the io.micremter.tracing Otel bridge. Downgrading to Spring Boot 3.1.3 resolves the issue immediately. For microservices with high load this leads to OoME within a couple of hours. For microservices with low load, this is not really relevant. The trace contexts are retained from a thread local variable (which one I have not been able to find out yet). I assume this has to do with the dependency update as requested by #37262. I am still opening the issue here because it affects the latest 3.1.x Spring Boot version.

Comment From: vpavic

What you're seeing is likely related to https://github.com/micrometer-metrics/tracing/issues/363. You could try sticking with Spring Boot 3.1.4 but downgrading Micrometer Tracing to 1.1.4.

Comment From: scottfrederick

@rasifix Please let us know if the suggestion above from @vpavic makes the errors go away for you so we can confirm that it is a known issue with Micrometer.

If this doesn't work around the error, please provide a complete minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it and attaching it to this issue.

Comment From: rasifix

downgrading to 1.1.4 resolves the issue. as this is a rather big impact issue, will there be a patch release soon?

Comment From: bclozel

Micrometer Tracing 1.1.6 is being released and will be shipped with Spring Boot 3.1.5. Closing in favor of #37694.