Issue
I am trying to set up Rails user feedback and need to pass the event_id
to the frontend. Following these docs, I am unable to access the sentry.error_event_id
that the Ruby SDK is supposed to be setting to the env.
Applies To
- Rails SDK users
- Rails SDK user feedback users
Resolution
Within the SDK the Rails and Rack middleware integrations sets the id of the event they capture to the env. If an error is captured another way (ie. via a manual capture_exception()
call), the env is not set.
When using capture_exception()
, it itself will return the event_id and you will be able to set the returned value to the env manually which you can then pass to your frontend.