This repository has been archived by the owner on Jul 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adds additional metrics from utils package - Migrate docs to separate markdown file
- Loading branch information
Showing
5 changed files
with
54 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Metrics | ||
|
||
Basic metrics and a health status check can be enabled with the `--metrics` flag (default port `8001`, use `--metricsPort` to specify). | ||
|
||
## Prometheus | ||
Prometheus metrics are served on `/metrics`. For each chain that exists, this provides: | ||
- `<chain>_blocks_processed`: the number of blocks processed by the chains listener. | ||
- `<chain>_latest_processed_block`: most recent block that has been processed by the listener. | ||
- `<chain>_latest_known_block`: most recent block that exists on the chain. | ||
- `<chain>_votes_submitted`: number of votes submitted by the relayer. | ||
|
||
## Health Check | ||
The endpoint `/health` will return the current known block height, and a timestamp of when it was first seen for every chain: | ||
```json | ||
{ | ||
"chains": [ | ||
{ | ||
"chainId": "Number", | ||
"height": "Number", | ||
"lastUpdated": "Date" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
If the timestamp is at least 120 seconds old an error will be returned instead: | ||
```json | ||
{ | ||
"error": "String" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters