Skip to content

Commit 6807124

Browse files
JoshFergeandrewshie-sentry
authored andcommitted
ref(issues): add rate limits to tagkey details (#94626)
same rate limits added in #94486 to this endpoint. This endpoint is experiencing high volume as well.
1 parent d0e1aa6 commit 6807124

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/sentry/api/endpoints/group_tagkey_details.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from sentry.apidocs.utils import inline_sentry_response_serializer
2222
from sentry.models.environment import Environment
2323
from sentry.tagstore.types import TagKeySerializer, TagKeySerializerResponse
24+
from sentry.types.ratelimit import RateLimit, RateLimitCategory
2425

2526

2627
@extend_schema(tags=["Events"])
@@ -30,6 +31,15 @@ class GroupTagKeyDetailsEndpoint(GroupEndpoint):
3031
"GET": ApiPublishStatus.PUBLIC,
3132
}
3233
owner = ApiOwner.ISSUES
34+
enforce_rate_limit = True
35+
36+
rate_limits = {
37+
"GET": {
38+
RateLimitCategory.IP: RateLimit(limit=10, window=1),
39+
RateLimitCategory.USER: RateLimit(limit=10, window=1),
40+
RateLimitCategory.ORGANIZATION: RateLimit(limit=40, window=1),
41+
}
42+
}
3343

3444
@extend_schema(
3545
operation_id="Retrieve Tag Details",

0 commit comments

Comments
 (0)