Skip to content

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

@dalnoki

Description

@dalnoki

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

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    Status
    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions