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

Add metrics to rate limiting #183

Merged
merged 2 commits into from
Apr 29, 2022
Merged

Add metrics to rate limiting #183

merged 2 commits into from
Apr 29, 2022

Conversation

MartinquaXD
Copy link
Contributor

Fixes #180

In order to see how often we need to use the back off strategy for paraswap we need to have some metrics for it.

Test Plan

Metrics after manual test
# HELP gp_v2_api_rate_limiter_rate_limited_requests Number of responses indicating a rate limiting error.
# TYPE gp_v2_api_rate_limiter_rate_limited_requests counter
gp_v2_api_rate_limiter_rate_limited_requests{endpoint="paraswap"} 16
# HELP gp_v2_api_rate_limiter_requests_dropped Number of requests dropped while being rate limited.
# TYPE gp_v2_api_rate_limiter_requests_dropped counter
gp_v2_api_rate_limiter_requests_dropped{endpoint="paraswap"} 18
# HELP gp_v2_api_rate_limiter_successful_requests Number of successful requests.
# TYPE gp_v2_api_rate_limiter_successful_requests counter
gp_v2_api_rate_limiter_successful_requests{endpoint="paraswap"} 5

@MartinquaXD MartinquaXD requested a review from a team as a code owner April 29, 2022 11:50
@MartinquaXD MartinquaXD merged commit 3600251 into main Apr 29, 2022
@MartinquaXD MartinquaXD deleted the rate-limiter-metrics branch April 29, 2022 12:59
@github-actions github-actions bot locked and limited conversation to collaborators Apr 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add metrics for RateLimiter
3 participants