Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slack integration for Sentry on private domains. #81902

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wolandspb
Copy link

If Sentry is behind private domain, it's impossible to set up slack integration. This PR should fix it by adding slack.url-prefix option, allowed you to use external domain to set up slack integration.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@getsantry
Copy link
Contributor

getsantry bot commented Jan 1, 2025

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added Stale and removed Stale labels Jan 1, 2025
@wolandspb
Copy link
Author

@cathteng I apologize for the mention, but this PR stuck for several weeks. I'm unsure who to ask for review. Given your approval of the previous Slack-related PR, would you be able to review this one, or perhaps suggest someone who could?

@cathteng
Copy link
Member

cathteng commented Jan 3, 2025

Hi @wolandspb , the developer docs mention you can set the redirect link on the Slack side https://develop.sentry.dev/integrations/slack/, does this work for you?

Screenshot 2025-01-03 at 12 36 09

On self-hosted you'll need to create your own Slack app

@wolandspb
Copy link
Author

the developer docs mention you can set the redirect link on the Slack side https://develop.sentry.dev/integrations/slack/, does this work for you?

Sentry isn't finding the redirect URL on the slack side because it doesn't match the system.url-prefix. I've already tested this.

@cathteng
Copy link
Member

cathteng commented Jan 3, 2025

I think I'm missing some context. When we test self-hosted locally we use system.url-prefix in the redirect url in Slack and it works, because it needs to hit the domain where your Sentry instance is located. Do you need this because your slack.url-prefix is different from system.url-prefix? Can you explain why it would be different?

@wolandspb
Copy link
Author

Sorry, I could have explained this better in the PR description.
Our system.url-prefix is a domain resolvable only by our internal DNS and accessible only from the company network for security. This PR introduces a configurable slack.url-prefix, distinct from system.url-prefix. This allows setting it to an externally resolvable domain accessible from the internet, while restricting access to only <slack.url-prefix>/extensions/slack requests.
I believe there are many users, like ourselves, want to receive alerts in Slack but prefer not to make Sentry publicly accessible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants