@@ -137,6 +137,7 @@ async function parsePyprojectForEntryPoint(
137137 */
138138export async function discoverFastAPIApps (
139139 parser : Parser ,
140+ trackTelemetry = false ,
140141) : Promise < AppDefinition [ ] > {
141142 const workspaceFolders = vscode . workspace . workspaceFolders
142143 if ( ! workspaceFolders ) {
@@ -229,14 +230,16 @@ export async function discoverFastAPIApps(
229230 )
230231 }
231232
232- // Track entrypoint detection per workspace folder
233- trackEntrypointDetected ( {
234- duration_ms : folderTimer ( ) ,
235- method : detectionMethod ,
236- success : folderApps . length > 0 ,
237- routes_count : folderRoutes . length ,
238- routers_count : countRouters ( folderApps ) ,
239- } )
233+ // Track entrypoint detection per workspace folder (initial discovery only)
234+ if ( trackTelemetry ) {
235+ trackEntrypointDetected ( {
236+ duration_ms : folderTimer ( ) ,
237+ method : detectionMethod ,
238+ success : folderApps . length > 0 ,
239+ routes_count : folderRoutes . length ,
240+ routers_count : countRouters ( folderApps ) ,
241+ } )
242+ }
240243 }
241244
242245 if ( apps . length === 0 ) {
0 commit comments