From: addshore Date: Thu, 7 Dec 2017 15:39:18 +0000 (+0100) Subject: Track which namespaces edit conflicts are resolved in X-Git-Tag: 1.31.0-rc.0~1203^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=6f2924af676a9f96e9f0cdf590dadfa498d9d527;p=lhc%2Fweb%2Fwiklou.git Track which namespaces edit conflicts are resolved in This is similar to the tracking of the occourance of edit conflicts but tracks the resolution of the conflicts. Bug: T182011 Change-Id: I9a0c05dc921946fb6e0580b56b663783ca0b1b6e --- diff --git a/includes/editpage/TextConflictHelper.php b/includes/editpage/TextConflictHelper.php index b1eaa4be9b..6e7e7ee6ee 100644 --- a/includes/editpage/TextConflictHelper.php +++ b/includes/editpage/TextConflictHelper.php @@ -140,6 +140,15 @@ class TextConflictHelper { */ public function incrementResolvedStats() { $this->stats->increment( 'edit.failures.conflict.resolved' ); + // Only include 'standard' namespaces to avoid creating unknown numbers of statsd metrics + if ( + $this->title->getNamespace() >= NS_MAIN && + $this->title->getNamespace() <= NS_CATEGORY_TALK + ) { + $this->stats->increment( + 'edit.failures.conflict.resolved.byNamespaceId.' . $this->title->getNamespace() + ); + } } /**