Skip to content

Commit a9d8594

Browse files
committed
Merge branch 'master' into antonpirker/develop-docs-sidebar
2 parents bb0f8ff + 39f14ed commit a9d8594

File tree

189 files changed

+2452
-1061
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+2452
-1061
lines changed

apps/changelog/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"lint": "next lint",
1515
"migrate:dev": "dotenv -e .env.development -- yarn prisma migrate reset"
1616
},
17+
"prisma": {
18+
"seed": "node prisma/seed/seed.mjs"
19+
},
1720
"dependencies": {
1821
"@auth/prisma-adapter": "^1.2.0",
1922
"@google-cloud/storage": "^7.7.0",

apps/changelog/prisma/seed/seed.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ async function seed() {
7676
console.log('Seed data created successfully!');
7777
} catch (error) {
7878
console.error('Error seeding data:', error);
79+
process.exit(1);
7980
} finally {
8081
await prisma.$disconnect();
8182
}

develop-docs/api-server/api/public.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,30 @@ NOTE: The `openapi-diff` test is supposed to fail when CI runs on your pull requ
483483

484484
---
485485

486+
**Problem**: `drf_spectacular.plumbing.UnableToProceedError' <class 'serializer_path.FooSerializer'> ... raise UnableToProceedError(hint)`
487+
488+
**Solution**: Check that the response of your API documentation is using a TypedDict rather than a serializer.
489+
490+
If the schema looks something like this:
491+
```python
492+
...
493+
200: inline_sentry_response_serializer(
494+
"ListDocIntegrationResponse", list[FooSerializer]
495+
),
496+
```
497+
498+
Then you need to change it to use a TypedDict by first typing the serializer, then updating the schema to use the TypedDict:
499+
```python
500+
...
501+
200: inline_sentry_response_serializer(
502+
"ListDocIntegrationResponse", list[FooSerializerResponse]
503+
),
504+
```
505+
506+
Refer to the section above on [Success Responses](#success-responses) for more information.
507+
508+
---
509+
486510
## Requesting an API to be public
487511

488512
Are you a Sentry user who wants an endpoint to be public?

develop-docs/sdks/data-model/event-payloads/contexts.mdx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,3 +832,37 @@ The required field is `package` which should contain the package or framework wh
832832
}
833833
}
834834
```
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.
849+
850+
- Example: `false`
851+
852+
853+
### Example Feature Flag Context
854+
855+
```json
856+
{
857+
"contexts": {
858+
"flags": {
859+
"values": [
860+
{
861+
"flag": "my_flag_name",
862+
"result": true
863+
}
864+
]
865+
}
866+
}
867+
}
868+
```

develop-docs/sdks/expected-features/index.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,27 @@ Local variable names and values for each stack frame, where possible. Restrictio
9191

9292
This functionality should be gated behind the `includeLocalVariables` option, which is `true` by default.
9393

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 <Link to="/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:
107+
108+
```python
109+
def flag_error_processor(event, exc_info):
110+
scope = sentry_sdk.get_current_scope()
111+
event["contexts"]["flags"] = {"values": scope.flags.get()}
112+
return event
113+
```
114+
94115
## Desymbolication
95116

96117
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.

develop-docs/sdks/processes/releases.mdx

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ We're just interested in making a GitHub release and a PyPI release so our
4747
```yaml
4848
minVersion: 0.28.1
4949
targets:
50-
- name: pypi
51-
- name: github
50+
- name: pypi
51+
- name: github
5252
```
5353
5454
### `scripts/bump-version.sh`
@@ -147,6 +147,64 @@ add a label to.
147147

148148
[issue in `publish`]: https://github.com/getsentry/publish/issues
149149

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:
155+
156+
```txt
157+
<major>.<minor>.<patch>(-<prerelease>)?(-<build>)?
158+
```
159+
160+
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+
150208
## [Optional] Using Multiple Craft Configs in a Repo
151209

152210
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
165223
jobs:
166224
release:
167225
runs-on: ubuntu-latest
168-
name: 'Release a new version'
226+
name: "Release a new version"
169227
steps:
170228
# ...
171229
- name: Prepare release

docs/concepts/migration/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: "Learn more about the reasons to move to Sentry's SaaS solution, wh
77
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".
88

99
<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 <a href="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.
1111
</Alert>
1212

1313
For additional reading on considering SaaS, take a look at:
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: Banners
3+
noindex: true
4+
sidebar_order: 80
5+
---
6+
7+
You can add arbitrary banners to the top of a page by adding adding an entry to the `BANNERS` array on
8+
the `banner/index.tsx` file. The `BANNERS` array is an array of objects with the following properties:
9+
10+
```typescript {filename:banner/index.tsx}
11+
type BannerType = {
12+
/** This is an array of strings or RegExps to feed into new RegExp() */
13+
appearsOn: (string | RegExp)[];
14+
/** The label for the call to action button */
15+
linkText: string;
16+
/** The destination url of the call to action button */
17+
linkURL: string;
18+
/** The main text of the banner */
19+
text: string;
20+
/** Optional ISO Date string that will hide the banner after this date without the need for a rebuild */
21+
expiresOn?: string;
22+
};
23+
```
24+
25+
You can add as many banners as you like. If you need to disable all banners, simply delete them from the array.
26+
27+
Each banner is evaluated in order, and the first one that matches will be shown.
28+
29+
Examples:
30+
31+
```typescript {filename:banner/index.tsx}
32+
// ...
33+
// appearsOn = []; // This is disabled
34+
// appearsOn = ['^/$']; // This is enabled on the home page
35+
// appearsOn = ['^/welcome/']; // This is enabled on the "/welcome" page
36+
// ...
37+
38+
const BANNERS = [
39+
// This one will take precedence over the last banner in the array
40+
// (which matches all /platforms pages), because it matches first.
41+
{
42+
appearsOn: ['^/platforms/javascript/guides/astro/'],
43+
text: 'This banner appears on the Astro guide',
44+
linkURL: 'https://sentry.io/thought-leadership',
45+
linkText: 'Get webinarly',
46+
},
47+
48+
// This one will match the /welcome page and all /for pages
49+
{
50+
appearsOn: ['^/$', '^/platforms/'],
51+
text: 'This banner appears on the home page and all /platforms pages',
52+
linkURL: 'https://sentry.io/thought-leadership',
53+
linkText: 'Get webinarly',
54+
},
55+
];
56+
57+
```
58+
59+
Optionally, you can add an `expiresOn` property to a banner to hide it after a certain date without requiring a rebuild or manual removeal.
60+
the ISO Date string should be in the format `YYYY-MM-DDTHH:MM:SSZ` to be parsed correctly and account for timezones.
61+
62+
```typescript {filename:banner/index.tsx}
63+
const BANNERS = [
64+
{
65+
appearsOn: ['^/$'],
66+
text: 'This home page banner will disappear after 2024-12-06',
67+
linkURL: 'https://sentry.io/party',
68+
linkText: 'RSVP',
69+
expiresOn: '2024-12-06T00:00:00Z',
70+
},
71+
];
72+
```

docs/organization/integrations/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ For more details, see the [full Integration Platform documentation](/organizatio
1616

1717
| Integration | Issue alerts | Metric alerts | Link Unfurling |
1818
| ------------------------------------------------------------------------ | ------------ | ------------- | -------------- |
19+
| [All Quiet](https://docs.allquiet.app/integrations/inbound/sentry) | X | | |
1920
| [Blar](/organization/integrations/notification-incidents/blar/) | X | | |
2021
| [Datadog](https://docs.datadoghq.com/integrations/sentry/) | X | | |
2122
| [Microsoft Teams](/organization/integrations/notification-incidents/msteams/) | X | X | |

docs/organization/integrations/notification-incidents/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ sidebar_order: 20
44
description: "Learn more about Sentry's notification and incidents integrations."
55
---
66

7+
- [All Quiet](https://docs.allquiet.app/integrations/inbound/sentry)
78
- [Blar](/organization/integrations/notification-incidents/blar/)
89
- [Datadog](https://docs.datadoghq.com/integrations/sentry/)
910
- [Microsoft Teams](/organization/integrations/notification-incidents/msteams/)

0 commit comments

Comments
 (0)