Skip to content

Commit

Permalink
Merge branch 'main' into michael2893-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
michael2893 authored May 6, 2024
2 parents 966e685 + 8d927cb commit 4aa1670
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions content/en/docs/languages/java/automatic/spring-boot.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ The OpenTelemetry starter uses OpenTelemetry Spring Boot

```xml
<dependencies>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-spring-boot-starter</artifactId>
</dependency>
</dependencies>
```

Expand Down Expand Up @@ -253,11 +253,11 @@ from tracing:

```xml
<dependencies>
<dependency>
<groupId>io.opentelemetry.contrib</groupId>
<artifactId>opentelemetry-samplers</artifactId>
<dependency>
<groupId>io.opentelemetry.contrib</groupId>
<artifactId>opentelemetry-samplers</artifactId>
<version>1.33.0-alpha</version>
</dependency>
</dependency>
</dependencies>
```

Expand Down Expand Up @@ -450,26 +450,26 @@ appender in your `logback.xml` or `logback-spring.xml` file:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="OpenTelemetry"
class="io.opentelemetry.instrumentation.logback.appender.v1_0.OpenTelemetryAppender">
<captureExperimentalAttributes>false</captureExperimentalAttributes>
<captureCodeAttributes>true</captureCodeAttributes>
<captureMarkerAttribute>true</captureMarkerAttribute>
<captureKeyValuePairAttributes>true</captureKeyValuePairAttributes>
<captureLoggerContext>true</captureLoggerContext>
<captureMdcAttributes>*</captureMdcAttributes>
</appender>
<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="OpenTelemetry"/>
</root>
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender name="OpenTelemetry"
class="io.opentelemetry.instrumentation.logback.appender.v1_0.OpenTelemetryAppender">
<captureExperimentalAttributes>false</captureExperimentalAttributes>
<captureCodeAttributes>true</captureCodeAttributes>
<captureMarkerAttribute>true</captureMarkerAttribute>
<captureKeyValuePairAttributes>true</captureKeyValuePairAttributes>
<captureLoggerContext>true</captureLoggerContext>
<captureMdcAttributes>*</captureMdcAttributes>
</appender>
<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="OpenTelemetry"/>
</root>
</configuration>
```

Expand Down Expand Up @@ -593,10 +593,10 @@ With the datasource configuration, you need to add the following dependency:

```xml
<dependencies>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-jdbc</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-jdbc</artifactId>
</dependency>
</dependencies>
```

Expand All @@ -617,14 +617,14 @@ You have to add the OpenTelemetry appender to your `log4j2.xml` file:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="io.opentelemetry.instrumentation.log4j.appender.v2_17">
<Appenders>
<OpenTelemetry name="OpenTelemetryAppender"/>
</Appenders>
<Loggers>
<Root>
<AppenderRef ref="OpenTelemetryAppender" level="All"/>
</Root>
</Loggers>
<Appenders>
<OpenTelemetry name="OpenTelemetryAppender"/>
</Appenders>
<Loggers>
<Root>
<AppenderRef ref="OpenTelemetryAppender" level="All"/>
</Root>
</Loggers>
</Configuration>
```

Expand Down

0 comments on commit 4aa1670

Please sign in to comment.