Skip to content

Commit 2d8b1f3

Browse files
authored
Merge branch 'master' into codyde/javascript-tracing-refactor
2 parents 00993d8 + 00874c4 commit 2d8b1f3

File tree

204 files changed

+5076
-2602
lines changed

Some content is hidden

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

204 files changed

+5076
-2602
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@
4545

4646
# ###### Replays #######
4747

48-
# /src/docs/product/session-replay/ @getsentry/replay
49-
# /src/includes/session-replay-web-report-bug.mdx @getsentry/replay
50-
# /src/platform-includes/session-replay/ @getsentry/replay @getsentry/replay-sdk-web
51-
# /src/platforms/javascript/common/session-replay/ @getsentry/replay @getsentry/replay-sdk-web
52-
# /src/wizard/javascript/replay-onboarding/ @getsentry/replay @getsentry/replay-sdk-web
48+
# /src/docs/product/session-replay/web @jas-kas @getsentry/replay-sdk-web @getsentry/replay-frontend @getsentry/replay-backend
49+
# /src/docs/product/session-replay/mobile @jas-kas @getsentry/replay-sdk-mobile @getsentry/replay-frontend @getsentry/replay-backend
50+
# /src/includes/session-replay-web-report-bug.mdx @getsentry/replay-sdk-web
51+
# /src/platform-includes/session-replay/ @getsentry/replay-sdk-web @getsentry/replay-sdk-mobile
52+
# /src/platforms/javascript/common/session-replay/ @getsentry/replay-sdk-web
5353

54-
# /src/docs/product/dev-toolbar/ @getsentry/replay
54+
# /src/docs/product/dev-toolbar/ @ryan953 @jas-kas
5555

5656
# ###### End Replays #######

.github/workflows/bump-api-schema-sha.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v4.1.1
1515
- name: Get auth token
1616
id: token
17-
uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
17+
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
1818
with:
1919
app-id: ${{ vars.SENTRY_INTERNAL_APP_ID }}
2020
private-key: ${{ secrets.SENTRY_INTERNAL_APP_PRIVATE_KEY }}

.github/workflows/prepare-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- name: Get auth token
1717
id: token
18-
uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
18+
uses: actions/create-github-app-token@0d564482f06ca65fa9e77e2510873638c82206f2 # v1.11.5
1919
with:
2020
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
2121
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}

develop-docs/development-infrastructure/devservices.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ commands:
2525
purge Purge the local devservices cache
2626
```
2727
28+
## Installation
29+
30+
Installation instructions can be found [here](https://github.com/getsentry/devservices?tab=readme-ov-file#installation).
31+
2832
## Viewing logs for a service
2933
3034
```shell

develop-docs/sdk/data-model/envelope-items.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ details.
146146

147147
*None*
148148

149-
### Statsd
149+
### Statsd (deprecated)
150150

151151
Item type `"statsd"` contains metrics emissions in a superset of the statsd format.
152152

@@ -162,7 +162,7 @@ details.
162162

163163
*None*
164164

165-
### Metric Meta
165+
### Metric Meta (deprecated)
166166

167167
Item type `"metric_meta"` contains per-metric meta data which is persisted alongside
168168
metrics in the system.

develop-docs/sdk/expected-features/data-handling.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ Fields in the event payload that allow user-specified or dynamic values are rest
111111

112112
- Mappings of values (such as HTTP data, extra data, etc) are limited to 50 item pairs.
113113
- Event IDs are limited to 36 characters and must be valid UUIDs.
114+
- Flag keys are limited to 32 characters.
115+
- Flag values are limited to 200 characters.
114116
- Tag keys are limited to 32 characters.
115117
- Tag values are limited to 200 characters.
116118
- Culprits are limited to 200 characters.

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

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ What scope means depends on the application, for a web framework it is most like
3030

3131
## Automatic Context Data
3232

33-
Automatic addition of useful attributes such as `tags` or `extra` or specific `contexts`. Typically means the SDK hooks into a framework so that it can set attributes that are known to be useful for most users. Please check [Data Handling](/sdk/expected-features/data-handling) for considerations.
33+
Automatic addition of useful attributes such as `flags` or `tags` or `extra` or specific `contexts`. Typically means the SDK hooks into a framework so that it can set attributes that are known to be useful for most users. Please check [Data Handling](/sdk/expected-features/data-handling) for considerations.
3434

3535
## Breadcrumbs
3636

@@ -118,24 +118,15 @@ This functionality should be gated behind the `includeLocalVariables` option, wh
118118

119119
## Feature Flags
120120

