Conversation
|
Hi, this just became even more confusing I think. There is no alternative to the "old" We do not make use of Sentry logs, so how are we supposed to replace a deprecated handler with an alternative that does not support the same behaviour? Can you elaborate what we need to do? Thank you. |
|
Hi @mrtus. I recommend just vendoring the Handler into your codebase and use it from there. Do you mind sharing what prevents you from using logs for this scenario? |
Hi, thank you for coming back on this @Litarnus. We use Sentry for the error events, we do not make use of anything else Sentry offers, so also not logging.
// Do not collect logs for exceptions, they should be handled seperately by the `Handler` or `captureException`
if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) {
return false;
}Hence this if-clause, there is no reason for us to use the proposed So we (and these statements) are a little bit conflicted on this "deprecation" that simply provides no alternative solution, unless we, ?what you say, copy over this We need that Maybe I'm undestanding something entirely wrong here? Do you have enough information to better understand our use-case? Can I do anything else to clarify? Thank you for your input! |
|
Thanks for taking your time to provide details, appreciate it. I think my previous message came across a bit different that it was meant. If you want to remove the deprecation warning right now, the only way is to really maintain it yourself. I want to clarify that the main reason we deprecate the I apologize for the confusion and for not writing it in the deprecation notice or the PR. I created this issue which you can use to see the progress of it: #2060 |
Aha, that's alright, It indeed wasn't clear there would be a replacement coming up (I also like to jump to conclusions 🫣). Then my only feedback; don't deprecate something without a clear alternative available to allow an in-place replacement at the moment it is deprecated, especially for something that is a core feature and the new implementation has a conflicting statement. Thank you for your time @Litarnus and appreciate for creating the issue! 👌 |
Absolutely fair and thanks for the feedback |
|
Hello, I'd like to join the discussion as we are affected by this change similarly to @mrtus. In our project, we rely on the SDK to capture two main things: 1) Exceptions and 2) Log messages above a certain level (Warning/Error) as Sentry Issues. Following the deprecation of As I understand it:
Our Pain PointWe use Sentry primarily as an error-tracking tool where specific Monolog levels are expected to create actionable Issues. Transitioning to Questions
Clarifying this would help us decide whether to stick with the deprecated handler for now or start implementing custom wrappers to maintain our current alerting and monitoring workflows. Thank you very much! |
Adds a deprecation notice to the old Sentry
Handlerthat is used to convert log messages into Sentry errors. TheHandlerexisted in a time where Sentry had no native log support yet we still allowed to capture logs in some way.Now that we have the
LogsHandler, it is becoming increasingly confusing which one to use and what they are really doing, so we want to deprecate it for now and point everyone towards the new logs handler.