-
Notifications
You must be signed in to change notification settings - Fork 402
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
refactor: centralize metric counter to observability package #1213
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hf
approved these changes
Aug 8, 2023
J0
added a commit
that referenced
this pull request
Aug 8, 2023
## What kind of change does this PR introduce? This PR aims to expose a set of email rate limit metrics as a Prometheus metric that can then be consumed by an alerting system like Prometheus. When a rate limit is triggered we increment a counter. This can then be passed to a monitoring system such as Prometheus alert manager which can fire off a notification (or similar) when a threshold (say 5 occurrences in an hour) has been breached. Extends: #1213 The presence of the metric was tested via using the default `prometheus.yml` file that comes on download. To test that the rate limit is firing, we decreased `GOTRUE_RATE_LIMIT_EMAIL_SENT="5"` to 5 and ran `ab` against the endpoint like `ab -p mass_signup.txt -T application/json -c 10 -n 50 http://localhost:9999/otp` --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
🎉 This PR is included in version 2.92.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
uxodb
pushed a commit
to uxodb/auth
that referenced
this pull request
Nov 13, 2024
…e#1213) - Move metric counter to observability package so that we can reuse it to track other metrics - Rename `NetlifyMicroserviceClaims` to `AuthMicroserviceClaims` Supports the email rate limit task --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
uxodb
pushed a commit
to uxodb/auth
that referenced
this pull request
Nov 13, 2024
## What kind of change does this PR introduce? This PR aims to expose a set of email rate limit metrics as a Prometheus metric that can then be consumed by an alerting system like Prometheus. When a rate limit is triggered we increment a counter. This can then be passed to a monitoring system such as Prometheus alert manager which can fire off a notification (or similar) when a threshold (say 5 occurrences in an hour) has been breached. Extends: supabase#1213 The presence of the metric was tested via using the default `prometheus.yml` file that comes on download. To test that the rate limit is firing, we decreased `GOTRUE_RATE_LIMIT_EMAIL_SENT="5"` to 5 and ran `ab` against the endpoint like `ab -p mass_signup.txt -T application/json -c 10 -n 50 http://localhost:9999/otp` --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 13, 2024
…e#1213) - Move metric counter to observability package so that we can reuse it to track other metrics - Rename `NetlifyMicroserviceClaims` to `AuthMicroserviceClaims` Supports the email rate limit task --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 13, 2024
## What kind of change does this PR introduce? This PR aims to expose a set of email rate limit metrics as a Prometheus metric that can then be consumed by an alerting system like Prometheus. When a rate limit is triggered we increment a counter. This can then be passed to a monitoring system such as Prometheus alert manager which can fire off a notification (or similar) when a threshold (say 5 occurrences in an hour) has been breached. Extends: supabase#1213 The presence of the metric was tested via using the default `prometheus.yml` file that comes on download. To test that the rate limit is firing, we decreased `GOTRUE_RATE_LIMIT_EMAIL_SENT="5"` to 5 and ran `ab` against the endpoint like `ab -p mass_signup.txt -T application/json -c 10 -n 50 http://localhost:9999/otp` --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 15, 2024
…e#1213) - Move metric counter to observability package so that we can reuse it to track other metrics - Rename `NetlifyMicroserviceClaims` to `AuthMicroserviceClaims` Supports the email rate limit task --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 15, 2024
## What kind of change does this PR introduce? This PR aims to expose a set of email rate limit metrics as a Prometheus metric that can then be consumed by an alerting system like Prometheus. When a rate limit is triggered we increment a counter. This can then be passed to a monitoring system such as Prometheus alert manager which can fire off a notification (or similar) when a threshold (say 5 occurrences in an hour) has been breached. Extends: supabase#1213 The presence of the metric was tested via using the default `prometheus.yml` file that comes on download. To test that the rate limit is firing, we decreased `GOTRUE_RATE_LIMIT_EMAIL_SENT="5"` to 5 and ran `ab` against the endpoint like `ab -p mass_signup.txt -T application/json -c 10 -n 50 http://localhost:9999/otp` --------- Co-authored-by: joel@joellee.org <joel@joellee.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NetlifyMicroserviceClaims
toAuthMicroserviceClaims
Supports the email rate limit task