bcnmy / bundler

4337 Typescript Bundler
MIT License
8 stars 2 forks source link

Chain-specific health checks & /info endpoint #643

Closed TheDivic closed 5 months ago

TheDivic commented 5 months ago

πŸ“– Context

Type of change

Why are we doing this?

Related issues:

What did we do?

How Has This Been Tested?

/health/80002

βœ… Completely healthy instance

{
  "chainId": 80002,
  "healthy": true,
  "errors": [],
  "latencies": {
    "mongo": 0.006820833,
    "simulator": 0.005334,
    "redis": 0.00903675,
    "gasPrice": 0.007465792,
    "rpc": 0.429265292,
    "relayers": 0.471145042,
    "total": 0.473038334
  }
}

❌ Broken Redis

{
  "chainId": 80002,
  "healthy": true,
  "errors": ["Redis is not working as expected"],
  "latencies": {
    "mongo": 0.009837333,
    "simulator": 0.008266167,
    "rpc": 0.438564875,
    "relayers": 0.477082875,
    "redis": 46.763403313,
    "gasPrice": 47.361171064,
    "total": 47.363006646
  }
}

πŸ‘€ How do I review this?

You can run the tests related to this PR with:

Also it's useful if you run the service locally and manually send a health check request with