Replies: 1 comment
-
Do you need to filter on it? And are you using Laravel 11? Use Context: https://laravel.com/docs/11.x/context. This will show up with your events. If you do need to filter on it use a tag. I'm assuming this information is only available once your user is "authenticated" by Laravel so you can listen for that event and set the information then in the context or add the tag to the scope: https://laravel.com/docs/11.x/authentication#events Another option is adding it just in time using Other option is using a middleware that runs after the session middleware. So many options to skin this kat but hopefully one of these will help 😎 |
Beta Was this translation helpful? Give feedback.
-
Hi,
While implementing the laravel sentry integration, I have so far been unable to figure out a good way to attach session metadata as tags.
For our use case, we set the location_id within the session object that then tracks which location the user has indicated their at. This doesn't change a lot, other than logging where things are done and the occasional filter. However when debugging, it is a critical piece of information.
Since it's session info, it doesn't exist when my AppProvider runs. Any ideas of how I should hydrate this into Sentry trace & other info?
Beta Was this translation helpful? Give feedback.
All reactions