Closed dmclain closed 2 years ago
This could probably close #7 for most users
I imagined rules coming into play for this stuff but I'm going to give it a bit of thought on the API.
May reverse my stance on not passing project into get_rules which would remove the bad behavior here.
Oh, i didn't actually implement this by using get_rules, I mutated the rules registry at import time (which is explicitly not how things should happen), i'll get a fix to do it according to the v2 plugin up sometime this week, hopefully.
Whats the status of this? Is there documentation on how to send messages to rooms via the current 0.3.0 version? or is this feature still needed?
Would love to have something like this, we want different channels for different errors
Same here, this would be great for our team.
@dmclain mind rebasing this?
I sat down last night to rebase this work, and I realized that the rules API hasn't changed with regards to per-project application, so this approach will still result in projects without slack integration displaying the Send a notification to a Slack {room} labeled {label}
action to projects not using slack. This is probably acceptable for self hosted, but is likely an issue for getsentry.
Said differently, this is still blocked from upstream by getsentry/sentry#1628
We are aiming to really push forward some Notifications agenda over the next few months, so hopefully this will get resolved in that time window as well. Our goal is to basically support multiple instances of an integration via something akin to the rules system.
Pros
Merging this will result in the creation of a new EventAction, to send a slack notification to a particular room:
Upon selecting it the user will get a form with 2 fields
From the above example, here is a notification in #infra-team after sending a test message with raven test:
It will send to a channel if it's prefixed with # or a user if prefixed with @, though there's not really a ton of flexibility in the rules forms right now to indicate that, so a possible improvement is to create 2 rules, one which validates and noramalizes to a username and another for channels.
Cons
The rules API isn't really published or solidified, so this is way out there. Once this plugin is installed and activated in any project the rule will show in every project.