Skip to content

Commit

Permalink
Highlight replay snippets (#9454)
Browse files Browse the repository at this point in the history
* feat: highlight Network Details on js replay setup snippet

* feat: highlight replayCanvasIntegration()

* feat: hightlight `replaysSessionSampleRate` and `integrations` in
session replay setup snippets

* hightlight `replaysOnErrorSampleRate`
  • Loading branch information
a-hariti committed Mar 15, 2024
1 parent 35148d6 commit b0c5b19
Show file tree
Hide file tree
Showing 25 changed files with 26 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Requests to a URL matched by the configured patterns will be enhanced with the r

If you want to capture additional headers, you'll have to configure them with the options `networkRequestHeaders` and `networkResponseHeaders`, for example:

```javascript
```javascript {7-8}
replayIntegration({
networkDetailAllowUrls: [
window.location.origin,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {13}
import * as Sentry from "@sentry/angular-ivy";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {13}
import * as Sentry from "@sentry/astro";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {13}
import * as Sentry from "@sentry/ember";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {13}
import * as Sentry from "@sentry/gatsby";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {14}
// import Sentry from your framework SDK (e.g. @sentry/react) instead of @sentry/browser
import * as Sentry from "@sentry/browser";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {13}
import * as Sentry from "@sentry/nextjs";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {13}
import * as Sentry from "@sentry/react";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {13}
import * as Sentry from "@sentry/remix";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {13}
import * as Sentry from "@sentry/svelte";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {13}
import * as Sentry from "@sentry/sveltekit";

Sentry.init({
Expand Down Expand Up @@ -31,4 +31,3 @@ Sentry.init({
crossorigin="anonymous"
></script>
```

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {13}
import * as Sentry from "@sentry/vue";

Sentry.init({
Expand All @@ -15,4 +15,3 @@ Sentry.init({
],
});
```

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {8,12,14-20}
import * as Sentry from "@sentry/angular-ivy";

Sentry.init({
Expand Down
4 changes: 2 additions & 2 deletions platform-includes/session-replay/setup/javascript.astro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Session replay is enabled by default if you use the SDK configuration in your `a

You can customize Replay sample rates like so:

```javascript {filename:astro.config.mjs}
```javascript {filename:astro.config.mjs} {8-9}
import { defineConfig } from "astro/config";
import sentry from "@sentry/astro";

Expand All @@ -19,7 +19,7 @@ export default defineConfig({

If you have a <PlatformLink to="/manual-setup/#manual-sdk-initialization">custom SDK configuration file</PlatformLink> for the client side (`sentry.client.config.js`), add the Sentry `Replay` integration:

```javascript {filename:sentry.client.config.js}
```javascript {filename:sentry.client.config.js} {5-7}
import * as sentry from "@sentry/astro";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Several options are supported and passable using the integration constructor. Se

<SignInNote />

```javascript
```javascript {9,13,15-21}
import * as Sentry from "@sentry/capacitor";
import { Replay } from "@sentry/replay";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {8,12,14-20}
import * as Sentry from "@sentry/electron/renderer";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {8,12,14-20}
import * as Sentry from "@sentry/ember";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {8,12,14-20}
import * as Sentry from "@sentry/gatsby";

Sentry.init({
Expand Down
2 changes: 1 addition & 1 deletion platform-includes/session-replay/setup/javascript.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {9,13,15-21}
// import Sentry from your framework SDK (e.g. @sentry/react) instead of @sentry/browser
import * as Sentry from "@sentry/browser";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
On your client-side NextJS app, add:

```javascript
```javascript {8,12,14-20}
import * as Sentry from "@sentry/nextjs";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {8,12,14-20}
import * as Sentry from "@sentry/react";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
On your client-side Remix app, add:

```javascript
```javascript {8,12,14-20}
import * as Sentry from "@sentry/remix";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {8,12,14-20}
import * as Sentry from "@sentry/svelte";

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
On your client-side SvelteKit app, add:

```javascript
```javascript {8,12,14-20}
import * as Sentry from "@sentry/sveltekit";

Sentry.init({
Expand Down
2 changes: 1 addition & 1 deletion platform-includes/session-replay/setup/javascript.vue.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```javascript
```javascript {8,12,14-20}
import * as Sentry from "@sentry/vue";

Sentry.init({
Expand Down

0 comments on commit b0c5b19

Please sign in to comment.