Page MenuHomePhabricator

Future of liuggio/statsd-php-client?
Closed, ResolvedPublic

Description

Not sure who is the "internal"/WMF owner of our usage of https://github.com/liuggio/statsd-php-client

But we need to decide what to do about it's future.

June 2016 was the last meaningful commit to master. July 2015 was the last release.

https://github.com/liuggio/statsd-php-client/commits/v1.1.x/ is more active with various fixes from us.

Issues like T326386: Use of "self" in callables is deprecated in php8.2 from liuggio/statsd-php-client package will be a problem for us eventually... There's no massive rush, but it is unclear when this won't just be a deprecation inside PHP, and will be an exception/similar. Also affected by T376276: PHP 8.4: Implicitly nullable parameter declarations deprecated.

Lego asked for a new release in https://github.com/liuggio/statsd-php-client/issues/55 in October 2018 (for T110415: vendor/liuggio - file permissions trigger debian lintian warnings), to no response.

Do we want to fork? Find a replacement library?

A quick look suggests https://packagist.org/packages/league/statsd / https://github.com/thephpleague/statsd may be a candidate, as is actively maintained...

Event Timeline

CC @Tgr, @ori, @bd808 and @Addshore as a few people who have worked on this code/library usages over the years.

It might be worth it to try and contact the library's co-maintainer. His contact info is at https://eatingco.de/about/.

I've emailed him, with a corrected email as the one on that page isn't right!

I've emailed him, with a corrected email as the one on that page isn't right!

I've also asked if it's possible for one or more of "us" to get some rights on the repo...

I've started https://github.com/liuggio/statsd-php-client/pull/63 in an attempt to get CI running...

Statsd isn't exactly a moving target. We could just fork and fix the PHP compat issues. Given T240685: MediaWiki Prometheus support, it will have to be discarded soon anyway, so whatever takes the least effort, I suppose.

I've emailed him, with a corrected email as the one on that page isn't right!

But that doesn't seem to work either.

lmata moved this task from Inbox to Radar on the observability board.
lmata moved this task from Inbox to Radar on the SRE Observability board.
lmata subscribed.

Is it worth moving forward on forking and updating this library for our various issues/use cases?

I think this task would become obsolete with the completion of T343020: Converting MediaWiki Metrics to StatsLib – statslib doesn’t use this library AFAICT (it directly uses the sockets extension in \Wikimedia\IPUtils\UDPTransport::emit()).

I think this task would become obsolete with the completion of T343020: Converting MediaWiki Metrics to StatsLib – statslib doesn’t use this library AFAICT (it directly uses the sockets extension in \Wikimedia\IPUtils\UDPTransport::emit()).

The backwards-compatibility feature copyToStatsdAt() still uses this library at the moment. It will be trivial to remove once backwards-compatibility is no longer needed.

Now that graphite is fully deprecated, I don't think we need this library any more.

Now that graphite is fully deprecated, I don't think we need this library any more.

There's a TODO at the top of includes/libs/Stats/BufferingStatsdDataFactory.php, but per code search there are a number of places it's used (cascading from there). Who would be the right person to re-write that class?

Krinkle assigned this task to colewhite.
Krinkle subscribed.

The decision about the "future" is resolved: It is being removed in favor of the wikimedia/stats lib. Details and remaining uses to be fleshed out at T393186.