The PR adds an INSERT query that logs the amount of keys uploaded by a user in a database table called tek_upload_count. It saves this along with the current date and the originator. It also does a comparison to config.AppConstants.InitialRemainingKeys to see if this was the first time the user uploaded keys.
Additionally it exposes a new event endpoint events/uploads/YYYY-MM-DD that returns the raw data from the that table in JSON format for a specific date. The resulting data looks like this:
Lastly, it also add another event type OTKExpiredNoUploads which is a subset of OTKExpired. This metric shows all OTKs that were claimed but no keys were ever uploaded. This is determined if config.AppConstants.InitialRemainingKeys == remaining_keys. This data will be served through the already existing events\YYYY-MM-DD endpoint.
Closes #333.
The PR adds an INSERT query that logs the amount of keys uploaded by a user in a database table called
tek_upload_count
. It saves this along with the current date and the originator. It also does a comparison toconfig.AppConstants.InitialRemainingKeys
to see if this was the first time the user uploaded keys.Additionally it exposes a new event endpoint
events/uploads/YYYY-MM-DD
that returns the raw data from the that table in JSON format for a specific date. The resulting data looks like this:Lastly, it also add another event type
OTKExpiredNoUploads
which is a subset ofOTKExpired
. This metric shows all OTKs that were claimed but no keys were ever uploaded. This is determined ifconfig.AppConstants.InitialRemainingKeys == remaining_keys
. This data will be served through the already existingevents\YYYY-MM-DD
endpoint.