Skip to content

Commit

Permalink
Added documentation for configuring OpenTelemetry SDK logs
Browse files Browse the repository at this point in the history
  • Loading branch information
famaridon authored and mhalbritter committed Sep 5, 2024
1 parent f7ba5f1 commit 4261ed9
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

0 comments on commit 4261ed9

Please sign in to comment.