feat: implement ARMS telemetry for Hermes v2 plugin#1631
Merged
hijzy merged 2 commits intoMay 7, 2026
Conversation
Add anonymous usage telemetry via Aliyun ARMS RUM with event group `memos_local_hermes_v2` to differentiate from v1 in dashboards. - New `core/telemetry/sender.ts`: batched event sender (flush at 10 events or 30s interval), privacy-first (no user content, anonymous UUID, opt-out via config) - Track: plugin_started, daily_active, memory_search, memory_ingested, feedback_submitted, viewer_opened, plugin_error - Inject telemetry in memory-core facade (onTurnStart/End, searchMemory, submitFeedback) and overview route (viewer_opened) - CI: generate credentials from secrets before npm publish - Unit tests: opt-out, batch flush, payload shape, content redaction Also includes previously applied bug fixes for v2 regression stability. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep upstream's multi-line function signature formatting in memory.ts. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
memos_local_hermes_v2, cleanly separated from v1 (memos_local_hermes) in dashboardsplugin_started,daily_active,memory_search,memory_ingested,feedback_submitted,viewer_opened,plugin_errortelemetry.enabled: falsein config.yamltelemetry.credentials.jsonfrom secrets during publish workflowChanges
core/telemetry/sender.ts+index.ts— batched ARMS sender (flush at 10 events or 30s)scripts/generate-telemetry-credentials.cjs— CI credential injectionbridge.cts— instantiate Telemetry after core.init(), bind to memory-corecore/pipeline/memory-core.ts— track calls in onTurnStart/End, searchMemory, submitFeedback, shutdownserver/routes/overview.ts— viewer_opened on first /api/v1/overview request.github/workflows/hermes-plugin-publish.yml— credentials generation stepTest plan
memos_local_hermes_v2Made with Cursor