Creating a new Data Category
Adding a new data category to Sentry requires a modification to Relay. Relay provides a Python library sentry-relay
, which must be updated before a new data category can be imported in Sentry.
You need to be able to develop on Relay, the README, describes how to setup a local development environment for Relay.
- Modify
relay-base-schema/src/data_category.rs
and add your data category. Make sure to give it a good name and document the purpose of the data category. Don't forget to fill outDataCategory::name
andDataCategory::from_name
. - Define how your data category should be rate limited in
relay-quotas/src/quota.rs
, by modifyingCategoryUnit::from
. - Update
sentry-relay
by runningmake header
in therelay-cabi/
directory. - Add your data category to the Relay
CHANGELOG.md
. - Add your data category to the Python
py/CHANGELOG.md
.
You can also use this Example PR as a reference.
To release a new version of sentry-relay
you have to trigger the Release Library workflow with the next version.
New data categories are always released as a new patch version, for example if the current version is 0.7.12
you would trigger the workflow with version 0.7.13
.
Important
Double and tripple check the version before triggering the workflow.
After the library has been published you can update sentry-relay
in Sentry and use your new data category!
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").