Perspective/Vision User Tracking Module

We have a large amount of Ignition Gateways running within our network and a lot of them are used for Citizen Development to serve business needs fast from the local subject matter experts. To better understand the usage of the applications that are running on the gateway we would like to gather metrics from the gateway. Currenty we have deployed a gateway scoped script on a few gateways that runs every 5 seconds to check if new sessions (vision/perspective) had been started or formerly active sessions had been terminated. This works somehow but is not a stable and reliable way. The support team recommended the audit log (for authenticated sessions) and a session startup script (system.util.audit()) for not authenticated sessions. This is again a lot of manual effort in a large infrastucture like ours.

What we would like to develop is a Ignition Module, leveraging the Ignition SDK that stores the gateway usage metrics (SessionStartupTime (if start), SessionEndTime (if end), SessionID, Client IP, UserName (if authenticated), ProjectName, GatewayName) to a central database. Does anyone know if the SDK is offering the functionality to develop a tool like that or did anyone already developed such kind of functionality in a different way?

Such a module was developed for Vision a long time ago, and presented at ICC. I don't recall the details, but it was rather impressive (for those who need such). I haven't heard of such for Perspective. Not sure if Perspective provides sufficient SDK hooks that could be used for this.