devops3 min read

A Journey of Small Environment Variables

4 similar posts
  • Spring Boot
  • OpenTelemetry

AI Summary

OpenTelemetry's Spring Boot starter now supports declarative configuration starting from version 2.26.0, bringing the YAML schema into application.yaml. This article tracks how environment variables like OTEL_SERVICE_NAME interact with the new YAML structure, highlighting Spring property integration, placeholder syntax differences, and practical migration notes.

Key Takeaways

  • Declarative configuration embeds the OpenTelemetry SDK YAML schema under the otel: key in application.yaml.
  • Environment variables still function, but Spring's property resolver handles placeholders and overrides before passing a resolved tree to the SDK.
  • Spring Boot 3.5 requires explicit dependency management for OTel instrumentation BOM to prevent NoClassDefFoundError.

Why it matters

Understanding how declarative YAML configuration interacts with traditional environment variables and Spring properties helps engineers properly configure telemetry pipelines without writing complex custom beans.

Conversation0

What would you add from your experience?

Checking your session…

Every good conversation starts with one perspective.