pow
pow copied to clipboard
Add telemetry events
This was already discussed way back in https://github.com/danschultzer/pow/issues/122, but now with the Phoenix Live Dashboard announcement I think it's time to add in the telemetry events so it can easily be hooked up.
OWASP recommends logging the following:
- Session ID creation
- Session ID renewal
- Session ID destruction
- Login and logout operations
- Privilige changes
- Timeout expiration
- Invalid session activities
- Critical business operations
I think the following could be nice metrics:
- Number of current sessions
- Number of users signed in
- Number of failed sign in attempts
- Average and peak number of failed attempts per user
- Average and peak number of sessions per user
- Average authentication duration time
Please share if you got any suggestions for what to track 😄
I would only add total numbers of users.
Registrations would be useful for this too? Or this is meant to track only sessions? For the extensions, things like confirmed accounts could be useful too.
Registrations would be useful for this too? Or this is meant to track only sessions?
Yeah, since registrations is just collecting what exists in the DB at any certain point.
For total number of signed in users, this is great: https://ghost.jmnorlund.net/instrumenting-an-elixir-phoenix-pow-application/ (by @jmn)