@@ -14,7 +14,8 @@ const stackParser = createStackParser(nodeStackLineParser());
1414export function createSentryInstance (
1515 options : NormalizedOptions ,
1616 shouldSendTelemetry : Promise < boolean > ,
17- buildTool : string
17+ buildTool : string ,
18+ buildToolMajorVersion : string | undefined
1819) : { sentryScope : Scope ; sentryClient : Client } {
1920 const clientOptions : ServerRuntimeClientOptions = {
2021 platform : "node" ,
@@ -56,15 +57,16 @@ export function createSentryInstance(
5657 const scope = new Scope ( ) ;
5758 scope . setClient ( client ) ;
5859
59- setTelemetryDataOnScope ( options , scope , buildTool ) ;
60+ setTelemetryDataOnScope ( options , scope , buildTool , buildToolMajorVersion ) ;
6061
6162 return { sentryScope : scope , sentryClient : client } ;
6263}
6364
6465export function setTelemetryDataOnScope (
6566 options : NormalizedOptions ,
6667 scope : Scope ,
67- buildTool : string
68+ buildTool : string ,
69+ buildToolMajorVersion ?: string
6870) : void {
6971 const { org, project, release, errorHandler, sourcemaps, reactComponentAnnotation } = options ;
7072
@@ -111,7 +113,9 @@ export function setTelemetryDataOnScope(
111113 bundler : buildTool ,
112114 } ) ;
113115
114- scope . setTag ( "bundler-major-version" , options . _metaOptions . telemetry . bundlerMajorVersion ) ;
116+ if ( buildToolMajorVersion ) {
117+ scope . setTag ( "bundler-major-version" , buildToolMajorVersion ) ;
118+ }
115119
116120 scope . setUser ( { id : org } ) ;
117121}
0 commit comments