Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/appDiscovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ async function parsePyprojectForEntryPoint(
*/
export async function discoverFastAPIApps(
parser: Parser,
trackTelemetry = false,
): Promise<AppDefinition[]> {
const workspaceFolders = vscode.workspace.workspaceFolders
if (!workspaceFolders) {
Expand Down Expand Up @@ -229,14 +230,16 @@ export async function discoverFastAPIApps(
)
}

// Track entrypoint detection per workspace folder
trackEntrypointDetected({
duration_ms: folderTimer(),
method: detectionMethod,
success: folderApps.length > 0,
routes_count: folderRoutes.length,
routers_count: countRouters(folderApps),
})
// Track entrypoint detection per workspace folder (initial discovery only)
if (trackTelemetry) {
trackEntrypointDetected({
duration_ms: folderTimer(),
method: detectionMethod,
success: folderApps.length > 0,
routes_count: folderRoutes.length,
routers_count: countRouters(folderApps),
})
}
}

if (apps.length === 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export async function activate(context: vscode.ExtensionContext) {

try {
// Discover apps and create providers
apps = await discoverFastAPIApps(parserService)
apps = await discoverFastAPIApps(parserService, true)
} catch (error) {
success = false
trackActivationFailed(error, "discovery")
Expand Down
Loading