mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-13 08:14:43 +00:00
026d804a0d
* Added flexible rate limit checks for store, legacy store and lightpush. Also added rate and traffic metrics. * Fix chat2 after WakuLegacyStoreCodec rename * Update waku/common/ratelimit.nim Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com> * Update waku/common/ratelimit.nim Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com> * Update waku/waku_store_legacy/protocol.nim Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com> * Fix review findings, added limit to debug logs --------- Co-authored-by: Ivan FB <128452529+Ivansete-status@users.noreply.github.com>
19 lines
637 B
Nim
19 lines
637 B
Nim
when (NimMajor, NimMinor) < (1, 4):
|
|
{.push raises: [Defect].}
|
|
else:
|
|
{.push raises: [].}
|
|
|
|
import metrics
|
|
|
|
declarePublicCounter waku_service_requests,
|
|
"number of non-relay service requests received", ["service"]
|
|
declarePublicCounter waku_service_requests_rejected,
|
|
"number of non-relay service requests received being rejected due to limit overdue",
|
|
["service"]
|
|
|
|
declarePublicCounter waku_service_inbound_network_bytes,
|
|
"total incoming traffic of specific waku services", labels = ["service"]
|
|
|
|
declarePublicCounter waku_service_outbound_network_bytes,
|
|
"total outgoing traffic of specific waku services", labels = ["service"]
|