wormhole-foundation / wormhole-explorer

We could have named this super-parakeet. Tweet tweet.
Other
26 stars 22 forks source link

[Implement KPIs] Implement API Uptime monitoring #1460

Open SamantaCasal opened 1 month ago

SamantaCasal commented 1 month ago

Previous spike:

  1. Develop cron job that queries the API. Problem, it would run on our infra
  2. Look into a third party tool such as https://grafana.com/products/cloud/features/#synthetic-monitoring
  3. Currently we have metrics from the cluster PoV (here ), but not from the client. The KPI aims to add visibility from the outside user’s PoV.
  4. Idea: new CRON job that queries the API (decide later which ones to hit) and records whether it was successful or not, and the reason. Use retries.

TODO:

Source: DOC

sebastian-xlabs commented 4 weeks ago

I have spoken with @M-Picco and the endpoints we will use to query the http_code are:

https://api.wormholescan.io/api/v1/health
https://api.wormholescan.io/api/v1/operations
https://api.wormholescan.io/api/v1/x-chain-activity/?timeSpan=7d

We can use the AWS Operations account to query the application using a lambda function that will be triggered by an EventBridge rule (cron) every minute. The metrics can be stored in CloudWatch and we can get them using Grafana and setting CloudWatch as a data source.

SamantaCasal commented 3 weeks ago

Update:

https://grafana.ops.xlabs.xyz/d/adhnkd4xndddsa/wormscan-metrics?orgId=1

sebastian-xlabs commented 3 weeks ago

The PR is this https://github.com/XLabs/ops-aws-iac/pull/342