-
Notifications
You must be signed in to change notification settings - Fork 29
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
Rate limit getting device logs #1430
Conversation
36dc682
to
972a1a6
Compare
972a1a6
to
f31e616
Compare
Opening a device logs stream or retrieving restfull device logs is not rate limited. Rate limiter distinguishes between stream and document Change-type: minor Signed-off-by: Harald Fischer <[email protected]>
f31e616
to
b2dc7f3
Compare
fieldFn = (req) => | ||
fields | ||
.map((field) => { | ||
const path = _.toPath(field); |
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.
This _.toPath
must occur only once in the setup phase as it is fairly costly when in very hot code (eg in rate limiting code that potentially runs for every request). If we didn't care about pre-calculating the path in order to do it only once then we would instead do _.get(req, field);
and let lodash do it automatically each time
Rate limiter is in place, during tests rate limiting is intentionally relaxed. Which enforcing strict rate limiting the endpoints get limited, generously but limited. |
Pull request was closed
Opening a device logs stream or retrieving restfull device logs is not rate limited.
Rate limiter distinguishes between stream and document
Change-type: minor