mirror of
https://github.com/apache/superset.git
synced 2026-07-12 17:55:38 +00:00
fix(telemetry): make SCARF_ANALYTICS opt-out work at runtime
The Scarf telemetry pixel was gated only on `process.env.SCARF_ANALYTICS`, which webpack inlines at build time. On the official Docker image and the PyPI wheel the frontend is pre-built, so setting `SCARF_ANALYTICS=false` at container runtime (Helm `extraEnv`, docker/.env, etc.) had no effect — the documented opt-out simply didn't work for most deployments (#32110). Expose `SCARF_ANALYTICS` as a backend config read from the environment and ship it to the client via the bootstrap payload (`FRONTEND_CONF_KEYS`), then have RightMenu pass it to `<TelemetryPixel enabled>`. The build-time `process.env` check is kept as a short-circuit for source builds. Default is unchanged (telemetry on unless explicitly disabled). Docs (Kubernetes, Docker Compose, FAQ) updated to document the runtime opt-out; the k8s page previously only covered opting out of image-pull telemetry, not the pixel. Fixes #32110 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> # Conflicts: # superset-frontend/src/features/home/RightMenu.tsx # tests/unit_tests/views/test_base.py
This commit is contained in:
committed by
Amin Ghadersohi
parent
ebb32de625
commit
2e507214cd
@@ -223,8 +223,9 @@ compose based installation, edit the `x-superset-image:` line in your `docker-co
|
||||
`docker-compose-non-dev.yml` files, replacing `apachesuperset.docker.scarf.sh/apache/superset` with
|
||||
`apache/superset` to pull the image directly from Docker Hub.
|
||||
|
||||
To disable the Scarf telemetry pixel, set the `SCARF_ANALYTICS` environment variable to `False` in
|
||||
your terminal and/or in your `docker/.env` file.
|
||||
To disable the Scarf telemetry pixel, set the `SCARF_ANALYTICS` environment variable to `false` in
|
||||
your `docker/.env` file. This is read at runtime, so it disables the pixel on the pre-built image
|
||||
without rebuilding the frontend.
|
||||
:::
|
||||
|
||||
## 3. Log in to Superset
|
||||
|
||||
Reference in New Issue
Block a user