getsentry / getsentry/sentry

Alerts event matching rules for: stacktrace.filename does not consider the last file in the stack.

Open
#77,005 1 comment 2 reactions 0 assignees View on GitHub
Feature Product Area: Alerts
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
22h 21m
Merged PRs (30d)
586

Description

### Problem Statement

Hi everyone,

I've create a few alerts to be triggered based on the stacktrace event rule (_filename_), however I would like to match only if this filename is part of last file of my stacktrace list (where the exception occurred).

Right now, if any of these file names are being matched in-between the stack trace, the alert gets triggered :/

Thanks for the help!

### Solution Brainstorm

When we add a filter match rule for an Alert, we could have an option to say that we want to match certain rule only if the last file (or the file where the exception was triggered) matches the rule, e.g.:

![Image](https://github.com/user-attachments/assets/4315b8a6-ecdc-46fc-a5b1-ff8c5cc69e42)

### Product Area

Unknown

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.