Skip to content

Commit ad6ab94

Browse files
authored
Add additional telemetry (#1124)
This PR adds additional telemetry to determine: - what location for IDE panel users prefer - do users encounter problems after clicking "activate license button"
1 parent 0125e56 commit ad6ab94

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

packages/vscode-extension/src/panels/WebviewController.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { Webview, Disposable, commands, Uri } from "vscode";
1+
import { Webview, Disposable, commands, Uri, workspace } from "vscode";
22
import { Logger } from "../Logger";
33
import { getTelemetryReporter } from "../utilities/telemetry";
44
import { IDE } from "../project/ide";
55
import { disposeAll } from "../utilities/disposables";
66
import { RENDER_OUTLINES_PLUGIN_ID } from "../common/RenderOutlines";
7+
import { PanelLocation } from "../common/WorkspaceConfig";
78

89
type CallArgs = {
910
callId: string;
@@ -54,7 +55,14 @@ export class WebviewController implements Disposable {
5455
]);
5556

5657
commands.executeCommand("setContext", "RNIDE.panelIsOpen", true);
57-
getTelemetryReporter().sendTelemetryEvent("panelOpened");
58+
59+
const panelLocation = workspace
60+
.getConfiguration("RadonIDE")
61+
.get<PanelLocation>("panelLocation");
62+
63+
getTelemetryReporter().sendTelemetryEvent("panelOpened", {
64+
panelLocation,
65+
});
5866
}
5967

6068
public asWebviewUri(uri: Uri) {

packages/vscode-extension/src/webview/views/PreviewView.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@ import ToolsDropdown from "../components/ToolsDropdown";
2525

2626
function ActivateLicenseButton() {
2727
const { openModal } = useModal();
28+
const { sendTelemetry } = useUtils();
2829
return (
2930
<Button
3031
className="activate-license-button"
31-
onClick={() => openModal("Activate License", <ActivateLicenseView />)}>
32+
onClick={() => {
33+
sendTelemetry("activateLicenseButtonClicked");
34+
openModal("Activate License", <ActivateLicenseView />);
35+
}}>
3236
Activate License
3337
</Button>
3438
);

0 commit comments

Comments
 (0)