You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cleaning up the options documentation to prevent future confusion (#14419)
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->
## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**,
please link it so it closes automatically.*
## IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [ x ] None: Not urgent, can wait up to 1 week+
## SLA
- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!
## PRE-MERGE CHECKLIST
*Make sure you've checked the following before merging your changes:*
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)
## LEGAL BOILERPLATE
<!-- Sentry employees and contractors can delete or ignore this section.
-->
Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.
## EXTRA RESOURCES
- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
Copy file name to clipboardExpand all lines: develop-docs/backend/application-domains/options.mdx
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,15 @@ sidebar_order: 10
5
5
6
6
Options are a way to store generic system-wide configuration. They serve a similar purpose to configuration files, but they are backed by a database, so it's possible to change them at runtime without a deploy. Options are stored in the database and cached, so they are performant and reliable. This makes options well-suited for rates, quotas, and limits.
7
7
8
+
While the process for creating and using options in the codebase is universal, the method for *managing their values* differs between Sentry's internal SaaS platform and self-hosted instances.
9
+
10
+
> **For Sentry Employees**
11
+
>
12
+
> Option management for Sentry's internal SaaS environments is handled via a GitOps workflow. All changes to option values are proposed, reviewed, and deployed through pull requests. For complete details on changing values, handling drift, and deployment, please see the **[sentry-options-automator](https://github.com/getsentry/sentry-options-automator)** repository.
13
+
8
14
## Adding New Options
9
15
10
-
To add a new system option, add it to [`sentry/options/defaults.py`](https://github.com/getsentry/sentry/blob/master/src/sentry/options/defaults.py) by registering it. e.g.,
16
+
The process for registering a new option is the same for all environments and is done in the Sentry codebase. Add your option to [`sentry/options/defaults.py`](https://github.com/getsentry/sentry/blob/master/sentry/options/defaults.py).
You can change the value of an option using `sentry shell`, or by using the [options UI](#options-ui).
45
+
For self-hosted instances, you can change the value of an option using `sentry shell`, or by using the [options UI](#options-ui).
42
46
43
47
### Sentry Shell
48
+
For direct database manipulation, you can set option values using sentry shell.
44
49
45
50
You can set option values using `sentry shell`. e.g.,
46
51
@@ -110,7 +115,9 @@ def test_some_feature(self):
110
115
111
116
## Removing Options
112
117
113
-
If your option is short-lived, you should remove it once it's no longer needed. First, create a pull request to remove the option and its usage. Once it's merged and deployed, remove the option from the database. To do this, you can use the Sentry shell. e.g.,
118
+
If your option is short-lived, you should remove it once it's no longer needed. First, create a pull request to remove the option and its usage. Once it's merged and deployed, remove the option from the database. For self-hosted instances, this is done via the Sentry shell. Otherwise, remove it from the Options Automator repository.
119
+
120
+
For self hosted instances, you can use the Sentry shell. e.g.,
114
121
115
122
```bash
116
123
sentry shell
@@ -122,8 +129,3 @@ then,
122
129
from sentry import options
123
130
options.delete("performance.some-feature-rate")
124
131
```
125
-
126
-
<Alert>
127
-
If you do not have access to the shell, you'll need to contact OPS to remove the option
0 commit comments