getsentry / sentry-slack

DEPRECATED Slack integration for Sentry
http://getsentry.com
BSD 3-Clause "New" or "Revised" License
139 stars 40 forks source link

Add ability to send to arbitrary rooms with rules #15

Closed dmclain closed 2 years ago

dmclain commented 9 years ago

Pros

Merging this will result in the creation of a new EventAction, to send a slack notification to a particular room:

citools_settings___sentry

Upon selecting it the user will get a form with 2 fields

citools_settings___sentry

From the above example, here is a notification in #infra-team after sending a test message with raven test:

screenshot_5_16_15__12_02_am

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.

dmclain commented 9 years ago

This could probably close #7 for most users

dcramer commented 9 years ago

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.

dmclain commented 9 years ago

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.

rocktavious commented 9 years ago

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?

allaire commented 8 years ago

Would love to have something like this, we want different channels for different errors

mjdavies commented 8 years ago

Same here, this would be great for our team.

SEJeff commented 8 years ago

@dmclain mind rebasing this?

dmclain commented 8 years ago

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

dcramer commented 8 years ago

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.