Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update log4j instrumentation docs #4915

Merged
merged 9 commits into from
Jan 5, 2022
2 changes: 1 addition & 1 deletion docs/standalone-library-instrumentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ that can be used if you prefer that over using the Java agent:
* [Guava](../instrumentation/guava-10.0/library)
* [JDBC](../instrumentation/jdbc/library)
* [Lettuce](../instrumentation/lettuce/lettuce-5.1/library)
* [Log4j](../instrumentation/log4j/log4j-2.13.2/library)
* [Log4j](../instrumentation/log4j/log4j-2.16/library)
* [Logback](../instrumentation/logback-1.0/library)
* [MongoDB Driver](../instrumentation/mongo/mongo-3.1/library)
* [OkHttp](../instrumentation/okhttp/okhttp-3.0/library)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ To use it, add the module to your application's runtime classpath.
<dependencies>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-log4j-2.13.2</artifactId>
<version>0.17.0-alpha</version>
<artifactId>opentelemetry-log4j-2.16</artifactId>
<version>1.10.0-alpha</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Expand All @@ -22,7 +22,7 @@ To use it, add the module to your application's runtime classpath.

```kotlin
dependencies {
runtimeOnly("io.opentelemetry.instrumentation:opentelemetry-log4j-2.13.2:0.17.0-alpha")
runtimeOnly("io.opentelemetry.instrumentation:opentelemetry-log4j-2.16:1.10.0-alpha")
}
```

Expand All @@ -32,12 +32,6 @@ dependencies {
trace ID and span ID from an active span into
Log4j's [context data](https://logging.apache.org/log4j/2.x/manual/thread-context.html).

**Note**: Depending on your application, you may run into
a [critical bug](https://issues.apache.org/jira/browse/LOG4J2-2838)
with Log4j 2.13.2. If log messages show a `NullPointerException` when adding this instrumentation,
please update to 2.13.3 or higher. The only change between 2.13.2 and 2.13.3 is the fix to this
issue.

Log4j will automatically pick up the integration when you include this module. The following keys
will be added to the context when a log statement is made when a span is active:

Expand Down