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
Copy file name to clipboardExpand all lines: develop-docs/sdks/data-model/event-payloads/contexts.mdx
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -832,3 +832,37 @@ The required field is `package` which should contain the package or framework wh
832
832
}
833
833
}
834
834
```
835
+
836
+
## Feature Flag Context
837
+
838
+
The feature flag context contains information about the flags evaluated prior to an error occurring. Flag evaluation results are placed into the `values` key which is an array of 0 or more flag evaluation result objects.
839
+
840
+
`flag`
841
+
842
+
: **Required.** The name of the flag which was evaluated.
843
+
844
+
- Example: `"feature-is-enabled"`
845
+
846
+
`result`
847
+
848
+
: **Required.** The boolean result of flag evaluation.
Copy file name to clipboardExpand all lines: develop-docs/sdks/expected-features/index.mdx
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,27 @@ Local variable names and values for each stack frame, where possible. Restrictio
91
91
92
92
This functionality should be gated behind the `includeLocalVariables` option, which is `true` by default.
93
93
94
+
## Feature Flags
95
+
96
+
An SDK may expose a Scope property for tracking feature flag evaluations. When the scope forks, it's important to clone the feature flags property. Leaking flag evaluations between threads could lead to inaccurate feature flag evaluation logs.
97
+
98
+
The Scope's flag property should have a capped capacity and should prefer recently-evaluated flags over less-recently-evaluated flags. The recommended data structure is a LRU-cache but it is not required so long as the data structure behaves similarly. Serious deviations from the behavior of an LRU-cache should be documented for your language.
99
+
100
+
The Scope's flag property should expose two methods: `get/0` and `set/2`. `set/2` takes two arguments. The first argument is the name of the flag. It is of type string. The second argument is the evaluation result. It is of type boolean. `set/2` should remove all entries from the LRU-cache which match the provided flag's name and append the new evaluation result to the end of the queue. `get/0` accepts zero arguments. The `get/0` method must return a list of serialized flag evaluation results in order of evaluation. Oldest values first, newest values last. See the <Linkto="/sdk/data-model/event-payload/contexts/#feature-flag-context">Feature Flag Context</Link> protocol documentation for details.
101
+
102
+
### Integrations
103
+
104
+
Integrations automate the work of tracking feature flag evaluations and serializing them on error context. An integration should hook into third-party SDK and record feature flag evaluations using the current scope. For example, in Python an integration would call `sentry_sdk.get_current_scope().flags.set(...)` on each flag evaluation.
105
+
106
+
An integration is also responsible for registering an "on error" hook with the Sentry SDK. When an error occurs the integration should request the current scope and serialize the flags property. For example, in Python an integration might define this callback function:
Turn compiled or obfuscated code/method names in stack traces back into the original. Desymbolication always requires Sentry backend support. Not necessary for many languages.
Copy file name to clipboardExpand all lines: develop-docs/sdks/processes/releases.mdx
+61-3Lines changed: 61 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,8 +47,8 @@ We're just interested in making a GitHub release and a PyPI release so our
47
47
```yaml
48
48
minVersion: 0.28.1
49
49
targets:
50
-
- name: pypi
51
-
- name: github
50
+
- name: pypi
51
+
- name: github
52
52
```
53
53
54
54
### `scripts/bump-version.sh`
@@ -147,6 +147,64 @@ add a label to.
147
147
148
148
[issue in `publish`]: https://github.com/getsentry/publish/issues
149
149
150
+
## Version name conventions
151
+
152
+
To keep versioning consistent across SDKs, we generally follow [semantic versioning (semver)](https://semver.org/), with language- or platform-specific conventions around semver (if applicable).
153
+
Craft has some precautionary checks to ensure we only publish valid, semver-like versions.
154
+
Specifically, craft expects versions following this format:
While the major, minor and patch version numbers are required, pre-release and build properties are optional but can also be combined.
161
+
162
+
### Pre-releases (`<prerelease>`)
163
+
164
+
If you want to create a preview or pre-release of your SDK, you can append a pre-release identifier, as well as an optional incremental pre-release number to your version.
165
+
This will ensure that various craft publishing targets will treat the release as a pre-release, meaning for example that it will not get assigned a `latest` tag in package repositories.
166
+
Likewise, pre-releases will not be inserted into our internal release-registry, which is used by the Sentry product as well as our docs and other tools to query the latest or specific releases of our packages.
167
+
168
+
Importantly, we have strict rules around which identifiers we accept as a pre-release, meaning the `<prerelease>` part of your version has to be one of the following: `preview|pre|rc|dev|alpha|beta|unstable|a|b`.
169
+
Therefore, we **do not accept** arbitrary strings as pre-release identifiers. Using any other identifiers will result in a release being considered stable instead. This means, it will get assigned a `latest` tag in package repositories and inserted into our release-registry.
170
+
171
+
Examples:
172
+
173
+
```txt
174
+
// valid
175
+
1.0.0-preview
176
+
1.0.0-alpha.0
177
+
1.0.0-beta.1
178
+
1.0.0-rc.20
179
+
1.0.0-a
180
+
181
+
// invalid or incorrectly treated
182
+
1.0.0-foo
183
+
1.0.0-canary.0
184
+
```
185
+
186
+
#### Special Case: Post Releases
187
+
188
+
Python has the concept of post releases, which craft handles implicitly. A post release is indicated by a `-\d+` suffix to the semver version, for example: `1.0.0-1`.
189
+
Given that we only consider certain identifiers as [valid pre-release identifiers](#pre-releases-prerelease), post releases are considered stable releases.
190
+
191
+
### Build identifiers (`<build>`)
192
+
193
+
In some cases, you can append a build identifier to your version, for example if you release the same package version for different platforms or architectures.
194
+
You can also combine build and pre-release identifiers but in this case, the pre-release identifier has to come first.
195
+
196
+
Examples:
197
+
198
+
```txt
199
+
// valid
200
+
1.0.0+x86_64
201
+
1.0.0-rc.1+x86_64
202
+
203
+
// invalid or incorrectly treated
204
+
1.0.0+rc.1+x86_64
205
+
1.0.0+x86_64-beta.0
206
+
```
207
+
150
208
## [Optional] Using Multiple Craft Configs in a Repo
151
209
152
210
In some cases, we need to maintain multiple or diverging publishing configs in a repository.
@@ -165,7 +223,7 @@ Add `craft_config_from_merge_target: true` when calling `getsentry/action-prepar
Copy file name to clipboardExpand all lines: docs/concepts/migration/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ description: "Learn more about the reasons to move to Sentry's SaaS solution, wh
7
7
Sentry offers a cloud-hosted, software-as-a-service (SaaS) solution in addition to a self-hosted solution, which are both functionally the same. However, many customers find that self-hosted Sentry can quickly become expensive to maintain, scale, and support, making our SaaS product the better and less costly option. To facilitate moving from self-hosted to SaaS, we provide a self-serve process known as "relocation".
8
8
9
9
<Alert>
10
-
Check out this video on [**Migrating to Sentry SaaS**](https://sentry.io/resources/migrate-to-sentry-saas-workshop/) to learn about our relocation tooling.
10
+
Check out this video on <ahref="https://sentry.io/resources/migrate-to-sentry-saas-workshop/"className="plausible-event-name=migrating+to+saas+video">**Migrating to Sentry SaaS**</a> to learn about our relocation tooling.
11
11
</Alert>
12
12
13
13
For additional reading on considering SaaS, take a look at:
0 commit comments