121-
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.
121+
An SDK may optionally support feature flag collection. Feature flags are collected on evaluation, stored on the scope, and submitted to Sentry on error obeying the schema specified in the <Link to="/sdk/data-model/event-payloads/contexts/#feature-flag-context">Feature Flag Context</Link> protocol documentation.
122122

123-
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.
123+
If an SDK supports feature flags it must expose a function `set_flag` which has identical behavior to the `set_tag` function. It must accept a key of type string and a value which is a union of string, boolean, integer, float, and structure. An SDK may hold up to 100 evaluations. Evaluations are ordered based on their evaluation time. Typically, an LRU cache is used to store feature flags. When the capacity of the cache is exceeded the oldest flag is dropped. Any (or multiple) data structure(s) may be chosen by the SDK to store feature flags as long as the evaluation order of the flags is maintained.
124124

125-
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-payloads/contexts/#feature-flag-context">Feature Flag Context</Link> protocol documentation for details.
125+
Because flags are stored on the scope, when a scope forks the flags data structure must be cloned. Failure to clone the data structure appropriately will lead to flags leaking across thread boundaries and lead to unexpected results.
126126

127127
### Integrations
128128

129-
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.
130-
131-
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:
132-
133-
```python
134-
def flag_error_processor(event, exc_info):
135-
scope = sentry_sdk.get_current_scope()
136-
event["contexts"]["flags"] = {"values": scope.flags.get()}
137-
return event
138-
```
129+
Integrations automate the work of tracking feature flag evaluations. An integration should hook into a third-party SDK and record feature flag evaluations using the current scope.
139130

140131
## Desymbolication
141132

