While working on https://phabricator.wikimedia.org/T354908 we identified that because of the way MW depends on parsoid as an extension there is no easy way to use the Stats lib without having a circular dependency.
- Parsoid imports Wikimedia\Stats from core
- Core imports Parsoid
Since it looks like a generic enough library that could be used by other extensions too it might be useful to have it packaged as an external library.