Skip to content

Commit 5ca9e93

Browse files
authored
Merge branch 'getsentry:master' into unreal-engine
2 parents c647b67 + 7db6d32 commit 5ca9e93

File tree

25 files changed

+699
-533
lines changed

25 files changed

+699
-533
lines changed

apps/changelog/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@radix-ui/react-icons": "^1.3.0",
2222
"@radix-ui/react-toolbar": "^1.0.4",
2323
"@radix-ui/themes": "^2.0.3",
24-
"@sentry/nextjs": "8.34.0",
24+
"@sentry/nextjs": "8.36.0-beta.0",
2525
"@spotlightjs/spotlight": "^2.1.1",
2626
"next": "15.0.0-rc.1",
2727
"next-auth": "^4.24.5",
@@ -63,4 +63,4 @@
6363
"@types/react": "npm:[email protected]",
6464
"@types/react-dom": "npm:[email protected]"
6565
}
66-
}
66+
}

docs/platforms/android/session-replay/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ options.experimental.sessionReplay.maskAllImages = false
115115

116116
## Error Linking
117117

118-
Errors that happen on the page while a replay is running will be linked to the replay, making it possible to jump between related issues and replays. However, it's **possible** that in some cases the error count reported on the **Replays Details** page won't match the actual errors that have been captured. That's because errors can be lost, and while this is uncommon, there are a few reasons why it could happen:
118+
Errors that happen while a replay is running will be linked to the replay, making it possible to jump between related issues and replays. However, it's **possible** that in some cases the error count reported on the **Replays Details** page won't match the actual errors that have been captured. That's because errors can be lost, and while this is uncommon, there are a few reasons why it could happen:
119119

120120
- The replay was rate-limited and couldn't be accepted.
121121
- The replay was deleted by a member of your org.

docs/platforms/apple/guides/ios/session-replay/index.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ options.experimental.sessionReplay.redactAllImages = false
9292

9393
## Error Linking
9494

95-
Errors that happen on the page while a replay is running will be linked to the replay, making it possible to jump between related issues and replays. However, it's **possible** that in some cases the error count reported on the **Replays Details** page won't match the actual errors that have been captured. That's because errors can be lost, and while this is uncommon, there are a few reasons why it could happen:
95+
Errors that happen while a replay is running will be linked to the replay, making it possible to jump between related issues and replays. However, it's **possible** that in some cases the error count reported on the **Replays Details** page won't match the actual errors that have been captured. That's because errors can be lost, and while this is uncommon, there are a few reasons why it could happen:
9696

9797
- The replay was rate-limited and couldn't be accepted.
9898
- The replay was deleted by a member of your org.
@@ -101,7 +101,13 @@ Errors that happen on the page while a replay is running will be linked to the r
101101
### FAQ
102102

103103
Q: Does Session Replay work with SwiftUI?
104+
104105
A: Yes. It works with both UIKit and SwiftUI.
105106

