2022-11-04 09:52:27 +00:00
|
|
|
when (NimMajor, NimMinor) < (1, 4):
|
|
|
|
{.push raises: [Defect].}
|
|
|
|
else:
|
|
|
|
{.push raises: [].}
|
2022-10-25 12:55:31 +00:00
|
|
|
|
|
|
|
import metrics
|
|
|
|
|
2024-03-15 23:08:47 +00:00
|
|
|
declarePublicGauge waku_lightpush_errors,
|
|
|
|
"number of lightpush protocol errors", ["type"]
|
|
|
|
declarePublicGauge waku_lightpush_messages,
|
|
|
|
"number of lightpush messages received", ["type"]
|
2022-10-25 12:55:31 +00: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 13:28:35 +00:00
|
|
|
requestLimitReachedFailure* = "request_limit_reached_failure"
|