Skip to content

Commit 3bc0875

Browse files
committed
chore: prepare nitro package for release
1 parent d3e3ae1 commit 3bc0875

File tree

6 files changed

+38
-3
lines changed

6 files changed

+38
-3
lines changed

.craft.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ targets:
129129
- name: npm
130130
id: '@sentry/react-router'
131131
includeNames: /^sentry-react-router-\d.*\.tgz$/
132+
- name: npm
133+
id: '@sentry/nitro'
134+
includeNames: /^sentry-nitro-\d.*\.tgz$/
132135

133136
## 7. Other Packages
134137
## 7.1

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ body:
5050
- '@sentry/google-cloud-serverless'
5151
- '@sentry/nestjs'
5252
- '@sentry/nextjs'
53+
- '@sentry/nitro'
5354
- '@sentry/nuxt'
5455
- '@sentry/react'
5556
- '@sentry/react-router'

.github/workflows/canary.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ jobs:
114114
- test-application: 'nestjs-11'
115115
build-command: 'test:build-latest'
116116
label: 'nestjs-11 (latest)'
117+
- test-application: 'nitro-3'
118+
build-command: 'test:build-canary'
119+
label: 'nitro-3 (canary)'
117120

118121
steps:
119122
- name: Check out current commit

.github/workflows/issue-package-label.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ jobs:
6565
"@sentry.nestjs": {
6666
"label": "Nest.js"
6767
},
68+
"@sentry.nitro": {
69+
"label": "Nitro"
70+
},
6871
"@sentry.nextjs": {
6972
"label": "Next.js"
7073
},

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ package. Please refer to the README and instructions of those SDKs for more deta
5858
- [`@sentry/gatsby`](https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby): SDK for Gatsby
5959
- [`@sentry/nestjs`](https://github.com/getsentry/sentry-javascript/tree/master/packages/nestjs): SDK for NestJS
6060
- [`@sentry/nextjs`](https://github.com/getsentry/sentry-javascript/tree/master/packages/nextjs): SDK for Next.js
61+
- [`@sentry/nitro`](https://github.com/getsentry/sentry-javascript/tree/master/packages/nitro): SDK for Nitro
6162
- [`@sentry/remix`](https://github.com/getsentry/sentry-javascript/tree/master/packages/remix): SDK for Remix
6263
- [`@sentry/tanstackstart-react`](https://github.com/getsentry/sentry-javascript/tree/master/packages/tanstackstart-react): SDK for TanStack Start React
6364
- [`@sentry/aws-serverless`](https://github.com/getsentry/sentry-javascript/tree/master/packages/aws-serverless): SDK

packages/nitro/README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,37 @@ export default defineConfig({
8989

9090
### 3. Sentry Config Setup
9191

92-
TODO: UPDATE THIS
92+
Create an `instrument.mjs` file in your project root to initialize the Sentry SDK:
93+
94+
```javascript
95+
import * as Sentry from '@sentry/nitro';
96+
97+
Sentry.init({
98+
dsn: '__YOUR_DSN__',
99+
tracesSampleRate: 1.0,
100+
});
101+
```
102+
103+
Then use `NODE_OPTIONS` to load the instrumentation before your app code:
104+
105+
```bash
106+
NODE_OPTIONS='--import ./instrument.mjs' npx nitro dev
107+
```
108+
109+
This works with any Nitro command (`nitro dev`, `nitro preview`, or a production start script).
93110

94111
## Uploading Source Maps
95112

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

98-
<!-- TODO: -->
116+
```javascript
117+
export default withSentryConfig(config, {
118+
org: 'your-sentry-org',
119+
project: 'your-sentry-project',
120+
authToken: process.env.SENTRY_AUTH_TOKEN,
121+
});
122+
```
99123

100124
## Troubleshoot
101125

0 commit comments

Comments
 (0)