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
Scheduled task monitoring #628
Comments
Check other similar services |
Leaving a link here to a package someone created for the Cron Monitoring feature. https://github.com/modernmcguire/sentry-cron-monitoring-laravel |
Thanks @cleptric! Author of that ^ package here. Feel free to borrow as much of the code as you'd like. My option is definitely more of an opt-in as it requires the user to add a method to each of their schedules. I also played with the idea of a Trait on the job itself with a protected $monitor_id property. I decided against it because I would have to add that to Jobs and Commands and it also wouldn't work for closure based jobs. Final note if you did want it to be automatic you could use the Events that are fired before/after jobs as referenced in the initial ask by @stayallive. The hard part would be somehow figuring out the monitor id situation. Maybe use the job name as the unique identifier instead of the monitor id? Not sure if that's a good option as you would have to do a text based lookup on your side then. Sounds expensive to me. Let me know if you have any questions or want to bounce some ideas back and forth. Thanks! |
Your approach is a valid starting point. Some sort of auto-setup would be nice, but we have to answer a few open questions on the product first. |
We currently use the |
Sentry has a (in beta since forever) CRON monitoring: https://docs.sentry.io/product/crons/.
It would be really sweet if we can somehow automatically set that up for the user based on their scheduled tasks (basically CRONs): https://laravel.com/docs/9.x/scheduling#defining-schedules.
I'm imagining this requires some sort of synchronize command to be run to talk with Sentry and create the correct CRONs on the Sentry server so depending on how this actually works this might be very easy or tricky or out of scope for the SDK. Will require some investigation but it's an interesting idea!
The text was updated successfully, but these errors were encountered: