We use Sentry to collect events related to various problems in our CRM. One of the tags we record is
user-id which is a number representing the user. The events contain additional user data, such as name, various unstructured data in the message etc.
Now for GDPR compliance we are looking into being able to delete all the events related to a certain user. This would have to work across the various issues as we simply want to remove all the events related to this user.
The events to delete are identified by having the
user-id tag with a certain value. What options do we have?
I found that this SQL query directly in the Sentry database fetches all the events I’d like removed but some caches might need to be updated etc. Not having any FKs in the database does not help much
SELECT * FROM sentry_eventtag et JOIN sentry_filtervalue fv ON et.project_id = fv.project_id AND et.value_id = fv.id WHERE fv.key = 'user-id' AND fv.value = '1234'