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

Feat: Enable anonymized analytics for the SQLMesh core #2602

Merged
merged 4 commits into from May 15, 2024

Conversation

izeigerman
Copy link
Member

@izeigerman izeigerman commented May 13, 2024

We prioritize our development work based on the needs of SQLMesh users. Some users share their needs via our Slack or Github communities, but many do not. We have added some simple anonymized usage information (telemetry) to SQLMesh to ensure the needs of all users are heard.

All information is anonymized with hash functions, so we could not link data to a specific company, user, or project even if we wanted to (which we don't!). No information is related to credentials or authentication.

We collect anonymized information about SQLMesh project complexity and usage - for example, number of models, count of model kinds, project load time, whether an error occurred during a plan/run (no stacktraces or error message), and names (but not values) of the arguments passed to CLI commands.

The collection of anonymized usage information can be disabled with these methods:

  • Set the root disable_anonymized_analytics: true key in the SQLMesh project configuration file
  • Execute SQLMesh commands with an environment variable SQLMESH__DISABLE_ANONYMIZED_ANALYTICS set to 1, true, t, yes, or y

@izeigerman izeigerman requested a review from a team May 13, 2024 18:58
atexit.register(collector.shutdown, flush=True)


def disable_analytics() -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you choose to do this pattern? should collector instead be a constant like COLLECTOR, which can then be disabled?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allowed me to reuse existing constructs (eg dispatcher) without explicitly adding disable API to the collector. I don't feel strongly about either approach. Do you see any advantages to doing this the way you suggested?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no

@izeigerman izeigerman merged commit 478cb1a into main May 15, 2024
15 checks passed
@izeigerman izeigerman deleted the feat-core-analytics branch May 15, 2024 16:18
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.

None yet

2 participants