Migrating from Raven to Sentry (Java)

We’ve been using raven/raven-log4j within our Java application for some time now and decided to migrate to sentry/sentry-log4j. While the migration has gone smoothly, we’ve noticed that SentryAppender no longer contains the methods it did within the raven-log4j library, such as setRelease.

We’re considering moving this into log4j.properties instead to remove that extra code, but wanted to double-check to see if this would be the correct way to do so:


Or, would we add it along with the tags? Example:


Thank you in advance.

Also, curious if there’s any information on how to accomplish the previous SentryAppender.setRelease method if we wanted to keep this in our codebase instead of moving it to the properties file.

Taking a stab at things, would it be:



If you haven’t already, check out the migration guide: https://docs.sentry.io/clients/java/migration/

log4j.appender.SentryAppender.release and related (including DSN) are no longer valid. The reasoning is explained in the migration guide, you can see more on configuration here: https://docs.sentry.io/clients/java/config/

As for setting the release in code, you are correct, if you get the storedClient() you can set any of those values manually on the client.

Perfect, thank you for the response. I went with the JVM option method and that worked great, and adding the release is working as well.