File tree Expand file tree Collapse file tree 6 files changed +38
-3
lines changed
Expand file tree Collapse file tree 6 files changed +38
-3
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 5050 - ' @sentry/google-cloud-serverless'
5151 - ' @sentry/nestjs'
5252 - ' @sentry/nextjs'
53+ - ' @sentry/nitro'
5354 - ' @sentry/nuxt'
5455 - ' @sentry/react'
5556 - ' @sentry/react-router'
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 6565 "@sentry.nestjs": {
6666 "label": "Nest.js"
6767 },
68+ "@sentry.nitro": {
69+ "label": "Nitro"
70+ },
6871 "@sentry.nextjs": {
6972 "label": "Next.js"
7073 },
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments