getsentry / getsentry/sentry

Slack issue alert links use the wrong environment query parameter

Open
#123,541 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Product Area: Alerts Waiting for: Product Owner
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
21h 23m
Merged PRs (30d)
607

Description

Environment

SaaS (https://sentry.io/)

Steps to Reproduce
  1. Use an Issue Alert configured for the production environment.
  2. Configure Slack as an alert action.
  3. Trigger the alert with an event whose environment is production.
  4. Open the issue link included in the Slack notification.
  5. Check the environment query parameter in the generated URL.

The issue and alert are correctly associated with production.

Expected Result

The issue link generated in the Slack notification should preserve the environment that triggered the alert.

For a production alert, the generated URL should contain:

environment=production

Actual Result

The Slack notification contains an issue link with:

environment=development

even though the alert was triggered by a production event and the alert rule is configured for the production environment.

For example, the generated link uses an environment filter different from the environment that triggered the alert.

As a result, clicking the Slack notification opens Sentry with the wrong environment filter applied.

Product Area

Alerts

Link

No response

DSN

No response

Version

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Slack alert action that generates the issue URL, using the reproduction steps with a production environment. Verify that the generated link preserves the triggering environment and confirm the Slack notification opens the issue with the production filter applied.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.