Skip to content

feat: Track alert misfires on EAP #90794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 2, 2025

Conversation

shruthilayaj
Copy link
Member

Add some logic to track false positives and false negatives on alert misfires.

@shruthilayaj shruthilayaj requested a review from a team as a code owner May 1, 2025 22:02
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 1, 2025
@@ -196,10 +201,10 @@ def get_mismatch_type(mismatches: dict[int, dict[str, float]]):
if all_rpc_values_zero:
return MismatchType.RPC_ALWAYS_ZERO, many_low_conf_buckets, many_low_sample_rate_buckets

if snql_always_lower:
if snql_always_lower and total_buckets - len(mismatches) < 2:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

snql can have an extra bucket (because of how we group by timestamps)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious, is snql the query layer we use via snuba?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nsdeschenes yes - it stands for Snuba Query Language (docs) it used to be the primary way we (the sentry backend) would query clickhouse via snuba. but with the new RPCs, it's not longer the case (although the platform itself may or may not use SnQL under the hood)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmmm i see i see, thank you!

Copy link

codecov bot commented May 1, 2025

Codecov Report

Attention: Patch coverage is 97.67442% with 1 line in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/discover/compare_timeseries.py 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #90794      +/-   ##
==========================================
+ Coverage   87.78%   87.81%   +0.03%     
==========================================
  Files       10274    10282       +8     
  Lines      582608   583565     +957     
  Branches    22567    22567              
==========================================
+ Hits       511423   512459    +1036     
+ Misses      70756    70677      -79     
  Partials      429      429              

@shruthilayaj shruthilayaj merged commit d299f53 into master May 2, 2025
60 checks passed
@shruthilayaj shruthilayaj deleted the shruthi/feat/track-misfires-on-comparison branch May 2, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants