start moving more stats from /status to /prometheus
This commit is contained in:
parent
bc5ffc2366
commit
eb3fe0b1b5
@ -870,6 +870,13 @@ impl Web3ProxyApp {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// app.pending_transactions.sync();
|
||||||
|
// app.rpc_secret_key_cache.sync();
|
||||||
|
// "pending_transactions_count": app.pending_transactions.entry_count(),
|
||||||
|
// "pending_transactions_size": app.pending_transactions.weighted_size(),
|
||||||
|
// "user_cache_count": app.rpc_secret_key_cache.entry_count(),
|
||||||
|
// "user_cache_size": app.rpc_secret_key_cache.weighted_size(),
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
struct CombinedMetrics<'a> {
|
struct CombinedMetrics<'a> {
|
||||||
app: &'a Web3ProxyAppMetrics,
|
app: &'a Web3ProxyAppMetrics,
|
||||||
|
@ -32,16 +32,9 @@ pub async fn status(
|
|||||||
) -> impl IntoResponse {
|
) -> impl IntoResponse {
|
||||||
let body = response_cache
|
let body = response_cache
|
||||||
.get_with(FrontendResponseCaches::Status, async {
|
.get_with(FrontendResponseCaches::Status, async {
|
||||||
app.pending_transactions.sync();
|
// TODO: what else should we include? uptime, cache hit rates, cpu load, memory used
|
||||||
app.rpc_secret_key_cache.sync();
|
|
||||||
|
|
||||||
// TODO: what else should we include? uptime, cache hit rates, cpu load
|
|
||||||
let body = json!({
|
let body = json!({
|
||||||
"chain_id": app.config.chain_id,
|
"chain_id": app.config.chain_id,
|
||||||
"pending_transactions_count": app.pending_transactions.entry_count(),
|
|
||||||
"pending_transactions_size": app.pending_transactions.weighted_size(),
|
|
||||||
"user_cache_count": app.rpc_secret_key_cache.entry_count(),
|
|
||||||
"user_cache_size": app.rpc_secret_key_cache.weighted_size(),
|
|
||||||
"balanced_rpcs": app.balanced_rpcs,
|
"balanced_rpcs": app.balanced_rpcs,
|
||||||
"private_rpcs": app.private_rpcs,
|
"private_rpcs": app.private_rpcs,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user