@@ -346,7 +337,7 @@ The SDK automatically captures HTTP Client errors and sends them to [sentry.io](
346337

347338
The HTTP Client integration should have 3 configuration options:
348339

349-
- `captureFailedRequests` defaults to `false` due to PII reasons.
340+
- `captureFailedRequests` defaults to `false` when introducing this feature due to PII reasons and can be changed to `true` in a follow up major.
350341
- The SDK will only capture HTTP Client errors if it is enabled.
351342
- `failedRequestStatusCodes` defaults to `500 - 599`, this configuration option accepts a `List` of `HttpStatusCodeRange` which is a range of HTTP status code -> `min` to `max` or a single `status_code`.
352343
- The SDK will only capture HTTP Client errors if the HTTP Response status code is within the defined ranges in `failedRequestStatusCodes`.
@@ -547,9 +538,9 @@ Ability for the SDK to attach request body to events and triggered during the ex
547538
User should be able to set a configuration option `maxRequestBodySize` to instruct SDK how big requests bodies should be attached.
548539
SDK controls what is an actual size in bytes for each option:
549540

550-
- `none` (default)
541+
- `none`
551542
- `small` - `1000` bytes
552-
- `medium` - `10000` bytes
543+
- `medium` - `10000` bytes (default)
553544
- `always`
554545

555546
## Log context

develop-docs/sdk/miscellaneous/hub_and_scope_refactoring.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ This scope is probably only used for process-wide data like the `release`.
7878

7979
**Isolation Scope**
8080

81-
This scope holds data only applicable to the current request (on a server), tab (in a browser), or user (on a mobile). The top-level APIs that manipulate data (like `sentry_sdk.set_tag()`, `sentry_sdk.set_context()` etc) write to the isolation scope (at least once the migration phase is over, see "Backwards Compatibility").
81+
This scope holds data only applicable to the current request (on a server), tab (in a browser), or user (on a mobile). The top-level APIs that manipulate data (like `sentry_sdk.set_flag()`, `sentry_sdk.set_tag()`, `sentry_sdk.set_context()` etc.) write to the isolation scope (at least once the migration phase is over, see "Backwards Compatibility").
8282

8383
The isolation scope is stored in a context variable, thread local, async local, or something similar (depending on the platform). It may also be stored on OTel `Context` so we can rely on OTels `Context` propagation once SDKs implement POTEL.
8484

develop-docs/sdk/miscellaneous/unified-api/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ Sentry.configureScope((scope) =>
216216

217217
- `scope.set_extras(extras)`: Sets an object with key/value pairs, convenience function instead of multiple `set_extra` calls. As with `set_extra` this is considered deprecated functionality.
218218

219+
- `scope.set_flag(key, value)`: Sets the flag to a string value, overwriting a potential previous value. Entries can not be removed except by expiration.
220+
219221
- `scope.set_tag(key, value)`: Sets the tag to a string value, overwriting a potential previous value. Removing a key is SDK-defined, either with a `remove_tag` function or by passing nothing as data.
220222

221223
- `scope.set_tags(tags)`: Sets an object with key/value pairs, convenience function instead of multiple `set_tag` calls.

develop-docs/sdk/processes/basics.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,17 @@ When sending events just substitute `orgXXX.ingest.sentry.io` with `localhost:30
3232
whichever port you ended up chosing. Also note that a local relay will out of the box
3333
be available via HTTP only so don't try to send HTTPS requests there.
3434

35-
## Join us on Discord
36-
37-
You can reach out to Sentry open source contributors and talk with other SDK maintainers on the [Sentry Discord server](https://discord.gg/sentry).
38-
3935
## Consult Existing SDKs
4036

4137
While we're trying to keep the docs up to date about all important things, it's usually
4238
a good idea to refer to already existing Sentry SDKs for input. In particular the
4339
transport design is not part of the documentation but generally quite similar between
4440
SDKs.
41+
42+
## Type out context in Relay
43+
44+
To have a better understanding of various [context](https://develop.sentry.dev/sdk/data-model/event-payloads/contexts/) our SDKs emit, any newly added context should also be typed out in [Relay](https://github.com/getsentry/relay/tree/master/relay-event-schema/src/protocol/contexts).
45+
46+
## Join us on Discord
47+
48+
You can reach out to Sentry open source contributors and talk with other SDK maintainers on the [Sentry Discord server](https://discord.gg/sentry).

develop-docs/self-hosted/troubleshooting/sentry.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,13 @@ worker1:
5151
```
5252
5353
To see a more complete example, please see [a sample solution on our community forum](https://forum.sentry.io/t/how-to-clear-backlog-and-monitor-it/10715/14?u=byk).
54+
55+
## Cannot Load JavaScript or CSS Files From Web Interface
56+
57+
If you are running your Sentry instance behind a CDN like Cloudflare, Fastify, or the like, you may see some errors of invalid JavaScript or CSS files being loaded from the web interface. This is caused by some static asset files that are already optimized by the bundlers, but aren't being served with minified extensions (for example, `.min.js`). Therefore, the CDN that you are using will try to optimize the files a second time, which will result in corrupted files.
58+
59+
Some known paths where you may see this error:
60+
* _static/dist/sentry/entrypoints/sentry.css
61+
* _static/dist/sentry/entrypoints/app.js
62+
63+
To fix this, you can disable the auto optimization performed by your CDN.

docs/account/auth-tokens/index.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,12 @@ User auth token permissions are customizable but cannot be edited later.
4747

4848
![](./img/org-auth-tokens-overview.png)
4949

50+
<Alert>
51+
5052
They can also be generated on certain pages of Sentry's docs if you're signed in, and by using the Sentry Wizard to configure uploading source maps.
5153

54+
</Alert>
55+
5256
Organization auth token names are generated for you unless you create the token through the Sentry UI. This name is only used for display purposes - it helps to identify an auth token in case you want to revoke it later. You can change the name for an organization auth token at [sentry.io](https://sentry.io) on the **Edit Auth Token** page under **Settings > Developer Settings > Auth Tokens**.
5357

5458
For security reasons, organization auth tokens are only visible _once_, right after you create them. If you lose the auth token, you will have to create a new one. This means you can't see the full token on the overview page or on the token detail page, you can only see the last characters of the token to help identify it.

docs/cli/dif.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ the upload is performed on the same machine as the application build:
8686
sentry-cli debug-files upload --include-sources /path/to/files...
8787
```
8888

89+
<Alert>
90+
91+
This feature is supported by build tools that produce debug information files
92+
supported by Sentry such as DWARF and PDB. This applies to languages such
93+
as C/C++/C#/Swift/Rust/Zig/etc.
94+
For Java/Kotlin and other JVM languages, use one of the plugins: [Maven](https://docs.sentry.io/platforms/java/maven/) or [Gradle](https://docs.sentry.io/platforms/java/gradle/).
95+
96+
</Alert>
97+
8998
## Uploading Files
9099

91100
Use the `sentry-cli debug-files upload` command to upload debug information files to
Loading
Loading

docs/concepts/data-management/event-grouping/index.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,32 @@ If the stack trace is not available, but exception information is, then the grou
5555

5656
Grouping falls back to messages if the stack trace, `type`, and `value` are not available. When this happens, the grouping algorithm will try to use the message without any parameters. If that is not available, the grouping algorithm will use the full message attribute.
5757

58+
### AI-Enhanced Grouping
59+
60+
In addition to fingerprint-based grouping, Sentry uses AI to further improve issue grouping accuracy. This system helps identify semantically similar errors that might have different fingerprints due to minor code variations. The AI grouping system works alongside traditional fingerprinting - it only attempts to group new issues and will never split up issues that were grouped by fingerprint.
61+
62+
This system will not apply to any events that have fully custom fingerprints (either set via SDK or [fingerprint rules](https://docs.sentry.io/product/issues/grouping-and-fingerprints/#fingerprint-rules)). However, events with fingerprints containing `{{ default }}` will use AI grouping to calculate the `{{ default }}` portion of the fingerprint.
63+
64+
When Sentry's default fingerprinting algorithm generates a new hash, it automatically sends the error data to [Seer](https://github.com/getsentry/seer), our AI/ML service. That error data includes the message and in-app stack frames (including those configured with stack trace rules), or all frames when no in-app frames are present.
65+
66+
Seer performs the following steps:
67+
68+
1. It generates a vector representation of the error's stack trace using a transformer-based text embedding model
69+
2. It compares this embedding against existing error embeddings for that project in the database
70+
3. If a semantically similar error is found within the configured threshold, Sentry merges the new error into the existing issue
71+
72+
![Sentry Seer PostgreSQL.](./img/sentry-seer-postgresql.png)
73+
74+
This algorithm is particularly effective at handling cases where:
75+
76+
- Similar errors occur in different parts of the codebase
77+
- Code changes or deployments introduce slight variations in stack traces
78+
- Different error types represent the same underlying problem
79+
80+
You can see issues that have been merged through this system in the “Merged Issues” section of the Issue Details UI. You can always unmerge any fingerprints that you would not like to see grouped, and our system will avoid grouping them in the future.
81+
82+
![Merged issues.](./img/merged-issues.png)
83+
5884
## Ways to Customize Error Grouping
5985

6086
If the way that Sentry is grouping issues for your organization is already ideal, you don't need to make any changes. However, you may find that Sentry is either creating too many similar groups, or is grouping disparate events into groups that should be separate. If this is the case, for **error issues**, you can extend and change the default grouping behavior. Error grouping can be extended and changed completely according to your needs. Transaction grouping currently cannot be customized.

docs/concepts/search/searchable-properties/issues.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Learn more about searchable issue properties."
44
sidebar_order: 10
55
---
66

7-
[Issues](/product/issues/) are an aggregate of one or more error events. Searchable issues properties include status, assignment, aggregate counts, and age. You can search by issue properties in the **Issues** page and in **Dashboards** in the widget builder, depending on your dataset selection.
7+
[Issues](/product/issues/) are an aggregate of one or more error events. Searchable issues properties include status, assignment, aggregate counts, and age. If you have set up [evaluation tracking for feature flags](/product/issues/issue-details/feature-flags/#evaluation-tracking), you can search for issues that have error events where the feature flag evaluated value is `true` or `false`. You can search by issue properties in the **Issues** page and in **Dashboards** in the widget builder, depending on your dataset selection.
88

99
## Searchable Properties
1010

@@ -178,6 +178,12 @@ Returns issues with a matching first time seen. Syntax is the same as `age`.
178178

179179
- **Type:** datetime
180180

181+
### `flags`
182+
183+
For [feature flag evaluations](/product/issues/issue-details/feature-flags/#evaluation-tracking) set to `true` or `false`, the name of the feature flag.
184+
185+
- **Type:** boolean
186+
181187
### `geo.city`
182188

183189
Full name of the city

docs/organization/integrations/feature-flag/generic/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Generic
3-
sidebar_order: 3
3+
sidebar_order: 1
44
description: Learn about Sentry's generic feature-flag integrations.
55
---
66

@@ -24,7 +24,7 @@ For the generic case, you need to write a webhook that conforms to our API. You
2424

2525
### Set Up Change Tracking
2626

27-
Enabling Change Tracking is a four step process. To get started visit the [feature-flags settings page](https://sentry.io/orgredirect/organizations/:orgslug/settings/feature-flags) in a new tab. Then follow the steps listed below.
27+
Enabling Change Tracking is a four step process. To get started, visit the [feature flags settings page](https://sentry.io/orgredirect/organizations/:orgslug/settings/feature-flags) in a new tab. Then follow the steps listed below.
2828

2929
1. **Click the "Add New Provider" button.**
3030
- One webhook secret can be registered per provider type.

docs/organization/integrations/feature-flag/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ sidebar_order: 90
44
description: "Learn more about Sentry's feature flag integrations."
55
---
66

7-
- [LaunchDarkly](/organization/integrations/feature-flag/launchdarkly/)
87
- [Generic](/organization/integrations/feature-flag/generic/)
8+
- [LaunchDarkly](/organization/integrations/feature-flag/launchdarkly/)
9+
- [Statsig](/organization/integrations/feature-flag/statsig/)
910
- [Split](/organization/integrations/feature-flag/split/)
1011
- [Unleash](/organization/integrations/feature-flag/unleash/)

0 commit comments

Comments
 (0)