Skip to content

Commit 10e5475

Browse files
authored
pull request fix
1 parent 2416c64 commit 10e5475

File tree

1 file changed

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

1 file changed

+12
-2
lines changed

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,25 @@ To configure a given logger, `POST` a partial entity to the resource's URI, as t
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`.
3434

35+
36+
37+
[[actuator.loggers.opentelemetry]]
3538
== OpenTelemetry
3639
By default, the OpenTelemetry SDK logs are not configured. You can provide the location of the OpenTelemetry logs endpoint to configure it:
3740

38-
[source,yaml]
41+
[configprops,yaml]
3942
----
4043
management:
4144
otlp:
4245
logging:
4346
endpoint: "https://otlp.example.com:4318/v1/logs"
4447
----
4548

46-
Note: The OpenTelemetry Logback appender and Log4j appender are not part of Spring Boot. You have to provide and configure them yourself. For more details, https://github.com/spring-projects/spring-boot/pull/40961[see this pull request].
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+
You have to add the appender to your logback-spring.xml or log4j-spring.xml.
52+
53+
In order to function, OpenTelemetryAppender needs access to an OpenTelemetry instance. This must be set programmatically during application startup as follows:
54+
55+
include-code::opentelemetry/OpentelemetryLoggerConfiguration[]
56+

0 commit comments

Comments
 (0)