Skip to content

Migration guide to Spring Boot 4 miss metrics export issue. #48261

@michaldo

Description

@michaldo

In my application metrics are scrapped by Prometheus and spans are exported to Opentelemetry
When I upgraded to Spring Boot 4, metrics started to be exported to Opentelemetry.

It is surprising because https://spring.io/blog/2025/11/18/opentelemetry-with-spring-boot#exporting-metrics says:

To enable it in your application, you have to set the management.otlp.metrics.export.url property, e.g.

management.otlp.metrics.export.url=http://localhost:4318/v1/metrics
With that, Micrometer exports metrics in OTLP format to the backend

It is not true, because export runs automatically
I tamed uncontrolled export by management.defaults.metrics.export.enabled=false. I think this nuance should be included in migration guide

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions