Skip to content

feat(explorer): Add get_issue_details and get_event_details RPCs#110027

Merged
aliu39 merged 7 commits intomasterfrom
aliu/split-issue-tool
Mar 9, 2026
Merged

feat(explorer): Add get_issue_details and get_event_details RPCs#110027
aliu39 merged 7 commits intomasterfrom
aliu/split-issue-tool

Conversation

@aliu39
Copy link
Member

@aliu39 aliu39 commented Mar 6, 2026

Add two focused RPCs to the Seer Explorer tool layer by splitting the responsibilities of get_issue_and_event_details_v2:

get_issue_details(organization_id, issue_id, start?, end?, project_slug?)
Returns issue-level data for a given issue: serialized group metadata (title, status, assignee, priority, etc.), event count timeseries, tags overview, and user activity. Accepts either a numeric group ID or a qualified short ID (e.g. PROJECT-123).

get_event_details(organization_id, event_id?, issue_id?, start?, end?, project_slug?)
Returns a single serialized event. Accepts either a direct event_id or an issue_id (mutually exclusive), in which case it fetches the recommended event for the group within the given time range.

Both are registered as RPCs in seer_rpc.py and organization_seer_rpc.py alongside the existing get_issue_and_event_details_v2, which remains unchanged.

The split allows callers to fetch only the data they need — issue metadata and event data are often needed independently, and combining them in one call was unnecessarily expensive.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 6, 2026
@aliu39 aliu39 changed the title feat(seer): Add get_issue_details and get_event_details RPCs feat(explorer): Add get_issue_details and get_event_details RPCs Mar 6, 2026
@aliu39 aliu39 marked this pull request as ready for review March 6, 2026 01:28
@aliu39 aliu39 requested a review from a team as a code owner March 6, 2026 01:28
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like there should be some kind of consolidation here so the organization_seer_rpc and seer_rpc stay in sync

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the reason for keeping them separate was in case we didnt want to expose some rpc in this endpoint. but agree it's usually inconvenient/a common gotcha

Comment on lines +1149 to +1162
try:
activities = Activity.objects.filter(
group=group,
type__in=_SEER_EXPLORER_ACTIVITY_TYPES,
).order_by("-datetime")[:50]
serialized_activities = serialize(
list(activities), user=None, serializer=ActivitySerializer()
)
except Exception:
logger.exception(
"get_issue_details: Failed to get user activity",
extra={"organization_id": organization_id, "issue_id": issue_id},
)
serialized_activities = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for including user activities? Have you seen it be useful in practice before? I know I personally almost never look at it outside of a retro scenario where I'm collecting timestamps of when things happened.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's useful context if teammates have commented or changed status in the past, also auto sentry actions like marked as regression, assigned by a rule..

aliu39 and others added 2 commits March 9, 2026 09:54
Co-authored-by: Tony Xiao <txiao@sentry.io>
Co-authored-by: Tony Xiao <txiao@sentry.io>
@aliu39 aliu39 enabled auto-merge (squash) March 9, 2026 16:54
@aliu39 aliu39 merged commit 171b6ec into master Mar 9, 2026
55 checks passed
@aliu39 aliu39 deleted the aliu/split-issue-tool branch March 9, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants