From 6f2924af676a9f96e9f0cdf590dadfa498d9d527 Mon Sep 17 00:00:00 2001 From: addshore Date: Thu, 7 Dec 2017 16:39:18 +0100 Subject: [PATCH] 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 --- includes/editpage/TextConflictHelper.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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() + ); + } } /** -- 2.20.1