Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make first monthly usage report #852

Closed
paynejd opened this issue Jul 20, 2021 · 8 comments
Closed

Make first monthly usage report #852

paynejd opened this issue Jul 20, 2021 · 8 comments
Assignees
Labels
api2 OCL API v2 enhancement New feature or request report
Milestone

Comments

@paynejd
Copy link
Member

paynejd commented Jul 20, 2021

Hoping to have a first draft version of this report by Friday if possible. Initial metrics we'd like to see:

  • Total OCL user accounts
  • List of new users in OCLv2 by month
  • Count of active/inactive users
  • Count of Last login by month?
  • Counts of new content by month -- orgs, sources, etc
  • New users created (count and details) by date range
  • Other actions?
    • Track API usage (later)
    • Sunny to create an API to get the result and share with everyone and we can take a call to automate this (by celery-beat) or make it bespoke
    • Expand on Cloudwatch logs to run insight like (token/masked, referrer-url, etc)
@snyaggarwal snyaggarwal added api2 OCL API v2 enhancement New feature or request labels Jul 21, 2021
@snyaggarwal snyaggarwal added this to the Sprint 15 milestone Jul 21, 2021
snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Jul 21, 2021
snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Jul 22, 2021
…n/source versions and collection references in verbose mode
@snyaggarwal
Copy link
Contributor

  • GET /users/report/
  • Works only for Admin users
  • by default returns stats for the last 6 months
  • response structure:
{
"total": 2071,
"active": 2071,
"inactive": 0,
"new_users": [],
"users_last_login": [],
"new_organizations": [],
"new_sources": [],
"new_collections": [
  {
"Jul 2021": 2
},
  {
"Jun 2021": 3
},
  {
"May 2021": 1
},
  {
"Apr 2021": 400
}
],
}
  • can define date boundaries in the format ?start=2020-12-31&end=2021-06-30
  • can use verbose mode ?verbose=true to get concepts/mappings/source-versions/collection-versions/collection-references stats

@snyaggarwal
Copy link
Contributor

@paynejd Can we close this?

@paynejd
Copy link
Member Author

paynejd commented Jul 26, 2021

Final thoughts:

  • Can we shift to a different endpoint, eg /admin/reports/?
  • Can we add total counts for each resource type?

@snyaggarwal
Copy link
Contributor

@paynejd Couple of things:

  1. Can we name this as the Monthly Usage Report? That would mean the URL can be /admin/reports/monthly-usage/
  2. Should the total count be affected by the date range that's applied on monthly distribution?

snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Jul 27, 2021
@paynejd
Copy link
Member Author

paynejd commented Jul 29, 2021

@snyaggarwal Yes to the endpoint you suggested

Total count should probably be just current date right? Want to include attributes with timestamp and date ranges for each section of the report?

I think let's close this out this out after this change and all additional changes can go into new tickets

@jamlung-ri
Copy link
Contributor

To close out by the end of this week.

@snyaggarwal
Copy link
Contributor

@paynejd Can you please give me an example of timestamp and date ranges, how should it look in JSON to make it more clear for me.

snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Aug 2, 2021
snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue Aug 2, 2021
@jamlung-ri jamlung-ri modified the milestones: Sprint 15, Sprint 16 Aug 2, 2021
@jamlung-ri
Copy link
Contributor

@paynejd To verify by end of the day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api2 OCL API v2 enhancement New feature or request report
Projects
None yet
Development

No branches or pull requests

3 participants