You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: is it possible to store some context alongside the request data ( eg. current auth user, ... ) #7
@olivM This was an issues I faced as well! I needed extra information about the requests being sent. I opened PR #6 which, if it's merged, will allow the user to specify X-Barstool-UUID as a request header when sending a Saloon request.This way you could pre-define a uuid when sending the request and can then save that against a row in a different table of logs as a barstool_id. So you can store extra information with a direct link to the barstool logs without bloating the barstools table.
My instance was that we were syncing users from a third party platform and needed to keep track of if something went wrong. We had a user_sync_logs table were were using anyway and adding barstool_id to it would increase visibility of any issues.
It would allow your code to look something like this:
Hey @olivM — an update on this: #13 adds exactly what you asked for. You'll be able to attach context to recordings and it gets stored in a new context JSON column on the barstools table:
It's built on Laravel Context under the hood, so context set in a controller is carried into queued jobs automatically and reset between requests. Existing installs will just need to publish and run a small migration to add the column.
I'll close this issue once the PR is merged and released. Thanks for the suggestion!
Activity
allmanaj commentedon Jun 3, 2026
@olivM This was an issues I faced as well! I needed extra information about the requests being sent. I opened PR #6 which, if it's merged, will allow the user to specify
X-Barstool-UUIDas a request header when sending a Saloon request.This way you could pre-define a uuid when sending the request and can then save that against a row in a different table of logs as abarstool_id. So you can store extra information with a direct link to the barstool logs without bloating thebarstoolstable.My instance was that we were syncing users from a third party platform and needed to keep track of if something went wrong. We had a
user_sync_logstable were were using anyway and addingbarstool_idto it would increase visibility of any issues.It would allow your code to look something like this:
craigpotter commentedon Jul 14, 2026
Thanks, sorry for the delaying in coming back to you on this.
@allmanaj PR looks good, I have one small amend then I will release it.
Hope you guys are finding Barstool useful!
craigpotter commentedon Jul 17, 2026
Hey @olivM — an update on this: #13 adds exactly what you asked for. You'll be able to attach context to recordings and it gets stored in a new
contextJSON column on thebarstoolstable:It's built on Laravel Context under the hood, so context set in a controller is carried into queued jobs automatically and reset between requests. Existing installs will just need to publish and run a small migration to add the column.
I'll close this issue once the PR is merged and released. Thanks for the suggestion!
Add `Barstool::context()` for storing custom context on recordings (s…