storacha-network / w3name

IPNS client and service for generating, updating, and tracking immutable names with signed updates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add basic w3name stats in grafana

mbommerez opened this issue · comments

Needs investigation.

  • Time series database Prometheus
  • We expose a new API end point and point Prometheus to it. Why are we exposing stats to Prometheus instead of firing (& forgetting) events to Prometheus.

We need to list the basic stats that we need.

Maarten to look into current stats that are used.

As a starting list, let's track:

  • Number of w3name records created (ideally by API key)
  • Usage of names - updates and gets (ideally by w3name)

At the very least would be great to be able to generate charts like this
image

...but also have the capability of seeing where the usage comes from (by API key for number of w3name records, and by w3name record for updates and gets)

After discussion, we think that it's probably best to do an initial version of this, providing the basic stats, and then do the (much more time-consuming) addition of the "by API key" and "by w3name" breakdowns as a follow-up ticket. I.e. get something valuable done asap.

Work in progress is in #94.

Hugo has suggested that instead of making stats available to Prometheus, we should instead use Cloudflare Analytics Engine. This does look like it's probably a better solution, but it changes the requirements of the ticket, so the PR (#94) now needs to be refactored to use Analytics Engine instead.