-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: changed some code to make
sentry.mdx
more readable (#8607)
- Loading branch information
Showing
1 changed file
with
22 additions
and
6 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -8,6 +8,7 @@ i18nReady: true | |
--- | ||
import ReadMore from '~/components/ReadMore.astro'; | ||
import { Steps } from '@astrojs/starlight/components'; | ||
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro' | ||
|
||
[Sentry](https://sentry.io) offers a comprehensive application monitoring and error tracking service designed to help developers identify, diagnose, and resolve issues in real-time. | ||
|
||
|
@@ -25,9 +26,24 @@ Sentry captures data by using an SDK within your application’s runtime. | |
|
||
Install the SDK by running the following command for the package manager of your choice in the Astro CLI: | ||
|
||
```bash | ||
npx astro add @sentry/astro | ||
``` | ||
<PackageManagerTabs> | ||
<Fragment slot="npm"> | ||
```shell | ||
npx astro add @sentry/astro | ||
``` | ||
</Fragment> | ||
<Fragment slot="pnpm"> | ||
```shell | ||
pnpm astro add @sentry/astro | ||
``` | ||
</Fragment> | ||
<Fragment slot="yarn"> | ||
```shell | ||
yarn astro add @sentry/astro | ||
``` | ||
</Fragment> | ||
</PackageManagerTabs> | ||
|
||
The astro CLI installs the SDK package and adds the Sentry integration to your `astro.config.mjs` file. | ||
|
||
## Configure | ||
|
@@ -43,16 +59,16 @@ If you are creating a new Sentry project, select Astro as your platform to get a | |
::: | ||
|
||
```js title="astro.config.mjs" ins={2, 6-12} | ||
import {defineConfig} from 'astro/config'; | ||
import { defineConfig } from 'astro/config'; | ||
import sentry from '@sentry/astro'; | ||
|
||
export default defineConfig({ | ||
integrations: [ | ||
sentry({ | ||
dsn: 'https://[email protected]/0', | ||
sourceMapsUploadOptions: { | ||
project: 'example-project', | ||
authToken: process.env.SENTRY_AUTH_TOKEN, | ||
project: 'example-project', | ||
authToken: process.env.SENTRY_AUTH_TOKEN, | ||
}, | ||
}), | ||
], | ||
|