Open-Source Wikis

/

Astro

/

Packages

/

@astrojs/telemetry

withastro/astro

@astrojs/telemetry

@astrojs/telemetry is the anonymous-event collector used by the framework. It is opt-out and toggled via astro telemetry enable|disable|reset.

Purpose

packages/telemetry/ provides:

  • A minimal, dependency-light HTTP client for posting anonymized events.
  • A configuration store that records the user's opt-in/opt-out preference.
  • A notification banner shown by the CLI on first run.

Astro events are defined in packages/astro/src/events/index.ts (build started, build finished, dev session, integration usage, etc.). The CLI invokes notify() (to print the banner once) and update() (to mutate the user preference) before any data is recorded.

Directory layout

packages/telemetry/
├── src/        # Client, configuration store, banner
├── test/
└── package.json

What is recorded

The published events are documented at https://astro.build/telemetry. They cover:

  • Astro version, Node version, OS, package manager.
  • Anonymous machine and project IDs.
  • Which integrations and adapters are configured.
  • Build duration and number of pages.
  • CLI command invoked.

There is no PII and the event sender enforces this — pages, file paths, and user code are never sent.

Disabling

Users can disable telemetry with:

astro telemetry disable

Or by setting the ASTRO_TELEMETRY_DISABLED=1 environment variable. The CLI banner explains both routes on first run.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

@astrojs/telemetry – Astro wiki | Factory