ceramicnetwork / js-ceramic

Typescript implementation of the Ceramic protocol
http://ceramic.network
Other
414 stars 127 forks source link

feat: metrics for counting state of cas requests #3193

Closed samika98 closed 6 months ago

samika98 commented 6 months ago

Description

We need metrics for keeping track of how many streams have been anchored/errored or are in pending state. This is done in order to track performance of anchoring.

How Has This Been Tested?

Tested locally by creating a ceramic node with config where prometheus exporter was turned on.

PR checklist

Before submitting this PR, please make sure:

References:

Please list relevant documentation (e.g. tech specs, articles, related work etc.) relevant to this change, and note if the documentation has been updated.

linear[bot] commented 6 months ago

WS2-3140 Keramik Scenario CAS performance test

samika98 commented 6 months ago

If a stream gets polled multiple times then these counts can be off, in the case where we want expect only one state for a stream. Number of requests = Number of streams created Number of streams created != cas_request_failed + cas_request_success + cas_request_pending.

In the case where everything happens at 300 tps we should get Number of streams created = cas_request_success.