GeezerVison is showing github.com — Replace deprecated ThrowableProxy with LogEvent#getThrown() in sentry-log4j2 by sahasan95 · Pull Request #5751 · getsentry/sentry-java
Conversation
sahasan95
commented
Jul 9, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
…-log4j2
📜 Description
Replaces the deprecated ThrowableProxy class with LogEvent#getThrown() in SentryAppender.
💡 Motivation and Context
ThrowableProxy is deprecated in log4j2. The only usage in SentryAppender was calling
.getThrowable() on it to extract the underlying Throwable. LogEvent already exposes
this directly via getThrown(), which is documented as a convenience method for exactly
that purpose, so ThrowableProxy can be dropped entirely.
💚 How did you test it?
Ran the existing sentry-log4j2 test suite (./gradlew :sentry-log4j2:test) — all tests pass.
📝 Checklist
- I added GH Issue ID & Linear ID
- I added tests to verify the changes.
- No new PII added or SDK only sends newly added PII if
sendDefaultPII is enabled.
- I updated the docs if needed.
- I updated the wizard if needed.
- Review from the native team if needed.
- No breaking change or entry added to the changelog.
- No breaking change for hybrid SDKs or communicated to hybrid SDKs.
- Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.
🔮 Next steps
N/A
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
sentry[bot] reacted with hooray emoji
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, could you add entry to CHANGELOG.md as well?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution! LGTM
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Jul 22, 2026
Reviewers
adinauer
adinauer approved these changes
romtsn
Awaiting requested review from romtsn
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Using deprecation in sentry-log4j2
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.