Skip to content

chore(ACI): Add metric for dual processing in metric alerts #91979

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 20, 2025

Conversation

ceorourke
Copy link
Member

Follow up to #91840

The organization_id tag is not showing up in Datadog despite manually allowing it for these metrics (I suspect something higher up is blocking it) so this PR removes that tag and adds a metric behind the logging flag for metric alerts firing so that we can see if they are firing at the same rate as in workflow engine.

@ceorourke ceorourke requested review from a team as code owners May 20, 2025 20:56
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 20, 2025
"organizations:workflow-engine-metric-alert-dual-processing-logs",
self.subscription.project.organization,
):
metrics.incr("dual_processing.alert_rules.fire")
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't need the detection type to filter out anomaly detection alerts (which are not yet migrated) because those get fired and resolved in the if block above this

Copy link

codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

⚠️ Parser warning

The parser emitted a warning. Please review your JUnit XML file:

Warning while parsing testcase attributes: Limit of string is 1000 chars, for name, we got 2083 at 1:157236 in /home/runner/work/sentry/sentry/.artifacts/pytest.junit.xml
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #91979      +/-   ##
==========================================
+ Coverage   86.43%   87.63%   +1.19%     
==========================================
  Files       10355    10355              
  Lines      587357   587383      +26     
  Branches    22586    22586              
==========================================
+ Hits       507671   514742    +7071     
+ Misses      79259    72214    -7045     
  Partials      427      427              

Comment on lines +474 to +477
if features.has(
"organizations:workflow-engine-metric-alert-dual-processing-logs",
self.subscription.project.organization,
):
Copy link
Member

Choose a reason for hiding this comment

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

nit: pull into its own variable so we don't have to check the feature flag twice here

@ceorourke ceorourke merged commit 98c39b9 into master May 20, 2025
59 checks passed
@ceorourke ceorourke deleted the ceorourke/update-dual-processing-metrics branch May 20, 2025 22:31
andrewshie-sentry pushed a commit that referenced this pull request May 20, 2025
Follow up to #91840

The `organization_id` tag is not showing up in Datadog despite manually
allowing it for these metrics (I suspect something higher up is blocking
it) so this PR removes that tag and adds a metric behind the logging
flag for metric alerts firing so that we can see if they are firing at
the same rate as in workflow engine.
ceorourke added a commit that referenced this pull request May 22, 2025
Follow up to #91979 to only
track when there is at least one action in `process_workflows` and
differentiate between fires and resolves in the subscription processor.
Previously I wanted them added together but now that we've realized
we're not reaching `process_workflows` for resolutions I want to be able
to determine if the number of fires is accurate.
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.

4 participants