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 tracking to CLI tool #288

Open
michielmulders opened this issue Mar 13, 2024 · 0 comments
Open

Add telemetry tracking to CLI tool #288

michielmulders opened this issue Mar 13, 2024 · 0 comments
Assignees

Comments

@michielmulders
Copy link
Member

michielmulders commented Mar 13, 2024

Description: I would like to track telemetry data for the CLI tool, like command usage, to better understand how users use the CLI. Regular metrics like GitHub stars or NPM downloads are skewed by nature because a single person can account for 90% of the usage in some cases.

Notes:

  • Make it opt-in instead of opt-out for GDPR/privacy concerns (global env flag to opt-out -> e.g. within a CI pipeline -> but how do you segment whether the usage is coming from a person (UI) or a CI pipeline).

It's usually typical across providers to inject a "CI" env variable, so I would check for that. In Node that's just process.env.CI -- this can also sometimes be detected through other env variables.

Aha, as I thought, there's a package for this: https://www.npmjs.com/package/is-ci
That is assuming your CLI is usable in CI, sometimes it's not.

  • Figure out what to track and how we will use the data (be purposeful) -> e.g. metrics per command to understand which commands are used more than others

References:

  • Next.js CLI telemetry
  • Are there any open source tools to build the telemetry server?
@michielmulders michielmulders converted this from a draft issue Mar 13, 2024
@michielmulders michielmulders self-assigned this Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant