Skip to content
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

Treat unhandled Monte Carlo anomalies as data quality errors #1051

Merged
merged 2 commits into from
Dec 24, 2024

Conversation

mars-lan
Copy link
Contributor

@mars-lan mars-lan commented Dec 23, 2024

🤔 Why?

In addition to user-defined monitors, Monte Carlo also supports automatic anomaly detection. We'd like to surface these anomalies as data quality issues, only if they're triggered and not marked as handled (acknowledged/expected/fixed) by the user

🤓 What?

  • Use getAlerts GraphQL query to retrieve all ANOMALIES alerts and map unhandled ones to failed data monitors.
  • Generalize _convert_dataset_name into _extract_dataset_name for MCON to dataset name parsing.
  • Add configs to opt into the new behavior and to control the lookback length.

🧪 Tested?

Verified before & after against a production instance.

☑️ Checks

  • My PR contains actual code changes, and I have updated the version number in pyproject.toml.

@mars-lan mars-lan requested a review from alyiwang December 23, 2024 22:20
@mars-lan mars-lan force-pushed the marslan/sc-29671/monte-carlo-observability branch 2 times, most recently from 6b168ba to d4f07d4 Compare December 23, 2024 22:46
Copy link

github-actions bot commented Dec 23, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
13525 12111 90% 85% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
metaphor/monte_carlo/config.py 100% 🟢
metaphor/monte_carlo/extractor.py 90% 🟢
TOTAL 95% 🟢

updated for commit: 165f048 by action🐍

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 90.56604% with 5 lines in your changes missing coverage. Please review.

Project coverage is 89.54%. Comparing base (9b2b596) to head (165f048).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
metaphor/monte_carlo/extractor.py 90.19% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1051      +/-   ##
==========================================
+ Coverage   89.53%   89.54%   +0.01%     
==========================================
  Files         211      211              
  Lines       13481    13525      +44     
==========================================
+ Hits        12070    12111      +41     
- Misses       1411     1414       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mars-lan mars-lan force-pushed the marslan/sc-29671/monte-carlo-observability branch from d4f07d4 to a500500 Compare December 24, 2024 17:03
@mars-lan mars-lan marked this pull request as ready for review December 24, 2024 17:21
@mars-lan mars-lan enabled auto-merge (squash) December 24, 2024 17:21
Copy link
Contributor

@alyiwang alyiwang left a comment

Choose a reason for hiding this comment

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

Otherwise, LGTM

metaphor/monte_carlo/README.md Outdated Show resolved Hide resolved
@mars-lan mars-lan requested a review from alyiwang December 24, 2024 18:04
@mars-lan mars-lan merged commit b4913d5 into main Dec 24, 2024
6 checks passed
@mars-lan mars-lan deleted the marslan/sc-29671/monte-carlo-observability branch December 24, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants