-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
There's no way to disable and persist telemetry per project #11820
Comments
Can you not do this via npm scripts? "scripts": {
"dev": "ASTRO_TELEMETRY_DISABLED=1 astro dev",
"build": "ASTRO_TELEMETRY_DISABLED=1 astro build",
} |
Yes, we can. However NPM is not the CLI. The documentation alone tells people to run |
You can set it on your config file: // astro.config.mjs
process.env.ASTRO_TELEMETRY_DISABLED = '1';
export default defineConfig({ ... }); Running with debug shows:
|
That's a great solution, thanks for the tip. BTW, this is what the CLI shows here, even when telemetry has been disabled using env variables/config change:
I'm okay with that, but just FYI this may still trigger compliance and audit issues in some orgs. |
Yeah, technically, doing this leaves the telemetry enabled for tracking before the config file is loaded, that is what it notifies that it is enabled first. But no telemetry is collected before the config is loaded (the relevant information comes from the config), so disabling it there disables all telemetry in Astro. Not a perfect solution, but it is a solution. |
Another option is to use the "scripts": {
"postinstall": "astro telemetry disable"
} |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
n/a
Describe the Bug
According to https://astro.build/telemetry/:
Also:
The above requires every developer to change their local environment to disable telemetry before running the CLI, which is problematic for compliance and/or privacy reasons for some orgs in regulated sectors.
What's the expected result?
A setting in the SCM-managed config file to disable telemetry for that specific project, so new developers and/or scripts checking out the code don't break an org's regulations because they forgot to set up their local machines.
Link to Minimal Reproducible Example
n/a
Participation
The text was updated successfully, but these errors were encountered: