add metrics for number of coins withdrawn in a batch request
This commit is contained in:
parent
7689c71cea
commit
db320d3e8e
@ -472,6 +472,7 @@ prepare_transaction (struct TEH_RequestContext *rc,
|
|||||||
"ev_sig",
|
"ev_sig",
|
||||||
&pc->collectable.sig))));
|
&pc->collectable.sig))));
|
||||||
}
|
}
|
||||||
|
TEH_METRICS_batch_withdraw_num_coins += wc->planchets_length;
|
||||||
return TALER_MHD_REPLY_JSON_PACK (
|
return TALER_MHD_REPLY_JSON_PACK (
|
||||||
rc->connection,
|
rc->connection,
|
||||||
MHD_HTTP_OK,
|
MHD_HTTP_OK,
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
unsigned long long TEH_METRICS_num_requests[TEH_MT_REQUEST_COUNT];
|
unsigned long long TEH_METRICS_num_requests[TEH_MT_REQUEST_COUNT];
|
||||||
|
|
||||||
|
unsigned long long TEH_METRICS_batch_withdraw_num_coins;
|
||||||
|
|
||||||
unsigned long long TEH_METRICS_num_conflict[TEH_MT_REQUEST_COUNT];
|
unsigned long long TEH_METRICS_num_conflict[TEH_MT_REQUEST_COUNT];
|
||||||
|
|
||||||
unsigned long long TEH_METRICS_num_signatures[TEH_MT_SIGNATURE_COUNT];
|
unsigned long long TEH_METRICS_num_signatures[TEH_MT_SIGNATURE_COUNT];
|
||||||
@ -78,7 +80,11 @@ TEH_handler_metrics (struct TEH_RequestContext *rc,
|
|||||||
"# HELP taler_exchange_num_keyexchanges "
|
"# HELP taler_exchange_num_keyexchanges "
|
||||||
" number of key exchanges done by cipher\n"
|
" number of key exchanges done by cipher\n"
|
||||||
"# TYPE taler_exchange_num_keyexchanges counter\n"
|
"# TYPE taler_exchange_num_keyexchanges counter\n"
|
||||||
"taler_exchange_num_keyexchanges{type=\"%s\"} %llu\n",
|
"taler_exchange_num_keyexchanges{type=\"%s\"} %llu\n"
|
||||||
|
"# HELP taler_exchange_batch_withdraw_num_coins "
|
||||||
|
" number of coins withdrawn in a batch-withdraw request\n"
|
||||||
|
"# TYPE taler_exchange_batch_withdraw_num_coins counter\n"
|
||||||
|
"taler_exchange_batch_withdraw_num_coins{type=coins} %llu\n",
|
||||||
"other",
|
"other",
|
||||||
TEH_METRICS_num_conflict[TEH_MT_REQUEST_OTHER],
|
TEH_METRICS_num_conflict[TEH_MT_REQUEST_OTHER],
|
||||||
"deposit",
|
"deposit",
|
||||||
@ -108,7 +114,8 @@ TEH_handler_metrics (struct TEH_RequestContext *rc,
|
|||||||
"eddsa",
|
"eddsa",
|
||||||
TEH_METRICS_num_verifications[TEH_MT_SIGNATURE_EDDSA],
|
TEH_METRICS_num_verifications[TEH_MT_SIGNATURE_EDDSA],
|
||||||
"ecdh",
|
"ecdh",
|
||||||
TEH_METRICS_num_keyexchanges[TEH_MT_KEYX_ECDH]);
|
TEH_METRICS_num_keyexchanges[TEH_MT_KEYX_ECDH],
|
||||||
|
TEH_METRICS_batch_withdraw_num_coins);
|
||||||
resp = MHD_create_response_from_buffer (strlen (reply),
|
resp = MHD_create_response_from_buffer (strlen (reply),
|
||||||
reply,
|
reply,
|
||||||
MHD_RESPMEM_MUST_FREE);
|
MHD_RESPMEM_MUST_FREE);
|
||||||
|
@ -67,6 +67,11 @@ enum TEH_MetricTypeKeyX
|
|||||||
*/
|
*/
|
||||||
extern unsigned long long TEH_METRICS_num_requests[TEH_MT_REQUEST_COUNT];
|
extern unsigned long long TEH_METRICS_num_requests[TEH_MT_REQUEST_COUNT];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Number of coins withdrawn in a batch-withdraw request
|
||||||
|
*/
|
||||||
|
extern unsigned long long TEH_METRICS_batch_withdraw_num_coins;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of serialization errors encountered when
|
* Number of serialization errors encountered when
|
||||||
* handling requests of the respective type.
|
* handling requests of the respective type.
|
||||||
|
Loading…
Reference in New Issue
Block a user