Skip to content

Sentry: drop browser-injected script errors in the cloud app; one insert per adapter import - #839

Merged
keysersoft merged 2 commits into
mainfrom
keysersoft/sentry-noise-import-batch
Oct 3, 2026
Merged

keysersoft merged 2 commits into
mainfrom
keysersoft/sentry-noise-import-batch

Conversation

@keysersoft

Copy link
Copy Markdown
Contributor

Open Sentry issues on 3 Oct, checked against the work in the other workspaces and open PRs (none covers them):

ANYTHINGMCP-CLOUD-FRONTEND-9, -A (+ -8): one session, Chrome on iOS 16.7 with a pt-BR locale on /login, three errors in one second. The frames point at lines 191 and 425 of the document; /login has 12 lines and none of our chunks is on the stack: Chrome's injected translate helper. The browser SDK now drops errors with a stack and no frame in a .js file, exactly like the site does since anythingmcp-website#297. Frontend test in tests/e2e/sentry-injected-scripts.spec.ts. FRONTEND-8 ("Error: La", no stack) cannot be told apart and stays reported.

ANYTHINGMCP-CLOUD-BACKEND-5 (N+1, POST /api/adapters/:slug/import): the import created each tool with its own INSERT (40-odd for Telegram Bot). Now one createMany({ skipDuplicates: true }); if the batch is refused, it inserts one by one as before so only a bad row is left out. Checked against a freshly migrated Postgres (null JSON columns, duplicate skipped, isEnabled: false kept). Tests for the batch and the fallback; adapters suite passes.

No overlap with #834 (it touches other hunks of adapters.service.ts).

…ert per adapter import

- Frontend: the same filter as the site. Chrome on iOS translating /login
  overflowed its own injected helper (frames at lines 191 and 425 of a
  12-line document). Errors with a frame in our chunks, or without a stack,
  are still reported. Fixes ANYTHINGMCP-CLOUD-FRONTEND-9, ANYTHINGMCP-CLOUD-FRONTEND-A
- Adapter import inserts its tools with one createMany instead of one
  insert per tool, falling back to one by one if the batch is refused.
  Fixes ANYTHINGMCP-CLOUD-BACKEND-5
@keysersoft
keysersoft force-pushed the keysersoft/sentry-noise-import-batch branch from 64ca151 to 417217b Compare October 3, 2026 16:06
@keysersoft
keysersoft enabled auto-merge (squash) October 3, 2026 16:23
@keysersoft
keysersoft merged commit a309b42 into main Oct 3, 2026
13 checks passed
@keysersoft
keysersoft deleted the keysersoft/sentry-noise-import-batch branch October 3, 2026 16:26
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant