Skip to content

Commit 4261ed9

Browse files
famaridonmhalbritter
authored andcommitted
Added documentation for configuring OpenTelemetry SDK logs
See gh-41825
1 parent f7ba5f1 commit 4261ed9

File tree

1 file changed

+20
-0
lines changed
  • spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator

1 file changed

+20
-0
lines changed

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/loggers.adoc

+20
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,23 @@ To configure a given logger, `POST` a partial entity to the resource's URI, as t
3131
----
3232

3333
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`.
34+
35+
36+
37+
[[actuator.loggers.opentelemetry]]
38+
== OpenTelemetry
39+
By default, the OpenTelemetry SDK logs are not configured. You can provide the location of the OpenTelemetry logs endpoint to configure it:
40+
41+
[configprops,yaml]
42+
----
43+
management:
44+
otlp:
45+
logging:
46+
endpoint: "https://otlp.example.com:4318/v1/logs"
47+
----
48+
49+
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]
50+
51+
TIP: Ensure that you add the appender to your `logback.xml` or `logback-spring.xml` (or the equivalent configuration file for Log4j).
52+
53+
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`.

0 commit comments

Comments
 (0)