Files
tenant-registry/openapi.yaml
Sharang ParnerkarandClaude Opus 5.5 849e79ada0
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Successful in 6m57s
ci / image (pull_request) Skipped
feat(telemetry): opt-in product telemetry relay and per-tenant switch
Werkpilot's content-free usage metrics go through the registry, so no
collector token sits on customer machines, and only for workspaces that
turned telemetry on.

- GET/PUT /v1/tenants/{id}/products/{product}/telemetry: the switch,
  default off, kept as the "telemetry" key of the product's settings
  document (0025, no migration); IT_ADMIN/OWNER or services; audited as
  product_settings.changed
- "telemetry" in licence grants (POST /v1/licences, /v1/licences/ci,
  heartbeat renewals) and at the top of the heartbeat answer
- POST /v1/telemetry: checks a batch against a fixed allowlist and
  forwards it to TELEMETRY_OTLP_URL as OTLP/HTTP JSON (delta sums and
  histograms, tenant resource attributes, never the person); 120 batches
  per person and hour; CLI user tokens pass with their licences grant

Refs platform/werkpilot#87

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRayW7ztyk1uAtwMJPR
2026-11-23 15:25:43 +01:00

161 KiB