Skip to content

Telemetry: measure Apso usage (opt-out anonymous CLI telemetry + passive npm/PyPI stats) #96

Description

@cultron

Summary

Add a way to measure how many people use Apso (usage numbers / trends). Separate from the commit co-author hook — this is its own initiative with trust/privacy implications.

Signals

A. Passive (free, available now — do first)

  • npm download stats for @apso/cli and @apso/domain-events.
  • PyPI download stats (pypistats) for apso-domain-events.
  • Coarse (downloads ≠ active users; CI inflates) but zero work and a usable trend.
  • Go module proxy has no easy public per-module counts.

B. Active — opt-out anonymous CLI telemetry (the real signal)

The CLI emits an anonymous event per command run. No PII, no code, no schema contents.

  • Events: command name (generate/init/deploy/…), CLI version, OS/arch, an anonymous install id (random uuid persisted in CLI config), coarse counts only (e.g. number of entities — optional, decide).
  • Transport: an analytics sink — PostHog / Segment / a small first-party ingest endpoint (decide).
  • Privacy/trust (required):
    • Opt-out via APSO_TELEMETRY=0 and a persisted config flag (apso config set telemetry off).
    • First-run transparency notice ("Apso collects anonymous usage data; opt out with …").
    • Respect DO_NOT_TRACK.
    • Documented in README + docs; never collect identifiers or source.

C. Platform-side (already partial)

apso deploy / login / link hit the Apso backend, so authenticated platform usage is already loggable server-side — but not local-only generate.

Proposed sequencing

  1. Stand up the passive npm/PyPI dashboards now (no code).
  2. Design + implement opt-out anonymous CLI telemetry (B): pick the provider, add the client + anonymous id + opt-out + first-run notice + docs, stand up the ingest.

Out of scope

The Co-Authored-By: Apso commit hook is a separate feature (attribution, not telemetry; only visible on public-repo commits).

Environment

  • @apso/cli

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions