Skip to content

Commit edbb6df

Browse files
committed
add metrics
1 parent b6f7436 commit edbb6df

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
- Fix Functions MCP log tool to normalize sort order and surface Cloud Logging error details (#9247)
2-
- `firebase init` support a way to skip project setup and login via `--project demo-no-project` (#9251)
2+
- `firebase init` only requires `firebase login` when a valid project is passed. It accepts demo projects without login. (#9251)

firebase-vscode/src/analytics.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export enum DATA_CONNECT_EVENT_NAME {
2727
MOVE_TO_CONNECTOR = "move_to_connector",
2828
START_EMULATOR_FROM_EXECUTION = "start_emulator_from_execution",
2929
REFUSE_START_EMULATOR_FROM_EXECUTION = "refuse_start_emulator_from_execution",
30+
INIT = "init",
3031
INIT_SDK = "init_sdk",
3132
INIT_SDK_CLI = "init_sdk_cli",
3233
INIT_SDK_CODELENSE = "init_sdk_codelense",

firebase-vscode/src/core/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { upsertFile } from "../data-connect/file-utils";
1414
import { registerWebhooks } from "./webhook";
1515
import { createE2eMockable } from "../utils/test_hooks";
1616
import { runTerminalTask } from "../data-connect/terminal";
17-
import { AnalyticsLogger } from "../analytics";
17+
import { AnalyticsLogger, DATA_CONNECT_EVENT_NAME } from "../analytics";
1818
import { EmulatorHub } from "../../../src/emulator/hub";
1919

2020
export async function registerCore(
@@ -67,6 +67,7 @@ export async function registerCore(
6767
);
6868
return;
6969
}
70+
analyticsLogger.logger.logUsage(DATA_CONNECT_EVENT_NAME.INIT);
7071
const projectId = currentProjectId.value || EmulatorHub.MISSING_PROJECT_PLACEHOLDER;
7172
const initCommand = `${settings.firebasePath} init dataconnect --project ${projectId}`;
7273
initSpy.call("firebase init", initCommand, { focus: true });

0 commit comments

Comments
 (0)