-
Notifications
You must be signed in to change notification settings - Fork 5
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
API-2: [feat. request]: Add health check endpoint(s) to support a public status page #125
Comments
It would also be nice if you could include information around: Rewards Cycle Time These are other operational data our community cares about. Maybe this doesn't fit well into changes in the API, but if you can easily build in metrics points/health checks that would be nice. Cycles should occur every 2 hours but is sometimes late, more than 4-6 hours is bad/go red. This is a suggestion not a requirement. |
Those are good suggestions, @BenLeibig but probably out of scope of this particular issue which is focused on health checks for infrastructure (e.g. uptime/downtime for subgraphs, APIs, smart contracts, etc.) so I created a separate issue for this: #129 |
I'd also recommend having your healthcheck endpoint return JSON so that it can be called directly from sites, and then we can write a little job to collect data from the api and present it in prometheus form. That code can even be part of daowatch/scout instead of the main API so you can just deal with JSON there which is cleaner. |
Support for YAML within TypeScript as configuration does not seem to be very good, will go with a TypeScript configuration file instead. |
Need to add Binance Smart Chain Contracts as well, referencing Binance Smart Chain Explorer |
Running into a lot of trouble getting dynamic imports to work due to this TypeScript issue |
Seems to be working now but need to resolve some build issues |
Decided to not use dynamic imports here as it caused many more problems then it solved |
Will try using ethers.js's JsonRpcBatchProvider to batch these view method calls so they hopefully don't take forever |
Getting this error when calling some view methods, may need to manually specify gas limit:
|
Manually specifying a very high gas limit (9 million) mostly worked but I'm still getting this error on some methods on some contracts |
Description
We need a public status page to communicate downtime and issues to our users, similar to what TheGraph has. In order to create this status page, (a) certain endpoint(s) will need to be added to the API (something like a /health route) to provide health checks for APIs, TheGraph, and ideally smart contracts (i.e. badger API endpoints returning 200s, subgraph endpoints returning 200s, smart contract reads returning normal responses, etc.). The ultimate monitoring of these are likely to come from the Badger Prometheus instance (still in development) and not available to consume yet. In the meantime, Prometheus could be run locally in a Docker container and configured to monitor the required sources that way.
Request Metrics
Options: low, medium, high
Documentation (optional)
Resources (optional)
Scope
APIs
Contracts
Ethereum Mainnet
Note: these contracts were obtained from the latest v2-ui configuration on master; some contracts were excluded due to a lack of read methods, unverified code on Etherscan, or duplicate names
DIGG system
Logic
Tokens
Subgraphs
Binance Smart Chain
Tokens
Logic
Sett System
Controllers
Development
health.ymlhealth.ts configuration to the base directory that specifies which contracts, subgraphs, and APIs should be checkedRework services & API to only retrieve cached dataAdd scheduled task to push cache data (example of caching, example of scheduled task)Delete any cached data that is older than 90 days via a scheduled task(not doing a react appisError
propertyAdd storage and cachingThis will be handled by the status pageIntegrate into selected status page: depends on this issue; implementation still TBD, this may be broken out into a separate issueThe text was updated successfully, but these errors were encountered: