Repository navigation
feat(telemetry): add default-on usage analytics and detached batch delivery - #76
littleDogWang wants to merge 11 commits into
Conversation
Add anonymous core-flow events, optional webpage attribution, Agent classification and bounded collector delivery. Honor live MCP opt-out and Retry-After, classify EOF as failure, and emit each init validation stage once. Include privacy documentation and regression coverage.
|
Overall, I like the approach here, especially the effort to limit what's collected and exclude sensitive data. A few things I'd like us to revisit before merging:
I'd also like to verify the BFF/PostHog privacy configuration before we enable collection in a release. My preference is to keep basic operational analytics as frictionless as legally permissible, while giving developers clear controls and treating cross-session attribution separately. |
shczhen
left a comment
There was a problem hiding this comment.
Verified Recipe attribution, local validation for directory conflicts, and the passing Linux, macOS, and Windows checks. Before release, upgrade Go in CI and release builds, then rerun govulncheck. The baseline scan reports the same 13 standard library vulnerabilities.
Add usage analytics for Recipes, init and project creation across shell and MCP. Capture defaults to enabled when a valid collector is configured, with a first-use shell notice, MCP initialization instructions and saved/runtime opt-out controls.
local_validate.enabledin shell and MCP status. ReportsavedPreference,transportConfiguredandcaptureActiveseparately and document the JSON contract.Validation:
go test -count=1 ./...,go vet, and the command reference and error code checks passed.golangci-lint2.12.2 reported zero issues for the Linux target using Go 1.26.5 in a temporary checkout. GitHub Actions passed on Ubuntu, macOS, and Windows, including the Windows proxy and installation ID ACL tests. The separate govulncheck job still fails. Local CLI → SSP → mock PostHog verification captured 20 events in 10 requests, including matching shell and MCP Recipe attribution and directory conflict results.Deploy the collector change in SSP #62 and publish the updated public telemetry disclosure before releasing a CLI build with the production collector.
The release configuration embeds
https://agora-cli.agora.io/api/telemetry/v1/eventsthrough GoReleaser linker flags. A local binary built with those flags contains the URL and reportstransportConfigured: trueandcaptureActive: truewithAGORA_TELEMETRY_URLunset.After the production collector is deployed, run
agora recipes list --jsonwith the release binary andAGORA_TELEMETRY_URLunset, then verify that the corresponding event arrives in production PostHog. Production ingestion is still pending verification. An operation interrupted before handoff can lose its entire in-memory batch. Long operations are visible only after completion.Companion collector PR: https://github.com/AgoraLab/ssp-service/pull/62.
Review follow-up
go test ./...andgo run ./cmd/gendocs -check. Regression coverage includesDO_NOT_TRACKand the MCP notice marker.