Page MenuHomePhorge

No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None
diff --git a/RELEASE-NOTES-1.44 b/RELEASE-NOTES-1.44
index d374ee35de7..a2f7c65cc87 100644
--- a/RELEASE-NOTES-1.44
+++ b/RELEASE-NOTES-1.44
@@ -639,6 +639,8 @@ because of Phabricator reports.
RL\Context::encodeJson, if available. If not, use FormatJson::encode.
* wfAssembleUrl(), wfMatchesDomainList(), and wfUrlProtocolsWithoutProtRel(),
all deprecated in 1.39, now emit warnings.
+* MediaWikiServices::getPerDbNameStatsdDataFactory() is now deprecated. Use
+ StatsFactory instead with wiki ID via WikiMap::getCurrentDomainId() as label.
* BlockManager::getUserBlock(), deprecated since 1.42, now emits warnings.
* DatabaseBlock methods newFromRow(), delete(), insert(), update(),
doAutoblock(), isExemptedFromAutoblocks(), doAutoblock(), updateTimestamp(),
diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php
index beff58af73c..c7527c66e44 100644
--- a/includes/MediaWikiServices.php
+++ b/includes/MediaWikiServices.php
@@ -1714,6 +1714,15 @@ class MediaWikiServices extends ServiceContainer {
/**
* @since 1.32
+ * @deprecated since 1.44 Use StatsFactory with `setLabel()` instead
+ *
+ * For example:
+ *
+ * ```
+ * $statsFactory
+ * ->getCounter( 'example_total' )
+ * ->setLabel( 'wiki', WikiMap::getCurrentWikiId() )
+ * ```
*/
public function getPerDbNameStatsdDataFactory(): StatsdDataFactoryInterface {
return $this->getService( 'PerDbNameStatsdDataFactory' );
diff --git a/includes/libs/Stats/PrefixingStatsdDataFactoryProxy.php b/includes/libs/Stats/PrefixingStatsdDataFactoryProxy.php
index 58425335a2c..cf076859164 100644
--- a/includes/libs/Stats/PrefixingStatsdDataFactoryProxy.php
+++ b/includes/libs/Stats/PrefixingStatsdDataFactoryProxy.php
@@ -26,6 +26,16 @@ use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
/**
* Proxy to prefix metric keys sent to a StatsdDataFactoryInterface
*
+ * @deprecated since 1.44 Use StatsFactory with `setLabel()` instead
+ *
+ * For example:
+ *
+ * ```
+ * $statsFactory
+ * ->getCounter( 'example_total' )
+ * ->setLabel( 'wiki', WikiMap::getCurrentWikiId() )
+ * ```
+ *
* @since 1.32
*/
class PrefixingStatsdDataFactoryProxy implements StatsdDataFactoryInterface {

File Metadata

Mime Type
text/x-diff
Expires
Sat, Jul 5, 5:32 AM (17 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227573
Default Alt Text
(2 KB)

Event Timeline