Rates API
Open Source

Monitoring

Learn how the Rates API monitoring system works to ensure reliability and uptime.

Rates API uses GitHub Actions for three operational feedback loops: CI, scheduled scraping, and uptime monitoring.

Uptime Monitoring

The API Uptime Monitoring workflow runs every 15 minutes and:

  1. Installs dependencies with Bun
  2. Checks the health of all API endpoints
  3. Fails the workflow if one or more endpoints are unavailable
  4. Creates a GitHub issue with failure details

Monitored Endpoints

  • API health and freshness
  • Mortgage rate list, detail, and time-series routes
  • Personal loan list, detail, and time-series routes
  • Car loan list, detail, and time-series routes
  • Credit card list, detail, and time-series routes
  • OpenAPI UI and JSON

Alert System

When an endpoint fails, the monitoring workflow creates a GitHub issue, labels it incident and high-priority, mentions the repository owner, and includes the failing endpoint output.

Required Permissions

permissions:
  issues: write
  contents: read

If using an organization with restricted permissions, ensure repository settings allow GitHub Actions to create issues and create the required incident and high-priority labels.

Scraping Health

The scraping workflow runs hourly and writes to the remote D1 database. It verifies D1 access before scraping and verifies saved data after the scraper scripts finish.

CI Health

Pull requests run:

  • Biome, TypeScript, docs type generation, and tests through bun run check
  • API deploy dry-run
  • Docs OpenNext build
  • Docs deploy dry-run
  • Fallow static analysis
  • CodeQL analysis

Extending Monitoring

  • Add new endpoints to apps/api/bin/uptime-check.ts.
  • Add docs checks when docs-only routes become critical.
  • Add notification channels if GitHub issues are not enough.
  • Add data freshness thresholds if stale data becomes more important than endpoint availability.

On this page