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

Fix log4j2 appender docs #4985

Closed
wants to merge 5 commits into from
Closed

Conversation

jack-berg
Copy link
Member

Fixes the out of date docs for the io.opentelemetry.instrumentation:opentelemetry-log4j-context-data-2.16-autoconfigure module, and adds docs for the io.opentelemetry.instrumentation:opentelemetry-log4j-appender-2.16 module.


```xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="io.opentelemetry.instrumentation.log4j.appender.v2_16">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@open-telemetry/java-instrumentation-maintainers this is terrible package name, it will confuse the hell out of our users.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to Special Topics meeting agenda for tomorrow

</Configuration>
```

Next, associate the `OpenTelemetryAppender` with a `SdkLogEmitterProvider` in your application:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any OpenTelemetryAppender in the example below. Maybe I don't know anything about log4j appenders, but I am confused here :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenTelemetryAppender is the name given to the appender configured in the xml snippet above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but this name is not present in the code. So how exactly do I "associate the OpenTelemetryAppender configured via log4j2.xml with a SdkLogEmitterProvider"? What if I use another name in log4j.xml, do I need to change my code somehow?


To use it, add the module to your application's runtime classpath.

Replace `OPENTELEMETRY_VERSION` with the latest
stable [release](https://search.maven.org/search?q=g:io.opentelemetry).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
stable [release](https://search.maven.org/search?q=g:io.opentelemetry).
stable [release](https://search.maven.org/search?q=g:io.opentelemetry.instrumentation).

To use it, add the following modules to your application's classpath.

Replace `OPENTELEMETRY_VERSION` with the latest
stable [release](https://search.maven.org/search?q=g:io.opentelemetry).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
stable [release](https://search.maven.org/search?q=g:io.opentelemetry).
stable [release](https://search.maven.org/search?q=g:io.opentelemetry.instrumentation).

@trask
Copy link
Member

trask commented Jan 3, 2022

hey @jack-berg, can you send a PR to #4915 instead? or check that your changes cover everything in that PR and I will close #4915. thx!

@jack-berg
Copy link
Member Author

@trask sure, did't realize you were working on the same thing!

I've opened this PR against your draft branch. Closing this PR for now.

@jack-berg jack-berg closed this Jan 3, 2022
@trask
Copy link
Member

trask commented Jan 3, 2022

@trask sure, did't realize you were working on the same thing!

ya, it's confusing to hold doc PRs until releases are made, I'm not really sure if it's worth it... (going to bring up in special topics meeting later today)

I've opened this PR against your draft branch. Closing this PR for now.

thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants