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

CLI: Add anonymous reporting metrics #892

Open
josephjclark opened this issue Mar 5, 2025 · 0 comments
Open

CLI: Add anonymous reporting metrics #892

josephjclark opened this issue Mar 5, 2025 · 0 comments

Comments

@josephjclark
Copy link
Collaborator

josephjclark commented Mar 5, 2025

It would be great to anonymously track real usage of the CLI. Whenever a command is run, we could post to some tracking service with the basic details (maybe we can include the final run status and time too?)

We should do this in a non annoying and non invasive way. I don't know if we need a GDPR expert to weigh in.

Ideally it would be opt out, so that we get tracking by default. We'll need to tell users this clearly on install. I also wonder if we should have debug logs like posting anonymous metric with command name, runtime, and exit code whenever we post a metric. Or maybe a better approach is, if metrics are enabled:

  • always log a message like "Anonymous usage metric reporting is enabled. See for details"
  • Then maybe debug log exactly what is sent in each request

That feels like a good balance of being clear but not annoying. We can have an env var or option like OPENFN_DISABLE_METRIC_DISCLOSURE or something

To opt out, set an env var like OPENFN_DISABLE_METRICS. Lightning installs which use the CLI should do this (I suppose we could not add metrics to the metadata task, which I think is all that lightning uses the CLI for now?).

It might be nice to have a .openfnrc in the working folder to provide options like this. And maybe a default one in the repo too. Then users can do openfn set metrics false or something to set the option on their machine without using an env var (idk why this is valuable though)

Where to we report metrics to? Grafana?

@github-project-automation github-project-automation bot moved this to New Issues in v2 Mar 5, 2025
@theroinaochieng theroinaochieng moved this from New Issues to DevX Backlog in v2 Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: DevX Backlog
Development

No branches or pull requests

1 participant