Skip to content

fix(deps): align micrometer OTLP registry with Spring Boot 3.5 (#1534) - #1653

Merged
nthmost-orkes merged 2 commits into
mainfrom
fix/1534-otlp-micrometer-1.15
Sep 24, 2026
Merged

nthmost-orkes merged 2 commits into
mainfrom
fix/1534-otlp-micrometer-1.15

Conversation

@nthmost-orkes

Copy link
Copy Markdown
Contributor

Enabling OTLP metrics export (management.otlp.metrics.export.enabled=true) crashes the server at startup with NoClassDefFoundError: OtlpMeterRegistry$Builder. Spring Boot 3.5 builds the registry via OtlpMeterRegistry.builder(...) (only in micrometer-registry-otlp 1.15.x), but the registries were pinned to 1.14.6.

Fix: bump the registries to 1.15.12 (matching micrometer core), and force opentelemetry-proto back to 1.3.2-alpha so the protobuf-3.x stack stays intact (1.15.x otlp pulls 1.5.0-alpha which wants protobuf 4.x -- blocked by #964/GraalVM). micrometer 1.15 only touches metrics/common/resource proto messages, all present in 1.3.2-alpha (the only delta is profiling classes it never uses).

The old regression test hand-built the registry, so it never hit the broken path -- rewrote it to drive Spring Boot's real auto-config. It fails on 1.14.6 (the exact crash above) and passes on 1.15.12.

User impact: first-timers turning on OTLP metrics saw the server die on boot with a cryptic NoClassDefFoundError. Now it starts and exports metrics as expected.

Orkes parity: none needed -- OSS-only dependency-pin fix, no Orkes parallel.

Fixes #1534

Spring Boot 3.5.14's OtlpMetricsExportAutoConfiguration builds the
registry via OtlpMeterRegistry.builder(...), a class that only exists
from micrometer-registry-otlp 1.15.0. The registries were pinned to
1.14.6, so enabling management.otlp.metrics.export.enabled=true crashed
the server at startup with:

  NoClassDefFoundError: io/micrometer/registry/otlp/OtlpMeterRegistry$Builder

Bump revMicrometerRegistry 1.14.6 -> 1.15.12 (matching revMicrometer) so
the Builder is present. The registries were held at 1.14.6 because
micrometer-registry-otlp 1.15.x requests opentelemetry-proto 1.5.0-alpha,
whose generated code needs protobuf-java 4.x — but protobuf is pinned to
3.x (#964, GraalVM polyglot). Force opentelemetry-proto back to
1.3.2-alpha (protobuf 3.x, GeneratedMessageV3) to keep the 3.x stack:
micrometer 1.15's OTLP serializer references only metrics/common/resource
proto messages, all present in 1.3.2-alpha; the only delta to 1.5.0-alpha
is profiling classes micrometer never touches.

Rewrite OtlpMetricsConfigurationTest to drive Spring Boot's actual
OtlpMetricsExportAutoConfiguration (with management.otlp.metrics.export
.enabled=true) instead of hand-constructing the registry, so it exercises
the code path that regressed. The test fails on 1.14.6 with the exact
NoClassDefFoundError above and passes on 1.15.12.
@nthmost-orkes
nthmost-orkes merged commit 7a73540 into main Sep 24, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: v3.32.1 fails to start when OTLP metrics export is enabled (Regression)

2 participants