fix: use SENTRY_ORG_SLUG for footer Sentry links#321
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Fix broken Sentry URLs in the Slack reply footer. The footer ID link now uses
SENTRY_ORG_SLUGenv var instead of extracting a numeric org ID from the DSN host.Changes
footer.ts: RemovegetDsnOrgId,ORG_ID_HOST_RE, andtoOptionalString(local duplicate). AddgetSentryOrgSlug()reading fromprocess.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: AddSENTRY_ORG_SLUGto.env.examplescaffold.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=sentryin 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