Kord-Extensions/kord-extensions

Sentry opt-in/out capibilities for users and guilds.

JustPyrrha opened this issue · 5 comments

Summary

Allow users and guilds to opt-in/out of Sentry reporting.

Current Behaviour

If enabled, all errors are sent to Sentry which include user and guild specific data with no way to opt-in/out

Preferred Behaviour

Allow the Sentry extension to ignore errors and not send them if they come from a specifc user or guild.

Hello, and thanks for opening an issue! As this is the first time you've created an issue on this repository, we'd just like to offer you a warm welcome to the project, and the following pointers:

  • Most importantly, all issues must adhere to our Code of Conduct. Please give it a quick read if you haven't already.

  • While our team is passionate about the projects we've created here, we're all volunteers. Please don't be offended if it takes time for us to get to your issue - we'll be here as soonas we can be!

  • Please provide as much information as possible when asking a question, reporting a problem, or submitting a feature request. This will help us to address your issue quickly and efficiently. If you forgot to add some information, no worries - feel free to edit the issue and add anything you missed!

    Thanks for contacting us! If you have any further questions, please feel free to join us on Discord in the #dev-kotdis channel (or #kordex-discussion for Kord Extensions projects), or to contact a staff member directly.

I think this could be done with an approach like this:

  • Centralise creation of Sentry events with pre-filled contexts, and provide a way to disable specific forms of information being sent (although it's impossible to filter breadcrumbs unfortunately)
  • Simple stack of predicates that allow the bot dev to prevent a Sentry event from being submitted
  • An abstract extension providing a default set of consent management commands, plus a bundled predicate (or set of predicates)
    • This would need to be abstract so that bot devs could implement the extension type to provide their own storage backend
  • A default bundled implementation of the aforementioned abstract extension that uses Storage Units for data storage

Sound like it'd meet your needs?

yeah that sounds perfect

Alright, I'll prioritise this as soon as I can since this is a compliance concern.

The first set of tasks has been completed as of 084b6a4, and the changes are available in version 1.7.1-SNAPSHOT.