Skip to content

Commit

Permalink
feat(#495): Add monitoring for claimable rewards and vehnt (#507)
Browse files Browse the repository at this point in the history
* feat(#495): Add monitoring for claimable rewards and vehnt

* Add dep

* Update locks

* Remove index
  • Loading branch information
ChewingGlass authored Dec 11, 2023
1 parent cff8984 commit efc6813
Show file tree
Hide file tree
Showing 20 changed files with 1,929 additions and 46 deletions.
88 changes: 88 additions & 0 deletions packages/crons/yarn.deploy.lock
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,12 @@ __metadata:
cors: ^2.8.5
dotenv: ^16.0.3
fastify: ^4.13.0
fastify-cron: ^1.3.1
git-format-staged: ^2.1.3
ky: ^0.31.4
nodemon: ^2.0.20
pg: ^8.9.0
prom-client: ^15.0.0
sequelize: ^6.28.0
ts-loader: ^9.2.3
ts-node: ^10.9.1
Expand Down Expand Up @@ -635,6 +637,13 @@ __metadata:
languageName: node
linkType: hard

"@opentelemetry/api@npm:^1.4.0":
version: 1.7.0
resolution: "@opentelemetry/api@npm:1.7.0"
checksum: 2398cbe65f199c3a7050125b3ad9c835f789bb0a616665e9c7f4475a29ac8334b6a3c15f38db48d345b522180c41c00b04cc174cd0eeffba98eb4874a565fa7e
languageName: node
linkType: hard

"@pkgjs/parseargs@npm:^0.11.0":
version: 0.11.0
resolution: "@pkgjs/parseargs@npm:0.11.0"
Expand Down Expand Up @@ -826,6 +835,15 @@ __metadata:
languageName: node
linkType: hard

"@types/cron@npm:^2.0.0":
version: 2.4.0
resolution: "@types/cron@npm:2.4.0"
dependencies:
cron: "npm:*"
checksum: c763e99a757ea76aee435948c25e0bdaf32ec44c69603088c73e8832df6b121e87932709925fe3e94777833ca30845c31df1167be54c330cf458d348059b9ffc
languageName: node
linkType: hard

"@types/crypto-js@npm:^4.1.1":
version: 4.1.1
resolution: "@types/crypto-js@npm:4.1.1"
Expand Down Expand Up @@ -880,6 +898,13 @@ __metadata:
languageName: node
linkType: hard

"@types/luxon@npm:~3.3.0":
version: 3.3.2
resolution: "@types/luxon@npm:3.3.2"
checksum: b9111132720eae0269538872a5a496b29587ecfc8edc3b0ff7d269aa93a5ff00a131b23d1e9d1f12ec39f2c779ad21bd8d9f90b122c85a182771aabde7f676b8
languageName: node
linkType: hard

"@types/mime@npm:*":
version: 3.0.1
resolution: "@types/mime@npm:3.0.1"
Expand Down Expand Up @@ -1312,6 +1337,13 @@ __metadata:
languageName: node
linkType: hard

"bintrees@npm:1.0.2":
version: 1.0.2
resolution: "bintrees@npm:1.0.2"
checksum: 56a52b7d3634e30002b1eda740d2517a22fa8e9e2eb088e919f37c030a0ed86e364ab59e472fc770fc8751308054bb1c892979d150e11d9e11ac33bcc1b5d16e
languageName: node
linkType: hard

"bn.js@npm:^5.1.0, bn.js@npm:^5.1.2, bn.js@npm:^5.2.0, bn.js@npm:^5.2.1":
version: 5.2.1
resolution: "bn.js@npm:5.2.1"
Expand Down Expand Up @@ -1591,6 +1623,16 @@ __metadata:
languageName: node
linkType: hard

"cron@npm:*, cron@npm:^2.0.0":
version: 2.4.3
resolution: "cron@npm:2.4.3"
dependencies:
"@types/luxon": "npm:~3.3.0"
luxon: "npm:~3.3.0"
checksum: cb0ad49653b37ba125f8670ca92150ce515493512b1b8a5e08086d22bec9c54dc6d8926fcdb49ea5783f6699862ca5fdc532a440ce33c3228f9b3d565010db2f
languageName: node
linkType: hard

"cross-fetch@npm:^3.1.5":
version: 3.1.8
resolution: "cross-fetch@npm:3.1.8"
Expand Down Expand Up @@ -1889,6 +1931,26 @@ __metadata:
languageName: node
linkType: hard

"fastify-cron@npm:^1.3.1":
version: 1.3.1
resolution: "fastify-cron@npm:1.3.1"
dependencies:
"@types/cron": "npm:^2.0.0"
cron: "npm:^2.0.0"
fastify-plugin: "npm:^3.0.0"
peerDependencies:
fastify: ^4.1.0
checksum: 152cc6bfe9ebd347747d922533e49b9ee0528d1c22677858046615a7bbae07166af7fd4f126c00f0c6d380aca33da6fa91f572c24cb586107753b03ab16392f9
languageName: node
linkType: hard

"fastify-plugin@npm:^3.0.0":
version: 3.0.1
resolution: "fastify-plugin@npm:3.0.1"
checksum: 131ba0a388f777829c3fb0fd5b75cf057688ce6d0ca354fb1ebf829767a8c853b0825762b9185b5200097454df0ede2f3095da2efe1aa1b3736d07f194e6d374
languageName: node
linkType: hard

"fastify-plugin@npm:^4.0.0":
version: 4.5.1
resolution: "fastify-plugin@npm:4.5.1"
Expand Down Expand Up @@ -2562,6 +2624,13 @@ __metadata:
languageName: node
linkType: hard

"luxon@npm:~3.3.0":
version: 3.3.0
resolution: "luxon@npm:3.3.0"
checksum: 50cf17a0dc155c3dcacbeae8c0b7e80db425e0ba97b9cbdf12a7fc142d841ff1ab1560919f033af46240ed44e2f70c49f76e3422524c7fc8bb8d81ca47c66187
languageName: node
linkType: hard

"make-error@npm:^1.1.1":
version: 1.3.6
resolution: "make-error@npm:1.3.6"
Expand Down Expand Up @@ -3223,6 +3292,16 @@ __metadata:
languageName: node
linkType: hard

"prom-client@npm:^15.0.0":
version: 15.0.0
resolution: "prom-client@npm:15.0.0"
dependencies:
"@opentelemetry/api": ^1.4.0
tdigest: ^0.1.1
checksum: a447cc4c7d87e610f9ed9c018dcbe759f06d32b6c3d401d90cafa6b15feee54e0ec5d0ee1d4925db905ea35c6e894be842de25e6bc0b5d415147a0b714c248f8
languageName: node
linkType: hard

"promise-retry@npm:^2.0.1":
version: 2.0.1
resolution: "promise-retry@npm:2.0.1"
Expand Down Expand Up @@ -3759,6 +3838,15 @@ __metadata:
languageName: node
linkType: hard

"tdigest@npm:^0.1.1":
version: 0.1.2
resolution: "tdigest@npm:0.1.2"
dependencies:
bintrees: "npm:1.0.2"
checksum: 44de8246752b6f8c2924685f969fd3d94c36949f22b0907e99bef2b2220726dd8467f4730ea96b06040b9aa2587c0866049640039d1b956952dfa962bc2075a3
languageName: node
linkType: hard

"text-encoding-utf-8@npm:^1.0.2":
version: 1.0.2
resolution: "text-encoding-utf-8@npm:1.0.2"
Expand Down
2 changes: 2 additions & 0 deletions packages/distributor-oracle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@
"cors": "^2.8.5",
"dotenv": "^16.0.3",
"fastify": "^4.13.0",
"fastify-cron": "^1.3.1",
"ky": "^0.31.4",
"pg": "^8.9.0",
"prom-client": "^15.0.0",
"sequelize": "^6.28.0",
"typescript-collections": "^1.3.3"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/distributor-oracle/src/metrics.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import client from "prom-client";

export const register = new client.Registry();
export const totalRewardsGauge = new client.Gauge({
name: "total_rewards",
help: "Total number of rewards",
labelNames: ["dnt_mint"],
});
register.registerMetric(totalRewardsGauge);
Loading

0 comments on commit efc6813

Please sign in to comment.