Skip to content

Conversation

roaga
Copy link
Member

@roaga roaga commented Oct 7, 2025

Adds RPC endpoints to:

  • get all projects in an organization (needed for the query builder)
  • get time series data for a specific query (used to create charts)
  • get samples and aggregates tabular data for a specific query (used to create a table of results)

These endpoints are used in Seer here.

These simulate calling the events and events-stats endpoints, which is what is used by the frontend to render the chart and table on Trace Explorer.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 7, 2025
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

❌ Patch coverage is 92.85714% with 4 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/seer/explorer/tools.py 91.48% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #101133    +/-   ##
=========================================
  Coverage   81.09%    81.10%            
=========================================
  Files        8666      8669     +3     
  Lines      384491    384639   +148     
  Branches    24268     24268            
=========================================
+ Hits       311813    311967   +154     
+ Misses      72333     72327     -6     
  Partials      345       345            

@roaga roaga marked this pull request as ready for review October 7, 2025 23:20
@roaga roaga requested a review from a team as a code owner October 7, 2025 23:20
cursor[bot]

This comment was marked as outdated.

logger.warning("No projects found for organization", extra={"org_id": org_id})
return None

params: dict[str, Any] = {
Copy link
Member

Choose a reason for hiding this comment

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

what do you think about moving more of this logic to the caller? so that way this can basically be a passthrough

Copy link
Member Author

Choose a reason for hiding this comment

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

hmm to me this stuff feels like a lot of internal implementation of querying sentry data though, rather than stuff seer should worry about

Copy link
Member

Choose a reason for hiding this comment

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

it's transformations that seer needs to consume sentry data though right? shouldn't it live in seer? the more you can make this a passthrough interface, the easier it gets to add new ones if you need, IMO.

)
data = resp.data

# Normalize response format: single-axis returns flat format, multi-axis returns nested
Copy link
Member

Choose a reason for hiding this comment

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

also wondering if we can do this in the caller

@roaga roaga merged commit 69bbf64 into master Oct 9, 2025
65 checks passed
@roaga roaga deleted the explorer/trace-query-rpc branch October 9, 2025 17:20
Copy link

sentry-io bot commented Oct 9, 2025

Issues attributed to commits in this pull request

This pull request was merged and Sentry observed the following issues:

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.

3 participants