Added documentation for configuring OpenTelemetry SDK logs
See gh-41825
This commit is contained in:
committed by
Moritz Halbritter
parent
f7ba5f1bbc
commit
4261ed9c2b
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user