Page MenuHomePhabricator

Use of "self" in callables is deprecated in php8.2 from liuggio/statsd-php-client package
Open, Stalled, Needs TriagePublic

Description

Created https://github.com/liuggio/statsd-php-client/issues/60

4) SamplingStatsdClientTest::testSampling with data set #0 (Liuggio\StatsdClient\Entity\StatsdData Object (...), 1, 0, true)
Use of "self" in callables is deprecated

/workspace/src/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/StatsdClient.php:94
/workspace/src/includes/libs/stats/SamplingStatsdClient.php:105
/workspace/src/tests/phpunit/unit/includes/libs/SamplingStatsdClientTest.php:31

Event Timeline

Unfortunately upstream seems to be abanonware - https://github.com/liuggio/statsd-php-client/issues/55 has been open for over 4 years

Reedy changed the task status from Open to Stalled.Jul 7 2023, 4:58 PM
Reedy moved this task from Reported Upstream to Patch proposed upstream on the Upstream board.

So, do we want to:

  • fork the upstream library and fix it,
  • stop using the upstream library and subsume its interfaces into MW, or
  • switch to a different library (which?)?

I believe that the MW components related to statsd/etc. are owned by Data Engineering?

Thanks for the ping @Jdforrester-WMF. Data-engineering has not been using statsd as far as I know. We have helped the performance team in some of its usage if I recall correctly, it was work done with @Krinkle and Gilles, but we have not been maintaining or using statsd.
Let's talk and see how statsd used nowadays, as doc is old and talks about Graphite: https://wikitech.wikimedia.org/wiki/Graphite#Data_sources, https://wikitech.wikimedia.org/wiki/Statsd

This task isn't about the Statsd service or other infrastructure. It is about the PHP code in MediaWiki that formats and sends the metrics to Statsd. Data Eng own analytics/statsv.py service which I imagine is what Joal is referring to but that is unrelated to this task.

The Statsd client library is included for and solely used by the MW Stats componen, which is maintained by MediaWiki-Platform-Team per mw:Maintainers, with SRE-O11y as backup and as resourcing the Prometheus migration.

The test is skipped under php8.2 since 1b9809b3, with a new upstream version the test should be reenabled.