Docs-Builder

# Telemetry Configuration

Version: 1.1.1
Last Updated: January 23, 2026

Modes

  • off: Do not emit or upload telemetry.
  • manual (default): Emit locally; user exports/uploads explicitly.
  • auto: Emit locally; background scheduler exports and uploads on interval.

CLI Commands (single source of truth)

  • branchpy telemetry mode [off|manual|auto] — set/show mode.
  • branchpy telemetry preview [--from 2h] [--json] [--full] — inspect package without writing file.
  • branchpy telemetry export --output rc-metrics.json [--from 2h] — write sanitized package.
  • branchpy telemetry upload --file rc-metrics.json — upload existing package.
  • branchpy telemetry upload --auto [--from 24h] [--endpoint URL] [--dry-run] — build and send in one step.

Config Keys (branchpy/config.py)

[telemetry]
mode = "manual"
auto_upload_interval_hours = 24
max_upload_size_mb = 5
auth_token = ""  # optional
endpoint = "https://branchpy.com/api/telemetry/upload"

How to set

  • File: .branchpy/branchpy.toml or project .branchpy.toml
  • CLI: branchpy config set telemetry.mode auto
  • VS Code Control Center: Telemetry section dropdowns and toggles (writes same config)

VS Code Settings (extension)

{
  "branchpy.telemetry.enabled": true,
  "branchpy.telemetry.privacy": "minimal",   // minimal | extended | debug
  "branchpy.telemetry.mode": "manual"
}

Environment Variables

  • BRANCHPY_TELEMETRY_CACHE_TELEMETRY_ENABLED (bool, default true)
  • BRANCHPY_TELEMETRY_CACHE_SAMPLING_RATE (0.0–1.0, default 1.0)
  • BRANCHPY_TELEMETRY_API_KEY (rc-backend ingestion)
  • TELEMETRY_STORAGE (mysql|sqlite, default mysql for server, sqlite for CLI)
  • SQLITE_PATH, MYSQL_HOST, MYSQL_PORT, MYSQL_DATABASE, MYSQL_USER, MYSQL_PASSWORD (storage selection)

Defaults & Limits

  • Time range default: 2h for preview/export/upload.
  • Auto upload interval default: 24h (auto mode only).
  • Upload size cap: 5MB (configurable).
  • Sampling: 100% cache events by default; reduce via env when high-volume.