-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
Disable sentry's default integrations when using it #316
base: master
Are you sure you want to change the base?
Conversation
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.
Great!
In fact it would be good to keep Request Integration enabled as it gives a lot of useful information. |
Thought about it, but as there's already the request processor on monolog, didn't think it'd be useful : https://github.com/Seldaek/monolog/blob/master/src/Monolog/Processor/WebProcessor.php |
That processor is cool but I think it is doing less than Sentry Request Integration. |
getsentry/sentry-python#457 (comment) -> that links to a comment in sentry-php. |
IMHO it would simpler to manage with a factory class that handles all cases. Like this one: https://github.com/B-Galati/monolog-sentry-handler/blob/master/doc/guide-symfony.md#step-1-configure-sentry-hub |
Also, It is needed to set the global Hub by calling // A global HubInterface must be set otherwise some feature provided by the SDK does not work as they rely on this global state
Hub::setCurrent(new Hub($client)); |
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.
👍 LGTM.
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.
Do not merge, this is not ready yet.
839f904
to
c83a458
Compare
@Taluu needs to be rebased from master due to short array clean up 👍 |
Monolog already does it, so...
c83a458
to
03d3f29
Compare
Done. I'll try to find a way to set the global hub state, even though it's repulsive (through a factory or a configurator, probably) |
Hello what is the status of this PR? why @lyrixx asked for not merging it? |
IIRC, it was because sentry relies on a global state, preventing from really having multiple handlers. I can't remember having made any progress, but I think maybe they had some on their side. We will need to check with sentry's sdk. |
Unfortunately, I can not remember. Sorry. In my application, I end up with a full rewrite + a basic "service" handler |
And since then they introduced a new major version of the SDK. |
Monolog already does it, as the request integration that comes with the default configuration of sentry.
Disabling it fixes it. Maybe we should add a marker that says we could activate it ? I doubt the interest but I could be wrong.
poke @B-Galati