feat(slack): Add metrics for slack reinstall nudge outcomes#118564
Merged
Conversation
Comment on lines
19
to
20
|
|
||
| # only 10% of the alerts should have the nudge blocks |
Contributor
There was a problem hiding this comment.
Bug: The function returns early when the feature flag is disabled but fails to increment a metric, creating an observability gap in tracking nudge outcomes.
Severity: LOW
Suggested Fix
Increment a new metric before the early return when the feature flag organizations:slack-reinstall-nudge-on-issue-alert is disabled. This will provide visibility into this specific outcome, aligning with the other metric tracking in the function.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: src/sentry/integrations/slack/utils/nudge.py#L19-L20
Potential issue: The function `should_send_nudge_for_reinstall` returns early if the
feature flag `organizations:slack-reinstall-nudge-on-issue-alert` is disabled, but this
exit path does not increment a metric. Other paths, such as skipping due to a random
check or weekly limit, do have corresponding metrics. This omission creates an
observability gap, making it difficult to distinguish why a nudge was not sent. It
prevents monitoring systems from tracking which organizations have the feature disabled,
which goes against the pull request's stated goal of adding comprehensive metrics for
nudge outcomes.
Did we get this right? 👍 / 👎 to inform future reviews.
Member
Author
There was a problem hiding this comment.
not caring about feature flag is okay imo
joseph-sentry
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
we send "nudges" -- a short CTA after alert messages -- for a subset of alerts sent to Slack channels to either update their slack app installation, or to remind them they can @ mention sentry anywhere to start debugging their system.
Let's add some metrics for this nudge so we know when we send the nudge vs. when we do not.
also see:
#118288