π v0.9.7 - Operation Health Monitoring (Schema Introspection Alternative)
π Operation Health Monitoring
Problem Solved: Schema Introspection Disabled
During implementation of schema monitoring, we discovered that MonarchMoney disables GraphQL introspection for non-admin users. This release provides an even better solution: operation-based health monitoring.
π New Operation Health Monitoring
Why This Approach is Better
- β Tests Real Operations: Validates what users actually use
- β Detects Actual Failures: Finds operations that are broken for users
- β No Admin Access Needed: Works with regular user accounts
- β Comprehensive Analysis: Categorizes schema vs business logic errors
Core Features
π€ Automated Daily Monitoring
- GitHub Actions Workflow: Runs daily at 6 AM UTC
- Automatic Issue Creation: Creates detailed GitHub issues for problems
- Health Artifacts: Stores comprehensive health check results
π§ͺ Operation Testing
# Manual health check
python tools/operation_health_checker.py --email EMAIL --password PASS --mfa-secret SECRET
# Quick check
python tools/operation_health_checker.py --email EMAIL --password PASS --quickπ Comprehensive Analysis
The system tests key operations across all services:
- AccountService:
get_accounts - TransactionService:
get_transaction_categories,get_transactions - InvestmentService:
get_security_details - BudgetService:
get_budgets
π Smart Error Classification
Schema Errors (Breaking):
- "Something went wrong while processing"
- "Cannot query field"
- "Unknown field"
Business Logic Errors (Expected):
- Authentication failures
- Invalid parameters
- Empty results
π Detailed Reporting
GitHub Issues Include:
- Overall health status (Healthy/Degraded/Unhealthy)
- Success rate percentage
- Schema error count and details
- Field availability changes
- Service-by-service breakdown
- Actionable recommendations
Health Check Artifacts:
- JSON results with full details
- Markdown reports for humans
- Historical tracking data
π― Real-World Discovery
The first health check run immediately discovered actual issues:
π¨ Schema Errors Found:
TransactionService.get_transaction_categories: "Something went wrong" errorBudgetService.get_budgets: "Something went wrong" error
β οΈ Field Changes Detected:
AccountService.get_accounts: Missing expected fieldsInvestmentService.get_security_details: Missing expected fields
This proves the approach works and provides immediate value by detecting real problems affecting users.
π Integration with Robust Operations
This monitoring system works perfectly with the robust GraphQL operations from v0.9.6:
- Health checks detect issues β Automatic GitHub issues created
- Developers update robust operations β Field specifications adjusted
- Operations adapt automatically β Graceful handling of schema changes
- Users experience reliability β No more "Something went wrong" errors
π Usage Examples
Daily Automated Monitoring
The workflow runs automatically and will:
- Test all critical operations
- Create GitHub issues for problems
- Store detailed health reports
- Track changes over time
Manual Health Checks
# Full health check with reports
python tools/operation_health_checker.py \\
--email your-email@example.com \\
--password your-password \\
--mfa-secret YOUR_MFA_SECRET \\
--output ./health_reports
# Exit codes indicate health status:
# 0 = Healthy, 1 = Unhealthy, 2 = DegradedCI/CD Integration
- name: Check API Health
run: |
python tools/operation_health_checker.py \\
--email ${{ secrets.MM_EMAIL }} \\
--password ${{ secrets.MM_PASSWORD }} \\
--mfa-secret ${{ secrets.MM_MFA_SECRET }}π‘οΈ Monitoring Benefits
- Proactive Detection: Find issues before users report them
- Comprehensive Coverage: Test all critical user operations
- Automatic Notifications: GitHub issues with detailed analysis
- Historical Tracking: Monitor API stability over time
- Zero Admin Requirements: Works with any MonarchMoney account
π§ Technical Implementation
Operation Health Checker (tools/operation_health_checker.py):
- Comprehensive CLI tool for manual health checks
- Detailed reporting in JSON and Markdown formats
- Configurable test coverage and output options
GitHub Actions Workflow (.github/workflows/operation-health-check.yml):
- Daily automated health monitoring
- MFA authentication support
- Artifact storage and issue creation
- Slack integration (optional)
π What's Next
This monitoring system provides the foundation for:
- Trend Analysis: Track API stability over time
- Performance Monitoring: Measure operation response times
- Change Detection: Identify schema modifications immediately
- Reliability Metrics: Generate uptime and success rate reports
Note: This approach turned out to be more valuable than traditional schema introspection because it tests the actual user experience rather than just the schema definition.
Full Changelog: v0.9.6...v0.9.7