Multi-Cloud Deployment (#1)

* Introduce instances list to scale bots and add config templating

* Use env var for wallet address if not provided as path param

* Expose SOL price as metric

* Update docs

* Add auto-swap

* Add Panopticon

* implement backoff stategy in autoswap

* Add retry logic for withdraw and swap

* bump drift-sdk, update ctl.sh and docs

* Update filler bot, add tx metrics

* Add user-metrics

* Update build and dashboard
This commit is contained in:
Patrick Balsiger
2024-04-28 07:25:08 +02:00
committed by GitHub
parent 6bd2c3367b
commit f05fac48ca
58 changed files with 9783 additions and 319 deletions

View File

@@ -0,0 +1,42 @@
const client = require('prom-client');
const createMetrics = () => {
const registry = new client.Registry();
const solBalanceMetric = new client.Gauge({
name: "sol_balance",
help: "SOL Balance",
labelNames: ['wallet','walletShort']
});
const usdcBalanceMetric = new client.Gauge({
name: "usdc_balance",
help: "USDC Balance",
labelNames: ['wallet','walletShort']
});
const totalCollateralMetric = new client.Gauge({
name: "total_collateral",
help: "Total Collateral",
labelNames: ['wallet','walletShort']
});
const unrealizedPNLMetric = new client.Gauge({
name: "unrealized_pnl",
help: "Unrealized PNL",
labelNames: ['wallet','walletShort']
});
registry.registerMetric(usdcBalanceMetric);
registry.registerMetric(solBalanceMetric);
registry.registerMetric(totalCollateralMetric);
registry.registerMetric(unrealizedPNLMetric);
return [registry, {
usdcBalance: usdcBalanceMetric,
solBalance: solBalanceMetric,
totalCollateral: totalCollateralMetric,
unrealizedPNL: unrealizedPNLMetric
}];
};
module.exports = {
createMetrics
}