Skip to content

[13.x] add duration to JobAttempted event - #62118

Merged
taylorotwell merged 2 commits into
laravel:13.xfrom
jackbayliss:add-duration-to-job-attempted
Oct 20, 2026
Merged

taylorotwell merged 2 commits into
laravel:13.xfrom
jackbayliss:add-duration-to-job-attempted

Conversation

@jackbayliss

@jackbayliss jackbayliss commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

JobProcessed includes a duration, so we can track the duration for a successful job.

But, if a job is retried or fails, we have no duration, which could tell us a bunch of useful information.. ie perhaps we may see the duration getting slower and slower for an API job etc.

This PR adds duration to the JobAttempted event- job fire is covered with a try/finally to ensure its accessible.

I couldn't see a test for JobAttempted so added a new 1

@github-actions

Copy link
Copy Markdown

Thanks for submitting a PR!

Note that draft PRs are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@jackbayliss
jackbayliss marked this pull request as ready for review October 20, 2026 21:30
@taylorotwell
taylorotwell merged commit dec3460 into laravel:13.x Oct 20, 2026
62 checks passed
@jackbayliss
jackbayliss deleted the add-duration-to-job-attempted branch October 25, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants