Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Feature request: let user choose tags to show in Slack notification #7

Closed
lorin opened this issue Jul 30, 2014 · 18 comments
Closed

Feature request: let user choose tags to show in Slack notification #7

lorin opened this issue Jul 30, 2014 · 18 comments

Comments

@lorin
Copy link

lorin commented Jul 30, 2014

I'd love to be able to see if a particular Slack notification was related to production or staging. The Sentry plugin would need to be configurable to allow the user to select which tags to send to Sentry, so I could specify the "environment" tag.

Is this a feature you'd consider accepting? If so, I can take a shot at implementing it.

@lorin lorin changed the title Feature request: let user choose tags to show in notification Feature request: let user choose tags to show in Slack notification Jul 30, 2014
@dcramer
Copy link
Member

dcramer commented Jul 30, 2014

As of HEAD in Sentry there is a feature which would allow you to do this (the Rules within a project).

@dcramer dcramer closed this as completed Jul 30, 2014
@lorin
Copy link
Author

lorin commented Jul 30, 2014

I see the interface for triggering events by tag in the Rules page. But I wasn't suggesting triggering by tag, I just went to send the tag value out to Slack. i.e., I want to see "environment=staging" or "environment=production" in the Slack message.

@dcramer
Copy link
Member

dcramer commented Jul 30, 2014

We actually intentionally stopped sending tags since they became misleading (ie they only affect a single entity in the aggregate). I'm not against revisiting this decision but maybe there's a better approach if the primary use case is something like an environment. 

On Wed, Jul 30, 2014 at 10:42 AM -0700, "Lorin Hochstein" notifications@github.com wrote:

I see the interface for triggering events by tag in the Rules page. But I wasn't suggesting triggering by tag, I just went to send the tag value out to Slack. i.e., I want to see "environment=staging" or "environment=production" in the Slack message.


Reply to this email directly or view it on GitHub.

@lorin
Copy link
Author

lorin commented Jul 30, 2014

Here's our use case: we want to get notifications both for errors that occur on production and errors that occur on staging. We want to know at a glance from the Slack message (without needing to click through to getsentry.com) whether the error happened in production or in staging.

Here's one way that would work for us. Allow the user to attach a custom string to a rule (e.g., "staging"). When a rule fires, append the custom message to the notification. We would just need to have a separate Sentry rule for staging and for production (which we already have).

This would be really nice for us, because we have multiple staging environments, and so we could set up separate rules for each environment "Error occurred on staging foo", "Error occurred on staging bar".

@dcramer
Copy link
Member

dcramer commented Jul 30, 2014

Are you worried about not seeing notifications when tags dont change?

i.e. you get the first notification with env=prod, then it happens in staging and you dont get notified again

(I realize the above may not be accurate if you've setup rules to notify on every event, but thats a less common case)

@lorin
Copy link
Author

lorin commented Jul 30, 2014

We have Sentry configured to resolve an event after an hour (which seems to be the shortest increment of time that we can select).

Yes, a staging error would mask a production error if the same errors occurred within the span of an hour, and I didn't click through from Slack to the Sentry page to see what the distribution looked like, but it's not something I'm really worried about. I'd prefer to have the false negatives: after all, I can always click on the Slack staging notification errors if I'm feeling paranoid.

@dcramer dcramer reopened this Jul 31, 2014
@pjbull
Copy link

pjbull commented Sep 2, 2014

👍 Wanted to add a +1. We're in the same scenario where we have test/prod servers and want the tags to display in Slack.

@CaliLuke
Copy link

I would also like this, but in our case we want to add the user's name so we can follow up proactively and make sure they don't have a bad time with the application. Might be a special case since we're aggressively "white glove" but I don't think it's an unreasonable thing to do. Just having a space to compose the json payload in the integration config would be enough.

@dcramer
Copy link
Member

dcramer commented Jul 24, 2015

Pushed up some changes today which allow you to include both triggering rules as well as tags

@dcramer dcramer closed this as completed Jul 24, 2015
@joshma
Copy link

joshma commented Jul 24, 2015

Thanks @dcramer! Are these accessible from the "Rules" settings? Will they be live on app.getsentry.com soon?

@dcramer
Copy link
Member

dcramer commented Jul 24, 2015

Sorry there's a mix of things going on here:

  1. You can choose which tags to notify on via Rules (you can also do this with other event attributes)
  2. The notifications can now include the tags so things are more obvious

@joshma
Copy link

joshma commented Jul 24, 2015

Is the easiest way to force a tag to show to just require it does not equal SOME_IMPOSSIBLE_VALUE? Given 624ba94 I'm assuming the changes to enable it just haven't been rolled out to sentry.com yet? (I'm in no hurry; just checking that I'm not missing anything.)

@dcramer
Copy link
Member

dcramer commented Jul 24, 2015

@joshma if you just care about display, you tick the box and all tags will show up:

https://www.dropbox.com/s/sawj8wfhbbnm9o6/Screenshot%202015-07-24%2018.15.19.png?dl=0

(this is with, and without)

@dcramer
Copy link
Member

dcramer commented Jul 24, 2015

Oh, and to be clear, they're in the middle of rolling out right now (should be live in 10m max)

@joshma
Copy link

joshma commented Jul 24, 2015

👍 sweet, many thanks

@AdrianAntunez
Copy link

@dcramer , the dropbox link is giving to me 404 not found :( Anyway, with the new slack integration, I can see that in the rules I can choose which tags should be displayed, but what should I put if I want to show all of them in slack message? I couldn't find it in the documentation...

P.S: Sorry for commenting in a really old issue...

@dcramer
Copy link
Member

dcramer commented Mar 27, 2019

@AdrianAntunez tags are unbounded so showing them all isn't something that we offer

@m1nty
Copy link

m1nty commented Jun 17, 2020

@dcramer, Would it be possible to include info from the "Additional Data" section from an Issue on the Slack message? That would be pretty cool as it can keep the Tags section clean as well.

P.S: Sorry for also commenting on a near 6 year old issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants