-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Unable to extend SentryHandler in JUL for configuration in Payara/Glassfish #1360
Comments
@davyrod thanks for reporting, why would you need to extend, what's the use case? if that makes sense, we could also implement it directly to the reason for making everything if possible as non-extendable is:
|
In enterprise application servers like Glassfish/Payara (we use Payara), the log handlers are managed by the application server. In order to add additional LogHandlers an HK2 component needs to be created so Payara can register the additional log handler service, in this case Sentry. We currently have a working sentry log handler on v1.7.30 by extending SentryHandler and are trying to upgrade to sentry-jul 4.3.0 with the above mentioned blocker. Here is a reference to an example of how we currently use Sentry in a Payara server deployment: Payara Sentry Log Handler Example v1.7.30 |
@marandaneto PR submitted and checks passed. |
Platform:
IDE:
Build system:
Android Gradle Plugin:
Sentry Android Gradle Plugin:
Proguard/R8:
Platform installed with:
The version of the SDK:
4.x.x
I have the following issue:
The description goes here
sentry-jul SentryHandler was added back in 4.x.x, however I am unable to extend the class in order to configure the sentry loghandler as a custom loghandler in an application deployed using Payara/Glassfish. The reason seems to be related to the class being marked as 'final'. Is there a reason for the 'final' identifier, and if not, can it be removed to allow extension? If it is not possible, what is a good workaround for extending and deploying to an application in Payara/Glassfish?
Steps to reproduce:
`import java.util.logging.Handler;
import io.sentry.jul.SentryHandler;
import javax.inject.Singleton;
import org.jvnet.hk2.annotations.ContractsProvided;
import org.jvnet.hk2.annotations.Service;
@service
@singleton
@ContractsProvided({PayaraSentryHandler.class, Handler.class})
public class PayaraSentryHandler extends SentryHandler {
}`
Actual result:
Expected result:
The text was updated successfully, but these errors were encountered: