Skip to content

Add a default-off metrics example plugin - #19

Draft
bradseiler wants to merge 1 commit into
mainfrom
ramirez/buzz-905-metrics
Draft

bradseiler wants to merge 1 commit into
mainfrom
ramirez/buzz-905-metrics

Conversation

@bradseiler

@bradseiler bradseiler commented Dec 4, 2026 •

Copy link
Copy Markdown

Summary

Add xyz.block.metrics, an example plugin with opt-in collection, Counts and Linked modes, and a community allowlist that also gates the search subscription and optional tracing. The plugin projects supported fields, keeps raw query text out of records and previews, and bounds its in-memory buffer and batches. A higher attempt for the same query stays one logical query. The default manifest has no network origins. Export requires a distributor build with an explicit origin and the protected desktop host API.

Counts omits identifiers. Navigation sessions retain their group and position counts and are excluded from message search rates. Search collection on allowed communities can cause the host to attach ephemeral join IDs, and optional Linked tracing adds trace context.

Validation

  • Head 81e1c6e2179d8c17d08062bbee43f2d82ebb7472, tree bbe8088c743992f003062235eef74c8cfa97ff35.
  • TypeScript, reproducible bundle, 37 plugin tests, 90 indexer tests and fixture validation passed. A Chromium fixture exercised opt-in, redacted preview, query and trace matching, scope changes and opt-out. This PR adds read-only CI for plugin and indexer checks.

Draft feedback and rollout

The host currently omits community from UI timings and does not explicitly confirm message-search dispatch for empty or failed searches. The plugin drops unscoped timings and labels its incomplete search coverage. Native desktop, live export and receiver joins remain to be validated. The example defaults to off and is unlisted. Rollback is disable, uninstall or revert.

Post-push pnpm run check-plugin metrics passed and confirmed the built files are committed and pushed.

Co-authored-by: Harrington <91868d0cc0b8144564e350ce0a9e46447f654ad3fe93b23e39fe71314c911781>
Signed-off-by: Brad Seiler <seiler@squareup.com>
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