Skip to content

prometheus: introduce a couple simple counters

Vincent Breitmoser requested to merge prometheus into master

This MR introduces a couple of incremental counters to log as statistics in a Prometheus TSDB.

Concretely, each of these are logged:

  • "mail_send_verify"
  • "mail_send_manage"
  • "mail_send_welcome"
  • "key_address_published"
  • "key_address_unpublished"
  • "key_upload_new"
  • "key_upload_updated"
  • "key_upload_unchanged"
  • "key_upload_secret"
  • "key_upload_error"

The email-related counters (first five) also attach the domain as a label if it's a well-known email host (list of popular domains from here), otherwise just the TLD so we don't accidentally deanonymize anyone. In addition to these hagrid-specific stats, a counter of total http requests is kept for each endpoint.

I'm hoping to gain some operational insight with this, for example for the use of HKP vs VKS, verified addresses, frequent errors, rate of verify/manage emails vs actually published/unpublished addresses, etc.

Merge request reports