107+
Q: Why are parts of my replay not masked?
108+
109+
A: Text views, input views, images, video players and webviews are all masked by default. Images with bundled assets aren't masked because the likelihood of these assets containing PII is low. If you encounter a view that should be masked by default, consider opening a [GitHub issue](https://github.com/getsentry/sentry-cocoa/issues).
110+
106111
Q: What's the lowest version of iOS supported?
107-
A: Session Replay recording happens even on the lowest version supported by the Sentry SDK. (Today that's iOS 12.)
112+
113+
A: Session Replay recording happens even on the lowest version supported by the Sentry SDK, which is aligend with appstore support.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
title: Set Up Session Replay
3+
sidebar_order: 5500
4+
notSupported:
5+
description: "Learn how to enable the Mobile Session Replay Beta in your app."
6+
---
7+
8+
<Note>
9+
10+
Mobile support for Session Replay is in Beta. Features available in Beta are still work-in-progress and may have bugs. We recognize the irony.
11+
12+
If you have any questions, feedback or would like to report a bug, please open a [GitHub issue](https://github.com/getsentry/sentry-dart/issues/new?template=BUG_REPORT.yml) with a link to a relevant replay in Sentry if possible.
13+
14+
</Note>
15+
16+
[Session Replay](/product/explore/session-replay/) helps you get to the root cause of an error or latency issue faster by providing you with a reproduction of what was happening in the user's device before, during, and after the issue. You can rewind and replay your application's state and see key user interactions, like taps, swipes, network requests, and console entries, in a single UI.
17+
18+
By default, our Session Replay SDK masks all text content, images, and user input, giving you heightened confidence that no sensitive data will leave the device. To learn more, see [product docs](/product/explore/session-replay/).
19+
20+
## Pre-requisites
21+
22+
Make sure your Sentry Flutter SDK version is at least 8.9.0, which is required for Session Replay.
23+
You can update your `pubspec.yaml` to the matching version:
24+
25+
```yaml
26+
dependencies:
27+
sentry_flutter: ^8.9.0
28+
```
29+
30+
## Setup
31+
32+
To set up the integration, add the following to your Sentry initialization:
33+
34+
```dart
35+
await SentryFlutter.init(
36+
(options) {
37+
...
38+
options.experimental.replay.sessionSampleRate = 1.0;
39+
options.experimental.replay.onErrorSampleRate = 1.0;
40+
},
41+
appRunner: () => runApp(MyApp()),
42+
);
43+
```
44+
45+
## Verify
46+
47+
While you're testing, we recommend that you set <PlatformIdentifier name="replays-session-sample-rate" /> to `1.0`. This ensures that every user session will be sent to Sentry.
48+
49+
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping <PlatformIdentifier name="replays-on-error-sample-rate" /> set to `1.0`.
50+
51+
## Sampling
52+
53+
Sampling allows you to control how much of your website's traffic will result in a Session Replay. There are two sample rates you can adjust to get the replays relevant to you:
54+
55+
1. <PlatformIdentifier name="replays-session-sample-rate" /> - The sample rate for
56+
replays that begin recording immediately and last the entirety of a user's session.
57+
2. <PlatformIdentifier name="replays-on-error-sample-rate" /> - The sample rate for
58+
replays that are recorded when an error happens. This type of replay will record
59+
up to a minute of events prior to the error and continue recording until the session
60+
ends.
61+
62+
Sampling starts as soon as a session begins. The <PlatformIdentifier name="replays-session-sample-rate" /> is then evaluated. If the session is sampled, replay recording will start immediately. If not, <PlatformIdentifier name="replays-on-error-sample-rate" /> will be evaluated. If the session is sampled at this point, the replay will be buffered and will only be uploaded to Sentry if an error occurs.
63+
64+
## Privacy
65+
66+
The SDK is recording and aggressively redacting (masking) all text and images, according to the configuration in `options.experimental.replay`.
67+
You can tune this and add custom masking rules to fit your needs. For example, you can explicitly mask or unmask widgets by type,
68+
or you can even have a callback to decide whether a specific widget instance should be masked:
69+
70+
```dart
71+
options.experimental.replay.mask<IconButton>();
72+
options.experimental.replay.unmask<Image>();
73+
options.experimental.replay.maskCallback<Text>(
74+
(Element element, Text widget) =>
75+
(widget.data?.contains('secret') ?? false)
76+
? SentryMaskingDecision.mask
77+
: SentryMaskingDecision.continueProcessing);
78+
```
79+
80+
You can find more details in the documentation for each method.
81+
82+
<Note>
83+
84+
If you find that data isn't being redacted with the default settings, please let us know by creating a [GitHub issue](https://github.com/getsentry/sentry-dart/issues/new?template=BUG_REPORT.yml).
85+
86+
</Note>
87+
88+
To disable redaction altogether (not to be used on applications with sensitive data):
89+
90+
```dart
91+
options.experimental.replay.maskAllText = false;
92+
options.experimental.replay.maskAllImages = false;
93+
```
94+
95+
## Error Linking
96+
97+
Errors that happen while a replay is running will be linked to the replay, making it possible to jump between related issues and replays. However, it's **possible** that in some cases the error count reported on the **Replays Details** page won't match the actual errors that have been captured. That's because errors can be lost, and while this is uncommon, there are a few reasons why it could happen:
98+
99+
- The replay was rate-limited and couldn't be accepted.
100+
- The replay was deleted by a member of your org.
101+
- There were network errors and the replay wasn't saved.

docs/platforms/javascript/common/install/npm.mdx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,24 @@ notSupported:
3535
- javascript.cloudflare
3636
---
3737

38-
<PlatformContent includePath="getting-started-install" />
38+
The npm package for Sentry offers several advantages for specific use cases:
39+
40+
- **Framework-specific features**: If you're using a framework like React or Vue, installing the corresponding Sentry SDK (e.g., `@sentry/react` or `@sentry/vue`) via npm provides framework-specific features and optimizations.
41+
42+
- **Full public API access**: The npm package exposes the complete set of Sentry's public APIs, allowing for more extensive customization and functionality.
43+
44+
- **Version control**: Installing via npm gives you full control over the SDK version, enabling you to manage updates and ensure compatibility with your project.
45+
46+
- **Build process integration**: Using the npm package allows for better integration with your build process and bundling tools.
47+
48+
```bash {tabTitle:npm}
49+
npm install @sentry/browser --save
50+
```
51+
52+
```bash {tabTitle:yarn}
53+
yarn add @sentry/browser
54+
```
55+
56+
```bash {tabTitle:pnpm}
57+
pnpm add @sentry/browser
58+
```

docs/platforms/javascript/common/troubleshooting/supported-browsers.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ notSupported:
1616
- javascript.nestjs
1717
---
1818

19-
Sentry's JavaScript SDKs support ES2018 compatible browsers. The minimum supported browser versions are:
19+
Sentry's JavaScript SDKs require ES2018 compatibility plus support for [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis). The minimum supported browser versions are:
2020

21-
- Chrome 63
21+
- Chrome 71
2222
- Edge 79
23-
- Safari/iOS Safari 12
24-
- Firefox 58
25-
- Opera 50
26-
- Samsung Internet 8.2
23+
- Safari 12.1, iOS Safari 12.2
24+
- Firefox 65
25+
- Opera 58
26+
- Samsung Internet 10
2727

2828
In addition, the Sentry JavaScript SDKs require the `fetch` API to be available. If you need to support browser-like environments that do not have `fetch` available, you should include a polyfill for the fetch API.
2929

docs/platforms/javascript/common/user-feedback/configuration/index.mdx

Lines changed: 5 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -30,45 +30,7 @@ The following options can be configured for the integration in `feedbackIntegrat
3030

3131
If you have `autoInject: true` a button will be inserted into the page that triggers the form to pop up so the user can enter their feedback. If instead you want to control when this injection happens, call the `feedback.createWidget()` method to get a reference to an `Actor` object, and then call `appendToDom()` to insert it into the page.
3232

33-
```javascript
34-
const feedback = feedbackIntegration({
35-
// Disable injecting the default widget
36-
autoInject: false,
37-
});
38-
39-
// Create and render the button
40-
const widget = feedback.createWidget();
41-
42-
// Later, when it's time to clean up:
43-
widget.removeFromDom();
44-
```
45-
```typescript {tabTitle: NextJS}
46-
function ToggleFeedbackButton() {
47-
const [feedback, setFeedback] = useState();
48-
// Read `getFeedback` on the client only, to avoid hydration errors when server rendering
49-
useEffect(() => {
50-
setFeedback(Sentry.getFeedback());
51-
}, []);
52-
53-
const [widget, setWidget] = useState();
54-
return (
55-
<button
56-
type="button"
57-
onClick={async () => {
58-
if (widget) {
59-
widget.removeFromDom();
60-
setWidget(null);
61-
} else {
62-
setWidget(feedback.createWidget());
63-
}
64-
}}
65-
>
66-
{widget ? "Remove Widget" : "Create Widget"}
67-
</button>
68-
);
69-
}
70-
```
71-
33+
<PlatformContent includePath="user-feedback/manual-injection" />
7234

7335
Read more about how to [use your own UI](#bring-your-own-button) below.
7436

@@ -257,7 +219,7 @@ You can use your own button instead of the default injected button to trigger th
257219

258220
```javascript
259221
const feedback = feedbackIntegration({
260-
// Disable injecting the default widget
222+
// Disable the injection of the default widget
261223
autoInject: false,
262224
});
263225

@@ -268,7 +230,7 @@ feedback.attachTo(document.querySelector("#your-button"), {
268230
```typescript {tabTitle: NextJs}
269231
function AttachToFeedbackButton() {
270232
const [feedback, setFeedback] = useState();
271-
// Read `getFeedback` on the client only, to avoid hydration errors when server rendering
233+
// Read `getFeedback` on the client only, to avoid hydration errors during server rendering
272234
useEffect(() => {
273235
setFeedback(Sentry.getFeedback());
274236
}, []);
@@ -294,7 +256,7 @@ Alternatively, you can call `feedback.createForm()` and have full control over w
294256

295257
```javascript
296258
const feedback = feedbackIntegration({
297-
// Disable injecting the default widget
259+
// Disable the injection of the default widget
298260
autoInject: false,
299261
});
300262

@@ -305,7 +267,7 @@ form.open();
305267
```typescript {tabTitle: NextJS}
306268
function CreateFeedbackFromButton() {
307269
const [feedback, setFeedback] = useState();
308-
// Read `getFeedback` on the client only, to avoid hydration errors when server rendering
270+
// Read `getFeedback` on the client only, to avoid hydration errors during server rendering
309271
useEffect(() => {
310272
setFeedback(Sentry.getFeedback());
311273
}, []);

docs/platforms/javascript/common/user-feedback/v7/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ You can use your own button instead of the default injected button to trigger th
169169

170170
```javascript
171171
const feedback = feedbackIntegration({
172-
// Disable injecting the default widget
172+
// Disable the injection of the default widget
173173
autoInject: false,
174174
});
175175

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
title: Pinia
3+
description: "Learn about enabling Sentry's Pinia plugin in Nuxt."
4+
---
5+
6+
To capture [Pinia](https://pinia.vuejs.org/) state data, add `trackPinia` to your client-side Sentry configuration:
7+
8+
```javascript {3} {filename:sentry.client.config.ts}
9+
Sentry.init({
10+
dsn: "___PUBLIC_DSN___",
11+
trackPinia: true // `true` will apply default options
12+
});
13+
```
14+
15+
## Normalization Depth
16+
17+
By default, Sentry SDKs normalize any context to a depth of 3. You may want to increase this for sending Pinia states by passing `normalizeDepth` to the `Sentry.init` call:
18+
19+
```javascript {4} {filename:sentry.client.config.ts}
20+
Sentry.init({
21+
dsn: "___PUBLIC_DSN___",
22+
trackPinia: true,
23+
normalizeDepth: 10, // Or however deep you want your state context to be.
24+
});
25+
```
26+
27+
## Options
28+
29+
When enabling `trackPinia` with `true`, all default options are automatically applied. To configure the Pinia plugin manually, pass an options object to `trackPinia`.
30+
31+
<Alert level="warning" title="Note">
32+
33+
While we try our best to filter out Personally Identifiable Information (PII) such as user passwords, we advise against sending sensitive information to Sentry.
34+
35+
</Alert>
36+
37+
38+
### `attachPiniaState` (Boolean)
39+
40+
This is used to attach Pinia state to Sentry events. By default, this is set to `true`. If you don't want to attach Pinia state to events being sent to Sentry, set this to `false`:
41+
42+
```javascript {2} {filename:sentry.client.config.ts}
43+
trackPinia: {
44+
attachPiniaState: false
45+
}
46+
```
47+
48+
### `addBreadcrumbs` (Boolean)
49+
50+
This is used to add breadcrumbs to Sentry events. By default, this is set to `true`. If you don't want to add breadcrumbs to events being sent to Sentry, set this to `false`:
51+
52+
```javascript {2} {filename:sentry.client.config.ts}
53+
trackPinia: {
54+
addBreadcrumbs: false
55+
}
56+
```
57+
58+
### `actionTransformer` (Function)
59+
60+
This can be used to remove sensitive information from Pinia actions. The first parameter passed to the function is the Pinia action name. We send all actions by default, if you don't want an action name sent to Sentry, use `return null`:
61+
62+
```javascript {2-9} {filename:sentry.client.config.ts}
63+
trackPinia: {
64+
actionTransformer: (action) => {
65+
if (action === "GOVERNMENT_SECRETS") {
66+
// Return null to not log the action to Sentry
67+
return null;
68+
}
69+
70+
return action;
71+
},
72+
}
73+
```
74+
75+
### `stateTransformer` (Function)
76+
77+
This is used to remove sensitive information from a Pinia state. The first parameter passed to the function is the Pinia state. We attach all state changes by default. If you don't want to attach state changes to events being sent to Sentry, use `return null`. Note, that if you choose not to send state to Sentry, your errors might not have the latest version attached:
78+
79+
```javascript {2-23} {filename:sentry.client.config.ts}
80+
trackPinia: {
81+
stateTransformer: (state) => {
82+
if (state.topSecret.doNotSend) {
83+
// Return null to not send this version of the state.
84+
return null;
85+
}
86+
87+
// Transform the state to remove sensitive information
88+
const transformedState = {
89+
...state,
90+
topSecret: {
91+
...state.topSecret,
92+
// Replace sensitive information with something else
93+
nuclearLaunchCodes: "I love pizza",
94+
// or just remove it entirely
95+
hiddenTreasureLocation: null,
96+
},
97+
// You should also remove large data that is irrelevant to debugging to not clutter your Sentry issues
98+
giganticState: null,
99+
};
100+
101+
return transformedState;
102+
},
103+
}
104+
```

0 commit comments

Comments
 (0)