2022-11-04 10:52:27 +01:00
|
|
|
when (NimMajor, NimMinor) < (1, 4):
|
|
|
|
{.push raises: [Defect].}
|
|
|
|
else:
|
|
|
|
{.push raises: [].}
|
2022-10-25 14:55:31 +02:00
|
|
|
|
|
|
|
import metrics
|
|
|
|
|
2024-03-16 00:08:47 +01:00
|
|
|
declarePublicGauge waku_lightpush_errors,
|
|
|
|
"number of lightpush protocol errors", ["type"]
|
|
|
|
declarePublicGauge waku_lightpush_messages,
|
|
|
|
"number of lightpush messages received", ["type"]
|
2022-10-25 14:55:31 +02:00
|
|
|
|
|
|
|
# Error types (metric label values)
|
|
|
|
const
|
|
|
|
dialFailure* = "dial_failure"
|
|
|
|
decodeRpcFailure* = "decode_rpc_failure"
|
|
|
|
peerNotFoundFailure* = "peer_not_found_failure"
|
|
|
|
emptyRequestBodyFailure* = "empty_request_body_failure"
|
|
|
|
emptyResponseBodyFailure* = "empty_response_body_failure"
|
|
|
|
messagePushFailure* = "message_push_failure"
|
2024-04-15 15:28:35 +02:00
|
|
|
requestLimitReachedFailure* = "request_limit_reached_failure"
|