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

Log the more precise reason for why API Umbrella rejects a request in the analytics #226

Closed
GUI opened this issue May 4, 2015 · 2 comments

Comments

@GUI
Copy link
Member

GUI commented May 4, 2015

When the api-umbrella-gatekeeper component denies a request, it can be for a variety of reasons (no API key is supplied, invalid API key, over rate limit, etc). However from a logging and analytics perspective, all that we log is the HTTP response status code (as we do for all responses). While you can usually use this HTTP response status code to help discern why a request may have been rejected, it's not the easiest thing to query, and we're having a growing number of possible errors that have overlapping HTTP status codes (eg, there's multiple reasons why we might return a 403 forbidden error).

To solve this, I think it would be helpful for us to begin logging our internal error code we return when the gatekeeper component is responsible for denying the request.

I'll flush this issue out with a bit more detail shortly on where all the different components this touches are located.

@GUI GUI added the enhancement label May 4, 2015
@GUI GUI added this to the Sprint 21 (5/4-5/15) milestone May 4, 2015
@GUI
Copy link
Member Author

GUI commented May 4, 2015

So it turns out this is actually more implemented than I thought. I did vaguely recall implementing this, but I didn't see it when I was looking for it last week and hence the issue. However, there's still stuff to probably do here, since while we are storing the information in the analytics db, we haven't actually exposed the details via the admin analytics interface, which I think would be quite useful (so I don't forget about this again and think it needs to be done all over again :).

So if you're up for diving into more of the admin UI side of things, here's a bit more of a brain dump on things:

@GUI
Copy link
Member Author

GUI commented May 14, 2015

This was addressed by @cmc333333 in NREL/api-umbrella-web#11 and has been deployed to production. Thanks!

I also forgot to mention this in the earlier description of this task, but one other small piece of that would be useful would be to add this field to the query builder interface to make it easier to filter on this field. I went ahead and tackled that in NREL/api-umbrella-web#14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants