pow icon indicating copy to clipboard operation
pow copied to clipboard

Add telemetry events

Open danschultzer opened this issue 5 years ago • 3 comments

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 😄

danschultzer avatar Apr 17 '20 01:04 danschultzer

I would only add total numbers of users.

ghost avatar Apr 19 '20 08:04 ghost

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.

cdvv7788 avatar Apr 19 '20 13:04 cdvv7788

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)

danschultzer avatar May 01 '20 05:05 danschultzer