Skip to content

Add a first-party Sentry plugin behind the sentryPlugin flag (851-4395) - #1480

Merged
dylanplayer merged 2 commits into
mainfrom
codevisor/mocha
Nov 26, 2026
Merged

dylanplayer merged 2 commits into
mainfrom
codevisor/mocha

Conversation

@dylanplayer

Copy link
Copy Markdown
Member

Part of 851-4395.

Adds a first-party Sentry plugin (plugins/sentry), behind the sentryPlugin feature flag (Settings › Developer › Experimental Features).

  • Sign in with Sentry: Sentry OAuth with the build's installed client (CODEVISOR_SENTRY_OAUTH_CLIENT_JSON), returning through the existing Cloud callback. One account covers every org the person belongs to. After an OAuth sign-in, Codevisor now sends codevisor/account/check with the new token, and a plugin can return routeKeys, so Cloud can route one inbox by several keys (new inbox_route key, migration 0013).
  • Tools: 56 of Sentry's own MCP tools (snapshot from getsentry/sentry-mcp), forwarded to mcp.sentry.dev with the person's token as Sentry-Bearer. Admin tools that change alerts, monitors, teams and project settings are left out.
  • Skill: find → read the stack trace → fix → resolve in the next release.
  • Events: issue.created, issue.regressed, issue.escalating and issue.assigned are polled every 30 s for everyone. Orgs that install the Codevisor integration also get them, plus comment.created and alert.fired, within seconds through /hooks/push/sentry. Cloud checks the signature with SENTRY_WEBHOOK_SECRET, records each installation's org, and relays only ids plus an alert's name and status.
  • Catalog: io.sentry/mcp stays for everyone without the flag. A first-party plugin can now name the entry it replaces, which is hidden while the replacement is offered.
  • Docs: /docs/plugins/sentry.

Tophat: against a fake Sentry on the dev app, sign-in, tools, and a bot waking on a new issue by polling (~7 s) and by a signed webhook through local Cloud (~0.5 s) all worked. Sign-in against live sentry.io wasn't completed: a dev instance can't relay the callback to another machine. The flag change itself is covered by route tests and wasn't re-tophatted in the app.

🤖 Generated with Claude Code

dylanplayer and others added 2 commits November 25, 2026 17:07
…nts for bots (851-4395)

Sentry is now a bundled first-party plugin and replaces io.sentry/mcp in the
catalog. Existing installs of the remote entry keep working as they are.

Sign-in is Sentry OAuth with the build's installed client
(CODEVISOR_SENTRY_OAUTH_CLIENT_JSON, or the dev secrets file), returning through
the existing Cloud callback. A Sentry sign-in reaches every organization the
person belongs to, so one account covers all of them. After the token
exchange Codevisor now sends codevisor/account/check with the new token, and a
plugin can return routeKeys; Sentry returns its organization ids and names the
account by email. Cloud routes one inbox by several keys (inbox_route is keyed
by inbox, route and key; the route endpoint takes keys and still accepts key).

Tools are 56 of Sentry's own MCP tools, snapshotted from getsentry/sentry-mcp
(refresh with bun run tools:snapshot) and forwarded to mcp.sentry.dev with the
person's token as Sentry-Bearer. Left out: the admin tools that change alert
rules, monitors, teams and project settings, get_alert_options, the tools about
Sentry's MCP server itself, and the deprecated aliases. A skill teaches the
find, read the stack trace, fix, resolve-in-next-release loop.

Events: issue.created, issue.regressed, issue.escalating and issue.assigned
are polled every 30 seconds for every organization, reading issue details only
when something changed. Organizations that install the Codevisor integration
also get them through /hooks/push/sentry within seconds, plus comment.created
and alert.fired. Cloud checks Sentry-Hook-Signature with SENTRY_WEBHOOK_SECRET,
records which organization each installation belongs to, and relays only ids
(and an alert's name and status); each machine reads the issue with its own
token. Both paths use the same event ids, so Codevisor delivers each once.

Adds the Sentry docs page, the deploy secret sync, and getsentry/sentry-mcp as
a reference repo. CODEVISOR_SENTRY_URL and CODEVISOR_SENTRY_MCP_URL point the
plugin at another Sentry, which the tophat used for a fake one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The first-party Sentry plugin now shows in Browse Plugins only for people who
turn on Sentry Plugin in Settings › Developer › Experimental Features. Sentry's
own MCP server (io.sentry/mcp) is back in the catalog for everyone else.

A first-party plugin can name the catalog entry it replaces
(`replaces` in its Codevisor metadata). While the replacement is offered, the
replaced entry is hidden from browsing and describing, so people with the flag
on see one Sentry. Installed copies of either keep working.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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