Create and use PrefixingStatsdDataFactoryProxy in PerDbNameStatsdDataFactory
authoraddshore <addshorewiki@gmail.com>
Sat, 18 Aug 2018 10:22:38 +0000 (11:22 +0100)
committerKunal Mehta <legoktm@member.fsf.org>
Sun, 19 Aug 2018 07:19:57 +0000 (00:19 -0700)
commit82b19bd96a1735e4e31facff2c6f5ba9492dbe60
tree7e96338a445403d282dae5caa77f95a9a1865785
parent75c375566665e174ad2a7e06b4ce8d530d771692
Create and use PrefixingStatsdDataFactoryProxy in PerDbNameStatsdDataFactory

MediaWiki::emitBufferedStatsdData() is never called for the PerDbName factory,
so stats were being dropped. Instead of having two factories, turn the
PerDbName one into a proxy/wrapper around the main factory that just adds a
prefix in front of all of the keys.

Bug: T202144
Change-Id: I31e376446abb58e41353b4ca3814120d2e914104
autoload.php
includes/MediaWikiServices.php
includes/ServiceWiring.php
includes/libs/stats/PrefixingStatsdDataFactoryProxy.php [new file with mode: 0644]
tests/phpunit/includes/libs/stats/PrefixingStatsdDataFactoryProxyTest.php [new file with mode: 0644]