-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add API Requests By User #148
Conversation
This adds a report to collect the top 20 API users each day, and log the total number of requests each hour. Reports this info in a simple table, this is handy for identifying users who are approaching, or over the API rate limit.
👋 @dfarr ! I have a few questions: (1) Was there a specific reason to print the numbers per hour? I am asking because the finest granularity for all other numbers in Hubble is a "day" and I wonder if we should stick to that. (2) Would it make sense to move your "Top API Users" into the API requests pages? Thanks for this PR, this looks really useful 👍 😊 |
I think it would make sense to do top API users - does regenerating this every day make sense? If so it would be a pretty simple tweak to the script and simply moving the table to a different page :) |
I think generating this report every day makes sense. I have some very heavy API (and polling) users and would like to make this information more visible. Question, does this report still generate if rate limiting is not enabled? I assume this only makes sense if rate limiting is on. There are other logs and methods to pull out the heavy polling users. That's what I use now. |
Will do 👍 From my understanding, the |
Modify the report to tabulate the top API useres each day, display this information in housekeeping/api-requests
I like it! Can't wait to get this in my version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dfarr: Thank you very much. That’s a very nice addition to Hubble, and your code is well-written! I just have two minor remarks below that you could address 🙂.
@@ -0,0 +1,13 @@ | |||
from .Report import * | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a short description of this report as a comment, as we have with the other reports?
@@ -50,6 +50,20 @@ <h3>API Requests</h3> | |||
</div> | |||
</div> | |||
|
|||
<div class="chart-placeholder"> | |||
<h3>Top API Requests by Users</h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’d drop the “Top” in the title, because it’s common for our charts only to show the top entries (for instance, in the Git traffic table).
This adds a report to collect the top 20 API users each day, and
log the total number of requests each hour. Reports this info in
a simple table, this is handy for identifying users who are
approaching, or over the API rate limit.
An example of the API Rate Limit page: