mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-30 00:25:45 +00:00
45319f09c9
* db_postgres: register pg socket fd to chronos better data available awareness * waku_store protocol: better logs to track time and new store metrics
20 lines
759 B
Nim
20 lines
759 B
Nim
{.push raises: [].}
|
|
|
|
import metrics
|
|
|
|
declarePublicGauge waku_store_errors, "number of store protocol errors", ["type"]
|
|
declarePublicGauge waku_store_queries, "number of store queries received"
|
|
|
|
## f.e., we have the "query" phase, where the node performs the query to the database,
|
|
## and the "libp2p" phase, where the node writes the store response to the libp2p stream.
|
|
declarePublicGauge waku_store_time_seconds,
|
|
"Time in seconds spent by each store phase", labels = ["phase"]
|
|
|
|
# Error types (metric label values)
|
|
const
|
|
dialFailure* = "dial_failure"
|
|
decodeRpcFailure* = "decode_rpc_failure"
|
|
peerNotFoundFailure* = "peer_not_found_failure"
|
|
emptyRpcQueryFailure* = "empty_rpc_query_failure"
|
|
emptyRpcResponseFailure* = "empty_rpc_response_failure"
|