aboutsummaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_metrics.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-07 21:16:38 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-07 21:16:38 +0100
commit71933dd2e9b5b66dbc72cdde9ea7b498a11db197 (patch)
tree5cb2c5f9931df442ca4ba91da33a0457476039b7 /src/exchange/taler-exchange-httpd_metrics.h
parent8be9de667525a307c35e12ecacc0c3a647ccdd9b (diff)
add basic metrics collection logic
Diffstat (limited to 'src/exchange/taler-exchange-httpd_metrics.h')
-rw-r--r--src/exchange/taler-exchange-httpd_metrics.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_metrics.h b/src/exchange/taler-exchange-httpd_metrics.h
index 399a1767..39e46316 100644
--- a/src/exchange/taler-exchange-httpd_metrics.h
+++ b/src/exchange/taler-exchange-httpd_metrics.h
@@ -27,6 +27,34 @@
/**
+ * Request types for which we collect metrics.
+ */
+enum TEH_MetricType
+{
+ TEH_MT_OTHER = 0,
+ TEH_MT_DEPOSIT = 1,
+ TEH_MT_WITHDRAW = 2,
+ TEH_MT_MELT = 3,
+ TEH_MT_REVEAL_PRECHECK = 4,
+ TEH_MT_REVEAL = 5,
+ TEH_MT_REVEAL_PERSIST = 6,
+ TEH_MT_COUNT = 7 /* MUST BE LAST! */
+};
+
+
+/**
+ * Number of requests handled of the respective type.
+ */
+extern unsigned long long TEH_METRICS_num_requests[TEH_MT_COUNT];
+
+/**
+ * Number of serialization errors encountered when
+ * handling requests of the respective type.
+ */
+extern unsigned long long TEH_METRICS_num_conflict[TEH_MT_COUNT];
+
+
+/**
* Handle a "/metrics" request.
*
* @param rc request context