aboutsummaryrefslogtreecommitdiffstats
path: root/includes/objectcache/ObjectCache.php
diff options
context:
space:
mode:
authorAaron Schulz <aschulz@wikimedia.org>2020-12-28 14:34:29 -0800
committerAaron Schulz <aschulz@wikimedia.org>2021-01-25 14:36:29 -0800
commit57325ba3bdce3826d726cf6f6d26ad235af58f53 (patch)
treed5e386a313982c7f959719055753c5c42a00b86c /includes/objectcache/ObjectCache.php
parent9834fd052cc7cb85e63ff1d2c2783a387e123d56 (diff)
downloadmediawikicore-57325ba3bdce3826d726cf6f6d26ad235af58f53.tar.gz
mediawikicore-57325ba3bdce3826d726cf6f6d26ad235af58f53.zip
objectcache: add statsd key metrics to BagOStuff classes
Update SQL, REST, and redis subclasses to emit call count and payload size metrics for cache key operations. These metrics are bucketed by cache key collection (similar to WANCache). Bug: T235705 Change-Id: Icaa3fa1ae9c8b0f664c26ce70b7e1c4fc5f92767
Diffstat (limited to 'includes/objectcache/ObjectCache.php')
-rw-r--r--includes/objectcache/ObjectCache.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/objectcache/ObjectCache.php b/includes/objectcache/ObjectCache.php
index 6226f91b1efd..32ece3183539 100644
--- a/includes/objectcache/ObjectCache.php
+++ b/includes/objectcache/ObjectCache.php
@@ -149,6 +149,10 @@ class ObjectCache {
'reportDupes' => true,
];
+ if ( !isset( $params['stats'] ) ) {
+ $params['stats'] = MediaWikiServices::getInstance()->getStatsdDataFactory();
+ }
+
if ( isset( $params['factory'] ) ) {
return call_user_func( $params['factory'], $params );
}