File tree Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ mount(() => <StartClient />, document.getElementById('app'));
6060
6161### 3. Server-side Setup  
6262
63- Create an instrument file named ` instrument.server.mjs  `  and add your initialization code for the server-side SDK.
63+ Create an instrument file named ` src/ instrument.server.ts `  and add your initialization code for the server-side SDK.
6464
6565``` javascript 
6666import  *  as  Sentry  from  ' @sentry/solidstart' 
@@ -125,6 +125,8 @@ export default defineConfig(withSentry({
125125Sentry relies on running ` instrument.server.ts `  as early as possible. Add the ` sentrySolidStartVite `  plugin
126126from ` @sentry/solidstart `  to your ` app.config.ts ` . This takes care of building ` instrument.server.ts `  and placing it alongside the server entry file.
127127
128+ If your ` instrument.server.ts `  file is not located in the ` src `  folder, you can specify the path via the ` sentrySolidStartVite `  plugin.
129+ 
128130To upload source maps, configure an auth token. Auth tokens can be passed to the plugin explicitly with the ` authToken `  option, with a
129131` SENTRY_AUTH_TOKEN `  environment variable, or with an ` .env.sentry-build-plugin `  file in the working directory when
130132building your project. We recommend you add the auth token to your CI/CD environment as an environment variable.
@@ -147,6 +149,8 @@ export default defineConfig(withSentry({
147149        project: process .env .SENTRY_PROJECT ,
148150        authToken: process .env .SENTRY_AUTH_TOKEN ,
149151        debug: true ,
152+         //  optional: if your `instrument.server.ts` file is not located inside `src`
153+         instrumentation: ' ./mypath/instrument.server.ts' 
150154      }),
151155    ],
152156  },
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export type Nitro = {
1313
1414export  type  SolidStartInlineConfig  =  Parameters < typeof  defineConfig > [ 0 ] ; 
1515
16- export  type  SolidStartInlineConfigNitroHooks  =  { 
16+ export  type  SolidStartInlineServerConfig  =  { 
1717  hooks ?: { 
1818    close ?: ( )  =>  unknown ; 
1919    'rollup:before' ?: ( nitro : Nitro )  =>  unknown ; 
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import type {
66  Nitro , 
77  SentrySolidStartConfigOptions , 
88  SolidStartInlineConfig , 
9-   SolidStartInlineConfigNitroHooks , 
9+   SolidStartInlineServerConfig , 
1010}  from  './types' ; 
1111
1212/** 
@@ -22,7 +22,7 @@ export const withSentry = (
2222  solidStartConfig : SolidStartInlineConfig  =  { } , 
2323  sentrySolidStartConfigOptions : SentrySolidStartConfigOptions  =  { } , 
2424) : SolidStartInlineConfig  =>  { 
25-   const  server  =  ( solidStartConfig . server  ||  { } )  as  SolidStartInlineConfigNitroHooks ; 
25+   const  server  =  ( solidStartConfig . server  ||  { } )  as  SolidStartInlineServerConfig ; 
2626  const  hooks  =  server . hooks  ||  { } ; 
2727
2828  let  serverDir : string ; 
Original file line number Diff line number Diff line change @@ -127,10 +127,10 @@ export type SentrySolidStartPluginOptions = {
127127  debug ?: boolean ; 
128128
129129  /** 
130-    * The path to your `instrumentation .server.ts|js` file. 
131-    * e.g. ' ./src/instrumentation .server.ts` 
130+    * The path to your `instrument .server.ts|js` file. 
131+    * e.g. ` ./src/instrument .server.ts` 
132132   * 
133-    * Defaults to: `./src/instrumentation .server.ts` 
133+    * Defaults to: `./src/instrument .server.ts` 
134134   */ 
135135  instrumentation ?: string ; 
136136} ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments