diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/loggers.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/loggers.adoc index 3c6e0534acd9..8567b9c6730c 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/loggers.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/loggers.adoc @@ -31,3 +31,23 @@ To configure a given logger, `POST` a partial entity to the resource's URI, as t ---- TIP: To "`reset`" the specific level of the logger (and use the default configuration instead), you can pass a value of `null` as the `configuredLevel`. + + + +[[actuator.loggers.opentelemetry]] +== OpenTelemetry +By default, the OpenTelemetry SDK logs are not configured. You can provide the location of the OpenTelemetry logs endpoint to configure it: + +[configprops,yaml] +---- +management: + otlp: + logging: + endpoint: "https://otlp.example.com:4318/v1/logs" +---- + +NOTE: The OpenTelemetry Logback appender and Log4j appender are not part of Spring Boot, for more details, see the https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/logback/logback-appender-1.0/library[OpenTelemetry Logback appender] or https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/log4j/log4j-appender-2.17/library[OpenTelemetry Log4j2 appender] in the https://github.com/open-telemetry/opentelemetry-java-instrumentation[OpenTelemetry Java instrumentation GitHub repository] + +TIP: Ensure that you add the appender to your `logback.xml` or `logback-spring.xml` (or the equivalent configuration file for Log4j). + +TIP: The `OpenTelemetryAppender` requires access to an OpenTelemetry instance to function properly. This instance must be set programmatically during application startup by using an `ApplicationListener` for the `ApplicationReadyEvent`.