Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ targets:
- name: npm
id: '@sentry/react-router'
includeNames: /^sentry-react-router-\d.*\.tgz$/
- name: npm
id: '@sentry/nitro'
includeNames: /^sentry-nitro-\d.*\.tgz$/

## 7. Other Packages
## 7.1
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ body:
- '@sentry/google-cloud-serverless'
- '@sentry/nestjs'
- '@sentry/nextjs'
- '@sentry/nitro'
- '@sentry/nuxt'
- '@sentry/react'
- '@sentry/react-router'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ jobs:
- test-application: 'nestjs-11'
build-command: 'test:build-latest'
label: 'nestjs-11 (latest)'
- test-application: 'nitro-3'
build-command: 'test:build-canary'
label: 'nitro-3 (canary)'

steps:
- name: Check out current commit
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/issue-package-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ jobs:
"@sentry.nestjs": {
"label": "Nest.js"
},
"@sentry.nitro": {
"label": "Nitro"
},
"@sentry.nextjs": {
"label": "Next.js"
},
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ package. Please refer to the README and instructions of those SDKs for more deta
- [`@sentry/gatsby`](https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby): SDK for Gatsby
- [`@sentry/nestjs`](https://github.com/getsentry/sentry-javascript/tree/master/packages/nestjs): SDK for NestJS
- [`@sentry/nextjs`](https://github.com/getsentry/sentry-javascript/tree/master/packages/nextjs): SDK for Next.js
- [`@sentry/nitro`](https://github.com/getsentry/sentry-javascript/tree/master/packages/nitro): SDK for Nitro
- [`@sentry/remix`](https://github.com/getsentry/sentry-javascript/tree/master/packages/remix): SDK for Remix
- [`@sentry/tanstackstart-react`](https://github.com/getsentry/sentry-javascript/tree/master/packages/tanstackstart-react): SDK for TanStack Start React
- [`@sentry/aws-serverless`](https://github.com/getsentry/sentry-javascript/tree/master/packages/aws-serverless): SDK
Expand Down
30 changes: 27 additions & 3 deletions packages/nitro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,37 @@ export default defineConfig({

### 3. Sentry Config Setup

TODO: UPDATE THIS
Create an `instrument.mjs` file in your project root to initialize the Sentry SDK:

```javascript
import * as Sentry from '@sentry/nitro';

Sentry.init({
dsn: '__YOUR_DSN__',
tracesSampleRate: 1.0,
});
```

Then use `NODE_OPTIONS` to load the instrumentation before your app code:

```bash
NODE_OPTIONS='--import ./instrument.mjs' npx nitro dev
```

This works with any Nitro command (`nitro dev`, `nitro preview`, or a production start script).

## Uploading Source Maps

To upload source maps...
The `withSentryConfig` function automatically configures source map uploading when the `authToken`, `org`, and `project`
options are provided:

<!-- TODO: -->
```javascript
export default withSentryConfig(config, {
org: 'your-sentry-org',
project: 'your-sentry-project',
authToken: process.env.SENTRY_AUTH_TOKEN,
});
```

## Troubleshoot

Expand Down
Loading