Skip to content

feat(seer-explorer): Create Seer RPC methods to fetch data needed for index #95937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

roaga
Copy link
Member

@roaga roaga commented Jul 18, 2025

Creates and registers Seer RPC methods that sample recent:

  • transactions
  • traces
  • profiles
  • issues

given that the Seer side will know what projects/orgs it needs data for

@roaga roaga requested a review from a team as a code owner July 18, 2025 21:30
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 18, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link

codecov bot commented Jul 18, 2025

Codecov Report

Attention: Patch coverage is 92.12454% with 43 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/index_data.py 75.00% 42 Missing ⚠️
tests/sentry/seer/explorer/test_index_data.py 99.32% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #95937      +/-   ##
==========================================
+ Coverage   76.32%   76.34%   +0.01%     
==========================================
  Files       10589    10594       +5     
  Lines      609979   610546     +567     
  Branches    23989    23989              
==========================================
+ Hits       465593   466131     +538     
- Misses     142454   142483      +29     
  Partials     1932     1932              

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link

@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.

Bug: Snuba Query Parsing Fails on Unquoted Values

Unquoted transaction names and trace IDs in Snuba query strings (lines 139, 174, 278) lead to query parsing errors and unexpected results when these values contain spaces or special characters. This is inconsistent with the correct quoting used for transaction names on line 401.

src/sentry/seer/explorer/index_data.py#L138-L139

params=snuba_params,
query_string=f"transaction:{transaction_name} project.id:{project_id}",

Fix in CursorFix in Web


Bug: Trace Span Count Capped Incorrectly

The total_spans field in the TraceData object is incorrectly set to the count of retrieved spans, which is capped by a query limit of 1000. The actual total span count for the trace is available from an earlier query but is not used, leading to a misleading value if the trace contains more than 1000 spans.

src/sentry/seer/explorer/index_data.py#L207-L214

return TraceData(
trace_id=chosen_trace_id,
project_id=project_id,
transaction_name=transaction_name,
total_spans=len(spans),
spans=spans,
)

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

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.

1 participant