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

feat(server): Expose rate limits for metrics #3347

Merged
merged 14 commits into from
Mar 28, 2024
Prev Previous commit
Next Next commit
test: Update snapshots
  • Loading branch information
jan-auer committed Mar 27, 2024
commit 7246772e0721b24a2d298676115dd7e413c78f2a
30 changes: 17 additions & 13 deletions relay-quotas/src/rate_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ mod tests {
scope: Organization(42),
reason_code: Some(ReasonCode("second")),
retry_after: RetryAfter(10),
namespace: None,
namespace: [],
),
],
)
Expand Down Expand Up @@ -682,7 +682,7 @@ mod tests {
scope: Organization(42),
reason_code: Some(ReasonCode("first")),
retry_after: RetryAfter(10),
namespace: None,
namespace: [],
),
],
)
Expand Down Expand Up @@ -729,7 +729,7 @@ mod tests {
scope: Organization(42),
reason_code: None,
retry_after: RetryAfter(1),
namespace: None,
namespace: [],
),
RateLimit(
categories: [
Expand All @@ -738,7 +738,7 @@ mod tests {
scope: Organization(42),
reason_code: None,
retry_after: RetryAfter(1),
namespace: None,
namespace: [],
),
RateLimit(
categories: [
Expand All @@ -747,7 +747,7 @@ mod tests {
scope: Project(ProjectId(21)),
reason_code: None,
retry_after: RetryAfter(1),
namespace: None,
namespace: [],
),
],
)
Expand Down Expand Up @@ -786,7 +786,9 @@ mod tests {
scope: Organization(42),
reason_code: None,
retry_after: RetryAfter(1),
namespace: Some("custom"),
namespace: [
"custom",
],
),
RateLimit(
categories: [
Expand All @@ -795,7 +797,9 @@ mod tests {
scope: Organization(42),
reason_code: None,
retry_after: RetryAfter(1),
namespace: Some("spans"),
namespace: [
"spans",
],
),
],
)
Expand Down Expand Up @@ -832,7 +836,7 @@ mod tests {
scope: Organization(42),
reason_code: Some(ReasonCode("second")),
retry_after: RetryAfter(10),
namespace: None,
namespace: [],
)
"###);
}
Expand Down Expand Up @@ -875,7 +879,7 @@ mod tests {
scope: Organization(42),
reason_code: None,
retry_after: RetryAfter(1),
namespace: None,
namespace: [],
),
],
)
Expand Down Expand Up @@ -926,7 +930,7 @@ mod tests {
scope: Organization(42),
reason_code: None,
retry_after: RetryAfter(1),
namespace: None,
namespace: [],
),
],
)
Expand Down Expand Up @@ -989,7 +993,7 @@ mod tests {
scope: Organization(42),
reason_code: Some(ReasonCode("zero")),
retry_after: RetryAfter(60),
namespace: None,
namespace: [],
),
],
)
Expand Down Expand Up @@ -1037,7 +1041,7 @@ mod tests {
scope: Organization(42),
reason_code: Some(ReasonCode("second")),
retry_after: RetryAfter(10),
namespace: None,
namespace: [],
),
RateLimit(
categories: [
Expand All @@ -1046,7 +1050,7 @@ mod tests {
scope: Organization(42),
reason_code: None,
retry_after: RetryAfter(1),
namespace: None,
namespace: [],
),
],
)
Expand Down
Loading