-
-
Notifications
You must be signed in to change notification settings - Fork 452
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
Add breadcrumb monolog handler #1199
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This should wait for #1275 |
2deb9ea
to
2d23abe
Compare
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.
This looks fine to me! 👍
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Do you have plan to release this change? |
It needs more work after #1321, I'll try to look at it now. |
@Jean85 is there any way we can help on this PR , as this would remove for us the need of https://github.com/B-Galati/monolog-sentry-handler (as we use it to get log as breadcrumb ) |
This needs a rebase/remerge badly. I'll try it now. |
@Jean85 Just some general thoughts/questions
|
I would ask @stayallive if the Laravel integration could benefit from this too, and/or if it could require dedicated documentation. |
This could possibly also be used by Laravel, since Laravel also uses Monolog under the hood, so it would probably need some added info to the documentation on how to leverage this in a Laravel context. |
Any updates about the doc to know how to set it up? |
I'll write something up in the coming days 🙂 |
Any update on this? |
In short, do this: services:
Sentry\Monolog\BreadcrumbHandler:
arguments:
- '@Sentry\State\HubInterface'
- !php/const Monolog\Logger::INFO
monolog:
handlers:
# this one acts like fingers_crossed
sentry_breadcrumbs:
type: service
name: sentry_breadcrumbs
id: Sentry\Monolog\BreadcrumbHandler
# this one is the main one, once it captures, the breadcrumbs collected by the first one are submitted too
sentry:
type: sentry
level: !php/const Monolog\Logger::ERROR
hub_id: Sentry\State\HubInterface |
This is an interesting additional feature, that would be a required stepping stone for me to proceed with the strategy outlined in getsentry/sentry-symfony#337 (comment).