-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref(replay): add onboarding docs for astro and fix capacitor doc (#8649)
* ref(replay): add onboarding doc for astro and fix capacitor doc * remove import
- Loading branch information
1 parent
1cc7133
commit f001197
Showing
3 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
src/wizard/javascript/replay-onboarding/astro/1.install.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
27
src/wizard/javascript/replay-onboarding/astro/2.configure.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()], | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f001197
There was a problem hiding this comment.
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