sentry-java
sentry-java copied to clipboard
SentryOptions on Logback and Log4j SentryAppender should not be used
Problem Statement
The SentryOptions options property on io.sentry.logback.SentryAppender should not be used except for the start method. It's set via the setOptions method by Logback. Then Logback calls start (its signature is specified by Logback).
This can cause problems when using the options property outside of the start method as options set via Sentry.init are ignored.
Solution Brainstorm
Put a warning in place as a first measure, not sure how to solve it for good.
Very similar problem exists in io.sentry.log4j2.SentryAppender. There we don't store options but parts of the options like contextTags as field.
Warning is in place and seems to suffice for now.