Skip to content

feat: add anonymous installation ping to install scripts#6220

Open
wolfv wants to merge 6 commits into
prefix-dev:mainfrom
wolfv:add-install-ping
Open

feat: add anonymous installation ping to install scripts#6220
wolfv wants to merge 6 commits into
prefix-dev:mainfrom
wolfv:add-install-ping

Conversation

@wolfv
Copy link
Copy Markdown
Member

@wolfv wolfv commented May 27, 2026

Summary

Adds a best-effort anonymous installation ping to the install.sh and install.ps1 scripts so we can estimate how many installations happen.

  • Fires only after a successful install.
  • Best-effort: 3s timeout, errors swallowed — it can never block or fail the installation.
  • Honors opt-out via PIXI_NO_TELEMETRY or the common DO_NOT_TRACK convention.
  • The endpoint is a prefix.dev-hosted proxy (installation-ping.prefix.dev), so the backend can change later without touching the scripts.

Docs

docs/installation.md documents both opt-out variables in the installer option tables and adds a transparent note explaining the ping and how to disable it.

🤖 Generated with Claude Code

wolfv and others added 5 commits May 27, 2026 13:53
Send a best-effort installation ping after a successful install in both
install.sh and install.ps1. The ping never aborts the install (3s timeout,
errors swallowed) and is skipped when PIXI_NO_TELEMETRY or DO_NOT_TRACK is set.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add PIXI_NO_TELEMETRY and DO_NOT_TRACK to the installer option tables and
explain the anonymous installation ping and how to disable it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
After a successful `pixi self-update`, send a best-effort anonymous ping
tagging os, arch and target version. It uses a 3s timeout and ignores all
errors so it can never affect the update result, and is skipped when
PIXI_NO_TELEMETRY or DO_NOT_TRACK is set. Reuses the same pixel id as the
install scripts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Instead of arbitrary os/arch query params (which Scarf only reports with
extra org config), encode event/version/platform into a synthetic page URL
passed via the `Page` parameter. Scarf reports on the page dimension, so each
combination (e.g. /ping/self-update/0.69.0/linux-x86_64) shows up as its own
page without any dashboard setup. Applied to the self-update ping and both
install scripts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread crates/pixi_cli/src/self_update.rs Outdated
std::env::consts::ARCH,
);

let Ok((_, client)) = build_reqwest_clients(None, None) else {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A reqwest client is available at the call site.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

Comment thread crates/pixi_consts/src/consts.rs
@wolfv wolfv requested a review from baszalmstra May 28, 2026 06:25
@baszalmstra
Copy link
Copy Markdown
Contributor

I’m okay with anonymous install counting in principle, but I’d like this to be more transparent before merge. In particular, the self-update ping should be documented as CLI telemetry. The docs should avoid claiming “no personal data”, because the endpoint still receives normal request metadata such as IP. I’d also prefer the opt-out to be shown next to the install command, not only lower in installation docs.

  • Maybe add a small “Telemetry / Analytics” page, not only installation docs.
  • Say what is sent, where it is sent, retention if known, and whether Scarf receives/processes it.
  • Consider PIXI_NO_TELEMETRY as a general pixi convention and document that it also affects self-update.
  • Consider a (one-time) notice before first telemetry, homebrew does this too I think?

("x-pxid", consts::INSTALL_PING_PXID),
("Page", page.as_str()),
])
.header("User-Agent", user_agent())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is already the default on the passed in client.

std::env::consts::ARCH,
);

let _ = client
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we add a comment to tell we explicitly dont care if this fails?

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