getsentry / getsentry/sentry

RetrieveTeam and ListTeamMembers APIs are slow for orgs with many teams/members

Open
#117,651 3 comments 0 reactions 1 assignee View on GitHub

@vgrozdanic is already working on this.

Since Jul 2, 2026.

Product Area: Settings - Integrations Waiting for: Product Owner
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
21h 23m
Merged PRs (30d)
607

Description

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

Summary

RetrieveTeam and ListTeamMembers endpoints have high mean response times and occasional
spikes up to 1 minute. Reported by a customer using both endpoints directly via API as part
of an automated GitHub → Sentry sync process. Please find additional details in the Linear ticket.

Affected Endpoints

Endpoint Params Mean Response Time
GET /api/0/teams/{org}/{team}/ expand=externalTeams 14.4s
GET /api/0/teams/{org}/{team}/members/ per_page=50, cursor pagination 16.2s

Reproduction

  1. Call GET /api/0/teams/{org}/{team}/?expand=externalTeams on an org with many external
    team mappings
  2. Call GET /api/0/teams/{org}/{team}/members/?per_page=50 with cursor pagination on an
    org with many team members
  3. Does not reproduce on small test orgs
Expected Result

Both endpoints should respond faster regradless of org size

Actual Result

Both endpoints return correct results but take 14-16s mean response time on orgs with many team mappings.

Product Area

Settings - Integrations

Link

No response

DSN

No response

Version

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.