Skip to content

Commit 5bccb63

Browse files
committed
Merge branch 'master' of github.com:getsentry/sentry-docs into smi/sveltekit/clean-up-manual-qs-instrumentation
2 parents cbaa988 + 984e7bd commit 5bccb63

File tree

138 files changed

+1796
-666
lines changed

Some content is hidden

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

138 files changed

+1796
-666
lines changed

develop-docs/backend/application-domains/database-migrations/index.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ There are some things we need to be careful about when running migrations.
7676

7777
### Testing
7878

79-
Database migrations are risky operations that can lead to irreversible data loss or corruption. This is especially true for [data migrations](https://docs.djangoproject.com/en/4.0/topics/migrations/#data-migrations).
80-
For this reason, every migration should have a corresponding integration test.
79+
Note: Regular migrations that modify table structure don't need migration tests
80+
81+
[Data migrations](https://docs.djangoproject.com/en/4.0/topics/migrations/#data-migrations) are particularly risky, since they operate on data and can lead to irreversible data loss or corruption. For this reason, every data migration should have a corresponding integration test.
8182

8283
To test your migration, derive a test case from `TestMigrations` and add it to `tests/sentry/migrations`.
8384
For example:

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,13 @@ This functionality should be gated behind the `includeLocalVariables` option, wh
118118

119119
## Feature Flags
120120

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.
121+
An SDK may optionally track feature flag evaluations. Feature flags can be attached to error events or to span events.
122122

123-
If an SDK supports feature flags it must expose a function `addFeatureFlag` which has similar 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 (similar to the breadcrumb implementation). 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.
123+
When tracking feature flag evaluations on spans, we track the first 10 feature flags evaluated within the span's scope. Evaluations are span attributes and follow the existing span attribute schema.
124124

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.
125+
When tracking on error feature flag evaluations, we record the 100 most recent, unique feature flag evaluations. Evaluations are stored on the scope. When the scope forks a copy of the collected feature flag evaluations are given to the child scope. Mutations to the child's copy of the feature flags object should not be propagated to the parent. Flag evaluations within a scope are considered local to the scope and do not propagate. Evaluations should be submitted to Sentry following the schema specified in the <Link to="/sdk/data-model/event-payloads/contexts/#feature-flag-context">Feature Flag Context</Link> protocol documentation.
126+
127+
If an SDK supports feature flags it must expose a function `add_feature_flag` which has similar 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.
126128

127129
### Integrations
128130

develop-docs/sdk/telemetry/logs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ It consists of the following fields:
8989

9090
: **Object, optional**. A dictionary of key-value pairs of arbitrary data attached to the log. Attributes must also declare the type of the value. The following types are supported: `string`, `boolean`, `integer`, `double`. In the future arrays will be supported (`string[]`, `boolean[]`, `integer[]`, `double[]`).
9191

92-
Integers should be a 64-bit signed integer, while doubles should be a 64-bit floating point number. In the future we will support 64-bit unsigned integers.
92+
Integers should be a 64-bit signed integer, while doubles should be a 64-bit floating point number. For 64-bit unsigned integers, use the `string` type to avoid overflow issues. In the future we will support 64-bit unsigned integers.
9393

9494
Example:
9595

docs/concepts/key-terms/dsn-explainer.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If an SDK is not initialized or if it is initialized with an empty DSN, the SDK
1818

1919
DSNs are safe to keep public because they only allow submission of new events and related event data; they do not allow read access to any information.
2020

21-
While there is a risk of abusing a DSN, where any user can send events to your organization with any information they want, this is a rare occurrence. Sentry provides controls to [block IPs](/platform-redirect/?next=/configuration/options/) and similar concerns. You can also rotate (and revoke) DSNs by navigating to **[Project] > Settings > Client Keys (DSN)**.
21+
While there is a risk of abusing a DSN, where any user can send events to your organization with any information they want, this is a rare occurrence. Sentry provides controls to [block IPs](/platform-redirect/?next=/configuration/options/) and similar concerns. You can also rotate (and revoke) DSNs by navigating to **[Project] > Settings > SDK Setup > Client Keys (DSN)**.
2222

2323
If your application is shipped to client devices, if possible, we recommend having a way to configure the DSN dynamically. In an ideal scenario, you can "ship" a new DSN to your application without the customer downloading the latest version. We recognize that this may not always be practical, but we cannot offer further advice as this scenario is implementation specific.
2424

@@ -28,7 +28,7 @@ If you're in the process of setting up a project, you can find your DSN in the i
2828

2929
![DSN in code snippet](./img/create-new-project-04.png)
3030

31-
You can also find the DSN in your project settings by navigating to **[Project] > Settings > Client Keys (DSN)** in [sentry.io](https://sentry.io/).
31+
You can also find the DSN in your project settings by navigating to **[Project] > Settings > SDK Setup > Client Keys (DSN)** in [sentry.io](https://sentry.io/).
3232

3333
### The Parts of the Data Source Name (DSN)
3434

docs/organization/getting-started/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Automatic issue management is available only if your organization is on a Busine
8989

9090
## 4. Create Projects
9191

92-
To start monitoring errors in your app with Sentry, you'll need to initialize the SDK with a DSN key. To obtain a key, add a new Sentry project by going to **Projects** and clicking "Create Project". Give the project a name and assign the responsible [team (or teams)](#2-set-up-teams). Then, retrieve the key in **[Project] > Settings > Client Keys (DSN)**.
92+
To start monitoring errors in your app with Sentry, you'll need to initialize the SDK with a DSN key. To obtain a key, add a new Sentry project by going to **Projects** and clicking "Create Project". Give the project a name and assign the responsible [team (or teams)](#2-set-up-teams). Then, retrieve the key in **[Project] > Settings > SDK Setup > Client Keys (DSN)**.
9393

9494
![Retrieve your project DSN key.](./img/project-dsn.png)
9595

docs/platforms/android/index.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ Select which Sentry features you'd like to install in addition to Error Monitori
3131
'error-monitoring',
3232
'performance',
3333
'profiling',
34-
'session-replay'
34+
'session-replay',
35+
'logs'
3536
]}
3637
/>
3738

@@ -128,6 +129,10 @@ Configuration is done via the application `AndroidManifest.xml`. Here's an examp
128129
<!-- Enable profiling on app start -->
129130
<meta-data android:name="io.sentry.traces.profiling.start-on-app-start" android:value="true" />
130131
<!-- ___PRODUCT_OPTION_END___ profiling -->
132+
<!-- ___PRODUCT_OPTION_START___ logs -->
133+
<!-- Enable logs to be sent to Sentry -->
134+
<meta-data android:name="io.sentry.logs.enabled" android:value="true" />
135+
<!-- ___PRODUCT_OPTION_END___ logs -->
131136
<!-- ___PRODUCT_OPTION_START___ session-replay -->
132137
<!-- Record session replays for 100% of errors and 10% of sessions -->
133138
<meta-data android:name="io.sentry.session-replay.on-error-sample-rate" android:value="1.0" />
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Set Up Feature Flags
3+
sidebar_order: 7000
4+
description: With Feature Flags, Sentry tracks feature flag evaluations in your application, keeps an audit log of feature flag changes, and reports any suspicious updates that may have caused an error.
5+
---
6+
7+
<PlatformContent includePath="feature-flags/prerelease-alert" />
8+
9+
## Prerequisites
10+
11+
- [Sentry SDK](/platforms/dart/#configure) version `9.0.0`.
12+
13+
## Enable Evaluation Tracking
14+
15+
If you use a third-party SDK to evaluate feature flags, you can enable Sentry to track those evaluations. Integrations are provider specific, and documentation for supported SDKs is listed below:
16+
17+
- [Firebase Remote Config](/platforms/dart/configuration/integrations/firebase-remote-config/)
18+
19+
### Manual Usage
20+
21+
Call `Sentry.addFeatureFlag` to track feature flag evaluations:
22+
23+
```dart
24+
Sentry.addFeatureFlag("feature_flag_a", true);
25+
```
26+
27+
Calling this function multiple times with the same flag name will override the previous value.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Firebase Remote Config
3+
description: "Learn more about the Sentry Firebase Remote Config integration for the Dart SDK."
4+
sidebar_order: 50
5+
redirect_from:
6+
- /platforms/dart/guides/firebase-remote-config/
7+
---
8+
9+
<Include name="dart-integrations/firebase-remote-config.mdx" />

docs/platforms/dart/common/metrics/index.mdx

Lines changed: 0 additions & 107 deletions
This file was deleted.

docs/platforms/dart/common/migration/index.mdx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,53 @@ sidebar_order: 8000
44
description: "Migrate between versions of Sentry's SDK for Dart."
55
---
66

7+
## Migrating from `sentry` `8.x` to `sentry` `9.x`
8+
9+
#### Dart version
10+
11+
The required minimium Dart version is now `3.5.0`.
12+
This change allows us to use safer APIs and better support for features such as WASM compilation.
13+
14+
#### API Removals and Renames
15+
16+
- `LoadImagesListIntegration` has been renamed to `LoadNativeDebugImagesIntegration`.
17+
- The `enableTracing` option has been removed. Use `options.traceSampleRate` or `options.tracesSampler` instead.
18+
- `BeforeSendTransactionCallback` now has a `Hint` parameter.
19+
- Usage of `dart:html` has been removed in favor of `package:web`. The SDK is now packaged with the `package:web` dependency for better interoperability with web APIs.
20+
- The `segment` field from `SentryUser` has been removed.
21+
- The old user feedback API has been removed and replaced by `Sentry.captureFeedback`.
22+
23+
#### Logging
24+
25+
The default log level is now `warning` when `debug = true`.
26+
This can be adjusted by setting `options.diagnosticLevel = SentryLevel.info` in `Sentry.init`.
27+
28+
#### SDK Data Classes
29+
30+
SDK data classes are now mutable which makes it easier to manipulate them.
31+
For backwards-compatibility, `copyWith` and `clone` can still be used but are officially deprecated.
32+
33+
```dart
34+
// old
35+
options.beforeSend = (event, hint) {
36+
event = event.copyWith(release: 'my-release')
37+
return event
38+
}
39+
40+
// new
41+
options.beforeSend = (event, hint) {
42+
event.release = 'my-release'
43+
return event
44+
}
45+
```
46+
47+
#### Response Body Handling
48+
49+
Due to PII concerns, response bodies will no longer be added to Sentry events by the SDK automatically.
50+
Responses are now attached to the `Hint` object, which can be read in `beforeSend`/`beforeSendTransaction` callbacks via `hint.response` so you can manually attach the response to your event.
51+
Response bodies with a size greater than 0.15MB are not added to the hint object.
52+
Currently as of version `9.0.0`, only the `dio` integration is supported.
53+
754
## Migrating From `sentry` `6.18.x` to `sentry` `7.0.0`
855

956
API changes:

0 commit comments

Comments
 (0)