getsentry / sentry-laravel

The official Laravel SDK for Sentry (sentry.io)
https://sentry.io
MIT License
1.24k stars 188 forks source link

Scheduled task tracing #853

Open jameshulse opened 7 months ago

jameshulse commented 7 months ago

Problem Statement

I would like to have traces for when scheduled commands run via the Console\Kernel. We have some heavy jobs that run each hour and they have started failing. Sentry currently shows that the errors are related but doesn't know how.

image

Solution Brainstorm

The Laravel scheduler has start/finish events (see: https://laravel.com/docs/10.x/scheduling#events) which a new Sentry tracing feature should be able to hook into to create a transaction.

I will potentially attempt this myself in the mean time, and if I make progress then I am happy to try and contribute back.

rzv-me commented 3 months ago

any progress on this, @jameshulse ? I am also very interested in this feature and might be able to pitch in

cleptric commented 3 months ago

We're already discussing this, we might have some more news next week 🙂

jameshulse commented 3 months ago

Fantastic @cleptric. I'm afraid I didn't get much further than this @rzv-me - hopefully the sentry team will figure it out!