[Deprecated by Slack] How to configure Slack in your on-prem Sentry


#1

Slack deprecated workspace tokens, please use the legacy Slack integration.

To use Sentry’s new Slack integration you’ll need to create an app in Slack using their Developer preview app. Navigate to Your Apps and click Developer preview under App features.

Click Create a developer preview app.

A window will open to let you name your app and select the Development Slack Workspace you want to connect to your Sentry instance.

After naming your app and connecting your workspace, navigate to Basic Information. Here you’ll find your Client ID, Client Secret, and Verification token that lets your app access the Slack API.

Here’s where you’ll connect your on-premise Sentry instance to your newly created Slack app. Copy your Client ID, Client Secret, and Verification Token to your config.yml file in your Sentry server.

slack.client-id: <'client id'>
slack.client-secret: <client secret>
slack.verification-token: <verification token>

After you update the config.yml you need to restart your Sentry server to continue configuring the Slack app.

Now that you’ve created your app and updated your Sentry config, you can navigate to Interactive Components under Features.

Click Enable Interactive Components and you’ll be able to enter your Request URL (this is the location of your on-premise Sentry) and Options Load URL:

Request URL: https:/your-sentry-server.com/extensions/slack/action/
Options Load URL: https:/your-sentry-server.com/extensions/slack/options-load/

Click Enable Interactive Components and Slack will confirm if the HTTP request to the URL you entered succeeds or fails.

Navigate to OAuth & Permissions to configure the Redirect URLs.

Click Add a new Redirect URL, enter the URL, and click Add. The URL will look like:

https:/your-sentry-server.com/extensions/slack/setup/

Click Save URLs.

On the same page under Scopes in the Select Permission Scopes dropdown menu, search for View some links in messages and add that scope:

Click Save Changes.

Note: You have the option to set Restrict API Token Usage on this page if you want to ensure your Slack is the only one talking to your Sentry instance.

Navigate to Event Subscription and toggle “On”. Here you will enter another Request URL in the following format: https:/your-sentry-server.com/extensions/slack/event/

You’ll see “Verified” when you’ve entered the correct URL.

Note: When you enter the Request URL, Slack tries to verify it. The request will fail if you didn’t configure the client keys/secret and restarted Sentry to ensure those config changes were picked up. If it fails to validate, first make sure your Sentry instance is running and Slack can talk to it (Slack doesn’t have an ip range)

On the same page under Selected Events, click Add Workspace Event and search for link_shared:

On the same page under App Unfurl Domains, click Add Domain to enter your domain and click Done.

At the bottom of the page, click Save Changes.

Now you can use Slack with Sentry! See our documentation on configuring the Slack integration for your projects to take advantage of multi-channel Alert routing with the new integration.


Sentry 9 Release
#2

#3

Is there a way to specify a slack.client-id etc for different Organisations in Sentry?


#4

@_matthanley no as this is a once-per-install configuration, and is done when creating the app within Slack


#5

#6

@jessla thanks a lot for that description, it was very helpful. However, I saw that the usage of the Verification Token is now deprecated by Slack. Instead they recommend to use the Signing Secret. Is this possible already with the slack plugin?

Greetings!


#7

Hi there,

It looks like Slack is deprecating working with workspace tokens. I was trying to set those up for our on-prem instance, but the steps outlined here don’t seem to work anymore.

I cannot navigate to a place where I find the ‘app that uses workspace tokens’. Did I look at the wrong place ? Is there still a way to list that in slack ?

Thanks !
Benjamin


#8

@bsergean I’m also seeing this. This is the error message I get from Slack when I click the “Add Workspace” button in Sentry:

User tokens do not support scope: chat:write

I couldn’t find any options on the app configuration to use a workspace token. I also couldn’t add the “chat:write” permission as it does not exist. The closest matches are “chat:write:bot” and “chat:write:user”.


#9

Hi @backwardspy, Slack deprecated workspace tokens so we don’t have a way for you to use the new integration right now. Here’s a thread you can subscribe to for updates: https://github.com/getsentry/sentry/issues/9004#issuecomment-429179713

In the meantime, you can use the legacy Slack integration and/or webhooks.

Apologies for the inconvenience here.


#10

Thank you for the update, @jessla!
It’s a shame that Slack keeps changing so much in this regard.