If you want to implement native statistics, it actually should be implemented in the module that provides the functionality and not in the kex module. So if you like to submit a PR, please add it to the lcr module. You can look to other modules (e.g. sl, usrloc etc..) to get some ideas how its implemented.