-
-
Notifications
You must be signed in to change notification settings - Fork 452
Send Log4j2 logs to Sentry as logs #4517
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
base: main
Are you sure you want to change the base?
Conversation
|
Performance metrics 🚀
|
@sentry review |
On it! We are reviewing the PR and will provide feedback shortly. |
PR DescriptionThis pull request introduces the ability to capture log messages directly as Sentry logs, in addition to the existing functionality of capturing log events as Sentry events. This allows users to leverage Sentry's logging infrastructure for structured logging and analysis, independent of error reporting. Click to see moreKey Technical ChangesA new Architecture DecisionsThe decision was made to use Sentry's existing logging API ( Dependencies and InteractionsThis change depends on the Sentry Java SDK's logging API. It interacts with the existing event capturing mechanism in Risk ConsiderationsIntroducing a new logging path could potentially increase the volume of data sent to Sentry, which might impact performance and billing. Users should carefully configure the Notable Implementation DetailsThe |
📜 Description
Allow setting a minimumLevel to our Log4j2 integration which causes logs >= that level to be sent to Sentry as logs.
Setting the minimum level can be done on the appender config in
log4j2.xml
:You also have to enable the logs feature:
Either in
sentry.properties
:or when calling
Sentry.init
:💡 Motivation and Context
Closes #4403
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps