File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export class LightNodeClient extends ServerRuntimeClient<NodeClientOptions> {
2626 serverName,
2727 } ;
2828
29- applySdkMetadata ( clientOptions , 'node' ) ;
29+ applySdkMetadata ( clientOptions , 'node-light' , [ 'node-core' ] ) ;
3030
3131 debug . log ( `Initializing Sentry: process: ${ process . pid } , thread: ${ isMainThread ? 'main' : `worker-${ threadId } ` } .` ) ;
3232
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ function _init(
121121 ) ;
122122 }
123123
124- applySdkMetadata ( options , 'node-core ' , [ 'node-core-light ' ] ) ;
124+ applySdkMetadata ( options , 'node-light ' , [ 'node-core' ] ) ;
125125
126126 const client = new LightNodeClient ( options ) ;
127127 // The client is on the current scope, from where it generally is inherited
Original file line number Diff line number Diff line change @@ -15,6 +15,19 @@ describe('Light Mode | SDK', () => {
1515 expect ( client ) . toBeInstanceOf ( LightNodeClient ) ;
1616 } ) ;
1717
18+ it ( 'sets correct SDK metadata' , ( ) => {
19+ const client = mockLightSdkInit ( ) ;
20+
21+ const metadata = client ?. getOptions ( ) . _metadata ;
22+ expect ( metadata ?. sdk ?. name ) . toBe ( 'sentry.javascript.node-light' ) ;
23+ expect ( metadata ?. sdk ?. packages ) . toEqual ( [
24+ {
25+ name : 'npm:@sentry/node-core' ,
26+ version : expect . any ( String ) ,
27+ } ,
28+ ] ) ;
29+ } ) ;
30+
1831 it ( 'sets the client on the current scope' , ( ) => {
1932 const client = mockLightSdkInit ( ) ;
2033
You can’t perform that action at this time.
0 commit comments