Skip to content

fix: use SENTRY_ORG_SLUG for footer Sentry links#321

Merged
dcramer merged 1 commit intomainfrom
fix/footer-sentry-link-org-slug
May 10, 2026
Merged

fix: use SENTRY_ORG_SLUG for footer Sentry links#321
dcramer merged 1 commit intomainfrom
fix/footer-sentry-link-org-slug

Conversation

@sentry-junior
Copy link
Copy Markdown
Contributor

@sentry-junior sentry-junior Bot commented May 10, 2026

Summary

Fix broken Sentry URLs in the Slack reply footer. The footer ID link now uses SENTRY_ORG_SLUG env var instead of extracting a numeric org ID from the DSN host.

Changes

  • footer.ts: Remove getDsnOrgId, ORG_ID_HOST_RE, and toOptionalString (local duplicate). Add getSentryOrgSlug() reading from process.env.SENTRY_ORG_SLUG. For SaaS DSNs, emit subdomain-routed URLs (https://{slug}.sentry.io/...). For self-hosted, keep /organizations/{slug}/ path with the slug.
  • init.ts: Add SENTRY_ORG_SLUG to .env.example scaffold.
  • footer-sentry-link.test.ts: Update tests for new behavior — SaaS subdomain routing, self-hosted /organizations/ path, plain ID when slug is missing (even with numeric org data present).

Deploy note

Set SENTRY_ORG_SLUG=sentry in the junior-prod environment for the link to work. Without it, the ID renders as plain text (safe fallback, same as today when org is missing).

Closes #320

Replace numeric org ID extraction (getDsnOrgId, client orgId) with
SENTRY_ORG_SLUG env var. For SaaS DSNs, emit subdomain-routed URLs
(https://{slug}.sentry.io/...) instead of the legacy /organizations/
path. Self-hosted retains /organizations/{slug}/ with the slug.

Closes #320

Co-Authored-By: Claude (anthropic/claude-opus-4.6) <noreply@sentry.io>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment May 10, 2026 1:43am

Request Review

@dcramer dcramer merged commit cc25ffe into main May 10, 2026
15 checks passed
@dcramer dcramer deleted the fix/footer-sentry-link-org-slug branch May 10, 2026 16:04
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.

Footer Sentry link uses numeric org ID and legacy URL pattern

1 participant