Page MenuHomePhabricator

Normalise Phonos statsd metric names
Closed, ResolvedPublic

Description

In Phonos.php's recordError() function we define a statsd metric named phonos_error — this causes values to be recorded at MediaWiki.phonos_error.[...].

$this->statsdDataFactory->increment( "phonos_error.$key" );

Conversely, in PhonosButton.js we write to a statsv metric named counter.MediaWiki.extension.Phonos.IPA.[...]

There's a lot of inconsistency with how statsv/d metrics are named, but going by https://wikitech.wikimedia.org/wiki/Graphite#Metric_creation I'd suggest we rename our statsd phonos_error metric to extension.Phonos.error.[...], so that the current metrics recorded are modifed as such:

  • MediaWiki.phonos_error.phonos_storage_error to MediaWiki.extension.Phonos.error.storage
  • MediaWiki.phonos_error.phonos_engine_error to MediaWiki.extension.Phonos.error.engine
  • MediaWiki.phonos_error.phonos_wikibase_api_error to MediaWiki.extension.Phonos.error.wikibase_api

This can be done via

$this->statsdDataFactory->increment( "extension.Phonos.error.$key" );