Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add telemetry support #549

Merged
merged 1 commit into from
Apr 25, 2024
Merged

Add telemetry support #549

merged 1 commit into from
Apr 25, 2024

Conversation

stevenkuhn
Copy link
Contributor

@stevenkuhn stevenkuhn commented Apr 8, 2024

This adds support for collecting anonymous usage data to help understand how the CLI is used and how to help improve the Meadow CLI, Workbench, and IDE extensions.

How to opt in

The Meadow CLI displays a message similar to the one below when you first run a Meadow CLI command and have not yet decided to participate or not.

Let's improve the Meadow experience together
--------------------------------------------
To help improve the Meadow experience, we'd like to collect anonymous usage data. This
data helps us understand how our tools are used, so we can make them better for everyone.
This usage data is not tied to individuals and no personally identifiable information is
collected.

Our privacy policy is available at https://www.wildernesslabs.co/privacy-policy.

You can change your mind at any time by running the "meadow telemetry [enable|disable]"
command or by setting the MEADOW_TELEMETRY environment variable to '1' or '0' ('true' or
'false', respectively).

Would you like to participate? [y/n] (y):

Once a user has given their choice, that choice is saved to the Meadow CLI configuration (that can be viewed with meadow config --list) and this message will no longer appear.

This can be overridden entirely by setting the MEADOW_TELEMETRY environment variable to 1/true to opt-in or 0/false (to opt-out). If that environment variable is set, then this message will not be displayed.

A best effort is made to determine if the Meadow CLI command is being run in a continuous integration (CI) environment. If it is, then telemetry is opt-out and disabled by default.

Data points

The usage collection is for anonymous usage data only. It doesn't collect personal data such as username or email address, nor anything about the command being run outside of the command/subcommand name (no command arguments are collected).

This feature collects the following information:

The examples are based on a running the command meadow cloud command publish my_command --collectionId 12345.

Data Example Notes
Command cloud command publish
SessionId hDtIQEoBKMbicpggF4r+wIB61Fjw68aP This is a random string generated at runtime and used only while the command is executed.
MachineId bb4d522020164e4cadec605c4b0521d4 This is a random Guid that is generated at runtime once and stored in the Meadow CLI config. If this value is found in the config, that value is used.
Assembly Name meadow
Assembly Version 2.0.33
OS Version 10.0.22631
OS Platform Windows
OS Architecture X64
Kernel Version Microsoft Windows 10.0.22631
Runtime Identifier win-x64

@stevenkuhn stevenkuhn marked this pull request as ready for review April 9, 2024 16:31
@stevenkuhn
Copy link
Contributor Author

@adrianstevens @ctacke I updated the NuGet packages for the solution so I need to validate everything is still good to go for the extensions.

I added the Spectre.Console library to handle the confirmation prompt.

@stevenkuhn stevenkuhn changed the title [WIP] Add Analytics support Add Analytics support Apr 9, 2024
@stevenkuhn stevenkuhn changed the title Add Analytics support Add telemetry support Apr 19, 2024
Refactor nuget references
@adrianstevens adrianstevens merged commit 774b27c into develop Apr 25, 2024
1 check passed
@adrianstevens adrianstevens deleted the feature/analytics branch April 25, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants