boot42-otel
Companion module for the ankurm.com article Spring Boot 4.2 OpenTelemetry: Semantic Conventions, Shared OTLP Settings and MDC Keys. Everything runs against Spring Boot 4.2.0-RC1 (a release candidate, not GA) and against 4.1.2 (GA) as the baseline. JDK 25.
| Path | What it is |
|---|---|
pom.xml / pom-41.xml |
the same project on 4.2.0-RC1 and on 4.1.2 |
src/main/.../OtelApplication |
one endpoint, GET /hello/{name}, that logs a line |
src/test/.../OtlpSink |
a 60-line OTLP/HTTP receiver: records path, headers and payload strings of every export request |
src/test/.../ConventionsTest |
meters and span names for each management.observations.conventions value, including the start-up failure RC1 gives for open-telemetry |
src/test/.../ConventionSpellingsTest |
seven spellings of the conventions value, each started for real: which start and which meter they produce |
src/test/.../SharedOtlpTest |
management.opentelemetry.otlp.*: paths, merged headers, gzip, and signal-specific overrides |
src/test/.../MdcAndLongTaskTimerTest |
custom MDC keys, and the active-observation LongTaskTimer that is no longer on by default |
src/test/.../PrometheusNamesTest |
the http_server_* names a dashboard query sees under each convention |
output/ |
every transcript quoted in the article; ./scripts/run-all.sh regenerates them |
Run: ./scripts/run-all.sh. ConventionsTest pins the RC1 behaviour on purpose; when a later build changes it, that test fails and the article needs updating.
There is deliberately no docs/ folder: the explanations live in the article.