Skip to content

Commit

Permalink
ref(replay): add onboarding docs for astro and fix capacitor doc (#8649)
Browse files Browse the repository at this point in the history
* ref(replay): add onboarding doc for astro and fix capacitor doc

* remove import
  • Loading branch information
michellewzhang authored Dec 6, 2023
1 parent 1cc7133 commit f001197
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 2 deletions.
14 changes: 14 additions & 0 deletions src/wizard/javascript/replay-onboarding/astro/1.install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Astro
doc_link: https://docs.sentry.io/platforms/javascript/guides/astro/session-replay/
support_level: production
type: language
---

#### Install

The Replay integration is already included with the Sentry Astro SDK.

```bash
npx astro add @sentry/astro
```
27 changes: 27 additions & 0 deletions src/wizard/javascript/replay-onboarding/astro/2.configure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Astro
doc_link: https://docs.sentry.io/platforms/javascript/guides/astro/session-replay/
support_level: production
type: language
---

#### Configure

There are several privacy and sampling options available, all of which can be set using the `integrations` constructor. Learn more about configuring Session Replay by reading the [configuration docs](https://docs.sentry.io/platforms/javascript/session-replay/). Add the following to your SDK config:

```javascript
import * as Sentry from "@sentry/astro";

Sentry.init({
dsn: "___PUBLIC_DSN___",

// This sets the sample rate at 10%. You may want this to be 100% while
// in development, then sample at a lower rate in production.
replaysSessionSampleRate: 0.1,
// If the entire session is not sampled, use the below sample rate to sample
// sessions when an error occurs.
replaysOnErrorSampleRate: 1.0,

integrations: [new Sentry.Replay()],
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ type: language

```bash
# Using yarn
yarn add @sentry/capacitor @sentry/replay
yarn add @sentry/capacitor

# Using npm
npm install --save @sentry/capacitor @sentry/replay
npm install --save @sentry/capacitor
```

1 comment on commit f001197

@vercel
Copy link

@vercel vercel bot commented on f001197 Dec 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sentry-docs – ./

docs.sentry.io
sentry-docs-git-master.sentry.dev
sentry-docs.sentry.dev

Please sign in to comment.