Skip to content

Commit

Permalink
fix: changed some code to make sentry.mdx more readable (#8607)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsparkdev committed Jun 20, 2024
1 parent 26f8eac commit 6125b43
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions src/content/docs/en/guides/backend/sentry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
Expand All @@ -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,
},
}),
],
Expand Down

0 comments on commit 6125b43

Please sign in to comment.