Skip to content

Feat: Enable anonymized analytics for the SQLMesh core#2602

Merged
izeigerman merged 4 commits intomainfrom
feat-core-analytics
May 15, 2024
Merged

Feat: Enable anonymized analytics for the SQLMesh core#2602
izeigerman merged 4 commits intomainfrom
feat-core-analytics

Conversation

@izeigerman
Copy link
Contributor

@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
@izeigerman izeigerman force-pushed the feat-core-analytics branch from 2d57a1e to bb55000 Compare May 13, 2024 19:38
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
Contributor 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
@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.

2 participants