getsentry / getsentry/sentry

Not able to create Issue Alert Rule to use dynamic slack channel_name

Open
#24,795 14 comments 3 reactions 0 assignees View on GitHub
Waiting for: Product Owner
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
1d 5h
Merged PRs (30d)
624

Description

## Important Details

How are you running Sentry?

Saas (sentry.io)

## Description

Hello there, We just started using Sentry at our company and are evaluating if it is a viable option for all of our products. We have many teams that owns different applications. We would like to setup the Sentry Alerts in a way that each team can control which slack channel they want to get the notifications when there are errors in the corresponding product areas. While integrating Slack with Sentry, I tried to set a custom tag "channel_name" in our code when Sentry events are sent, and use that tag to send alerts to that particular slack channel dynamically.

Create Alerts UI doesn't seem to have an option to do this. Based on this github issue it seems like this feature was added couple of years ago: https://github.com/getsentry/sentry-plugins/issues/138. Is this possible with the latest version of Sentry?

I did send a support ticket a week ago and haven't received a response yet.

Thanks!

## Steps to Reproduce

1. Create a New Alert Rule
2. Select Issue Alert
3. Pick any Alert condition
4. In the "Then perform these actions" step, pick "Send a Slack notification"
5. Select a Slack workspace and try to enter a slack channel_name that doesn't exist in the workspace
6. Click "Create Alert Rule" or "Save"

For e.g.,
![image](https://user-images.githubusercontent.com/40774045/112884488-69cc1f80-9084-11eb-845a-5328b28bce27.png)

### What you expected to happen

We should be able to set the channel_name based on the tags or other context that is passed through the sentry events. The tags are already accessible in the same UI in the filter condition section.
![image](https://user-images.githubusercontent.com/37280030/112885878-1b1f8500-9086-11eb-90ac-b321d6a7268d.png)

I guess there is a possibility that the channel_name may not exist in which case there won't be any alert sent. Sentry's alerts should be treated like a fire & forget mechanism. Because the same is true if the channel is renamed/deleted after the "Alert Rule" is created.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.