Rate limit data returned from API methods
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 32/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- api, authentication
Research direction
No files or tests are named. Start by reviewing the Authentication and Management API methods and how responses are currently handled; define the optional response and rate-limit callback without changing existing calls. Done means rate-limit data can be collected from each API call while the original method behavior remains compatible.
Written by the indexing model from the issue text.
Description
Checklist
- I have looked into the Readme and Examples, and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Describe the problem you'd like to have solved
We're integrating with Auth0 and we would like to gather rate limit data from our calls to the Authentication and Management APIs. We have monitors for when we are rate limited, but we would like to gather metrics on the rate limit data returned from each API call. This would give us clear data points on how close we are to the rate limits as we continue to roll it out to more of our users.
Describe the ideal solution
I've partially implemented this as a proof of concept and I'd be happy to create a pull request for this if you're open to it:
- An optional block can be given to capture the response and rate limit
- The original methods can still be called as is making this a non-breaking change
For example, both of these are valid method calls:
# Original method still works
auth0_client.user_sessions(auth0_id)
# We could use the returned `rate_limit_info` to create Datadog metrics
auth0_client.user_sessions(auth0_id) do |response_body, rate_limit_info|
puts "Response body: #{response_body}"
puts "Rate limit info: #{rate_limit_info}"
end
We're considering monkey patching something like this to gather the rate limit information, but we'd much rather contribute this change if you're open to it!
Alternatives and current workarounds
No response
Additional context
No response
- Dominant language
- Ruby
- Stars
- 205
- Forks
- 148
- Avg merge
- 13h
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from auth0/ruby-auth0
-
Model#initialize drops every `false` value — booleans are silently lost on requests and responsesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
auth0/ruby-auth0#800 · 1 comment ·
-
feature request
Difficulty 3/5 1-2 days Newbie friendliness 45/100
auth0/ruby-auth0#709 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 50/100
auth0/ruby-auth0#610 · 1 comment ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
auth0/ruby-auth0#556 · 2 comments ·
-
feature request
Difficulty 3/5 1-2 days Newbie friendliness 35/100
auth0/ruby-auth0#500 · 1 comment ·
All issues in auth0/ruby-auth0
Similar issues
-
security
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
OSCON 2016Opencontent
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
rubyevents/rubyevents#2148 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
we-promise/sure#3838 · 2 comments ·
Maintainers usually reply within 1 day
-
Mend: dependency security vulnerability
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ManageIQ/manageiq-ui-classic#10341 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
rubocop/ruby-style-guide#984 ·