Skip to content

Commit f97af3d

Browse files
authored
feat: Improve telemetry for editor type and license type (#1828)
The editor type is currently embedded inside the event name. That complicates data analysis. This PR fixes this issue, and adds data on the active license type (`Free`, `Pro`, `Inactive`, and others). **Note:** These tests are, and always will be flaky. This is unavoidable. The goal of these tests isn't to get `100%` success rate, the goal is to improve the current success rate from `~0%` to `~70%`. ### How Has This Been Tested: - Checked input properties at the time of `sendTelemetryEvent` call - All properties match the expected value ### How Has This Change Been Documented: Not applicable
1 parent 8debd89 commit f97af3d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

packages/vscode-extension/src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ export async function activate(context: ExtensionContext) {
120120
}
121121

122122
migrateOldConfiguration();
123-
getTelemetryReporter().sendTelemetryEvent(`extension:activated:${getEditorType()}`);
123+
124+
getTelemetryReporter().sendTelemetryEvent(`extension:activated`, {
125+
editorType: getEditorType(),
126+
});
124127

125128
commands.executeCommand("setContext", "RNIDE.sidePanelIsClosed", false);
126129

packages/vscode-extension/src/project/project.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,11 @@ export class Project implements Disposable, ProjectInterface, DeviceSessionsMana
477477
status: LicenseStatus.Inactive,
478478
featuresAvailability: DefaultFeaturesAvailability,
479479
});
480+
481+
this.telemetry.sendTelemetry("license:detected", {
482+
licenseStatus: LicenseStatus.Inactive,
483+
});
484+
480485
return;
481486
}
482487

@@ -492,6 +497,10 @@ export class Project implements Disposable, ProjectInterface, DeviceSessionsMana
492497
}
493498

494499
this.licenseStateManager.updateState(newState);
500+
501+
this.telemetry.sendTelemetry("license:detected", {
502+
licenseStatus: newState.status,
503+
});
495504
};
496505

497506
// #endregion License

0 commit comments

Comments
 (0)