Skip to content

feat(cli): Add privacy-first Sentry telemetry - #4

Merged
philprime merged 4 commits into
mainfrom
philprime/feat/add-sentry-telemetry
Sep 9, 2026
Merged

feat(cli): Add privacy-first Sentry telemetry#4
philprime merged 4 commits into
mainfrom
philprime/feat/add-sentry-telemetry

Conversation

@philprime

Copy link
Copy Markdown
Member

Instrument the CLI with Sentry Cocoa so unexpected failures are actionable and documentation usage can be measured. Telemetry is enabled by default and can be disabled with TELEMETRY_DISABLED=true.

Signals and privacy

Capture unexpected errors, console.command traces, Swift Log entries, command breadcrumbs, response metrics, and type and technology popularity counters. An explicit field allowlist excludes raw arguments, invalid CLI usage, user and request data, IP and GeoIP data, device identifiers, and local paths. The telemetry philosophy and contributor rules are documented in docs/TELEMETRY.md.

Release symbols

Validate and upload matching arm64 and x86_64 dSYMs during non-PR release builds. The workflow pins sentry-cli, verifies its checksum, includes public source context, waits for processing, and fails loudly when authentication or upload fails.

Verification

Verified with make test, make analyze, and make build. Enabled and disabled release commands produced byte-identical JSON, and live error, log, span, breadcrumb, and metric payloads were inspected in Sentry to confirm the privacy filters.

Capture errors, command traces, Swift logs, breadcrumbs, and documentation popularity metrics with an explicit field allowlist.

Upload release dSYMs in CI and document the telemetry privacy policy and opt-out behavior.
Keep one static logger per command and use the com.techprimate reverse-domain labels.
Scope each result type to the runner that produces it.
@philprime
philprime marked this pull request as ready for review September 9, 2026 09:23
@philprime
philprime enabled auto-merge (squash) September 9, 2026 09:23
Comment thread Sources/CLI/cmd/types/TypesViewCommand.swift Outdated
Record type and technology popularity only after the documentation request and rendering complete.
Comment thread Sources/CLI/main/AppleDocs.swift
@philprime
philprime merged commit 75716d2 into main Sep 9, 2026
12 checks passed
@philprime
philprime deleted the philprime/feat/add-sentry-telemetry branch September 9, 2026 09:49
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.

1 participant