Skip to content

[Feat] Send self-hosted Roomote errors to Sentry - #1181

Draft
roomote-roomote[bot] wants to merge 2 commits into
developfrom
feature/sentry-error-reporting-2ykqax1o0aoqj
Draft

[Feat] Send self-hosted Roomote errors to Sentry#1181
roomote-roomote[bot] wants to merge 2 commits into
developfrom
feature/sentry-error-reporting-2ykqax1o0aoqj

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Matt Rubens. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Expose one runtime SENTRY_DSN across production Compose, installer, and Coolify service contracts.
  • Use that DSN for server-side web, API, controller, BullMQ, and task-worker errors.
  • Pass a scoped worker DSN through every compute-provider launch while preventing provider-specific environment overrides.
  • Document that published self-hosted images do not configure browser-bundle reporting at container runtime.

Why this change was made

Roomote's services already contained Sentry instrumentation, but standard self-hosted deployment contracts did not pass a configured DSN into those services. Ephemeral task workers also dropped it at the controller-to-worker boundary, so worker errors could not reach the operator's Sentry project.

Impact

Self-hosted operators can set SENTRY_DSN once to report server-side web, API, controller, BullMQ, and task-worker errors. Runtime NEXT_PUBLIC_* injection was removed because Next.js browser values are fixed when the web image is built, not when its container starts.

All supported Compose shapes rendered successfully during deployment validation. The later Caddy adaptation check could not run because this sandbox does not expose a Docker socket; focused tests, static checks, documentation validation, and pre-push checks passed.

@roomote-community

roomote-community Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

1 issue outstanding. See task

  • deploy/compose/docker-compose.prod.yml:73 Runtime NEXT_PUBLIC_SENTRY_DSN injection does not configure the browser bundle in self-hosted images.
  • apps/web/src/instrumentation.ts:5 The new Sentry DSN resolver is absent from the instrumentation test mock, causing the focused web tests to fail.

Reviewed d827a17

Comment thread deploy/compose/docker-compose.prod.yml Outdated
@roomote-roomote

roomote-roomote Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Updated the PR to one supported operator-facing SENTRY_DSN for server-side web, API, controller, BullMQ, and task-worker errors. Removed ineffective runtime NEXT_PUBLIC_* injection, documented the browser-bundle limitation, and resolved the review thread in d827a174.


import {
isWebSentryEnabled,
resolveWebSentryDsn,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new import is not reflected in src/__tests__/instrumentation.test.ts, which manually mocks @/lib/sentry-config without resolveWebSentryDsn. As a result all three instrumentation tests now fail at register() with Vitest's missing-export error. Add the resolver to that mock (and ideally assert the resolved DSN) so the web test suite remains runnable.

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