Skip to content

feat(replays): switch to replay_id column from tag #68950

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

Merged
merged 7 commits into from
Apr 22, 2024

Conversation

JoshFerge
Copy link
Member

We want to have the replay_id column be queried on instead of the tag that we previously had, as we no longer are populating the tag for non javascript platforms. Depends on getsentry/snuba#5777.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 15, 2024
Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.71%. Comparing base (e363ddd) to head (824d4a8).
Report is 174 commits behind head on master.

❗ Current head 824d4a8 differs from pull request most recent head 8666d0c. Consider uploading reports for the commit 8666d0c to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #68950       +/-   ##
===========================================
+ Coverage   58.23%   79.71%   +21.47%     
===========================================
  Files        6415     6425       +10     
  Lines      284354   284956      +602     
  Branches    49001    49072       +71     
===========================================
+ Hits       165583   227142    +61559     
+ Misses     118367    57415    -60952     
+ Partials      404      399        -5     
Files Coverage Δ
src/sentry/models/group.py 96.78% <ø> (+32.33%) ⬆️
...try/replays/endpoints/organization_replay_count.py 94.64% <ø> (+25.15%) ⬆️
src/sentry/replays/usecases/replay_counts.py 95.18% <100.00%> (+68.93%) ⬆️
src/sentry/search/events/builder/discover.py 96.40% <100.00%> (+18.82%) ⬆️
src/sentry/snuba/events.py 100.00% <100.00%> (ø)
src/sentry/utils/snuba.py 93.74% <ø> (+17.58%) ⬆️

... and 1904 files with indirect coverage changes

# replayId. We allow this query for backwards compatibility,
# but in the future shouldn't be displayed in the UI anywhere
# as a suggested column.
REPLAY_ID_DEPRECATED = Column(
Copy link
Member

Choose a reason for hiding this comment

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

Where is this used?

Copy link
Member

Choose a reason for hiding this comment

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

Because this was exposed to discover/dashboards, you'll want to make sure it's not being used by customers if you were to remove it.

Copy link
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

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

Are you doing any sort of backfill here? Or will querying on this col this return no results for older rows?

if data_source == Dataset.Discover:
search_query_func = discover.query
elif data_source == Dataset.IssuePlatform:
search_query_func = issue_platform.query # type: ignore[assignment]
Copy link
Member

Choose a reason for hiding this comment

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

Just checking we actually write to this col from issue platform?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Ok - so as long as it's in the context for the event we pass to snuba it should work...

Are replays associated to transactions? If so, then perf issues from transactions should work automatically. Other issue platform types that make a "synthetic" event would need to explicitly include it there

Copy link
Member Author

@JoshFerge JoshFerge Apr 17, 2024

Choose a reason for hiding this comment

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

yup, replays are associated to transactions. its done via the dynamic sampling context, which then adds the replay context in relay. and for others:

rage click issue:

contexts = {"replay": {"replay_id": replay_id}}

feedback issue:

ret_event["contexts"]["replay"] = {

Crons
-- not applicable

that should be everything

@JoshFerge
Copy link
Member Author

Are you doing any sort of backfill here? Or will querying on this col this return no results for older rows?

we've been writing this column for a little over a year now, just haven't been querying on it since we had the tag as well.

@wedamija
Copy link
Member

Are you doing any sort of backfill here? Or will querying on this col this return no results for older rows?

we've been writing this column for a little over a year now, just haven't been querying on it since we had the tag as well.

I see, I missed that the snuba pr is just adding the col to the merge table 👍

@JoshFerge JoshFerge merged commit 6db38a2 into master Apr 22, 2024
37 checks passed
@JoshFerge JoshFerge deleted the jferg/discov-replay branch April 22, 2024 18:51
Copy link

sentry-io bot commented Apr 22, 2024

Suspect Issues

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

  • ‼️ RateLimitExceeded: Query on could not be run due to allocation policies, details: {'ConcurrentRateLimitAllocationPol... sentry.tasks.post_process.post_process_group View Issue
  • ‼️ SnubaError: HTTPConnectionPool(host='127.0.0.1', port=10006): Read timed out. (read timeout=30) /api/0/organizations/{organization_slug}/replay... View Issue
  • ‼️ RateLimitExceeded: Query on could not be run due to allocation policies, details: {'ConcurrentRateLimitAllocationPol... sentry.tasks.activity.send_activity_notifications View Issue
  • ‼️ SnubaError: HTTPConnectionPool(host='127.0.0.1', port=10006): Max retries exceeded with url: /discover/snql (... sentry.tasks.post_process.post_process_group View Issue
  • ‼️ SnubaError: HTTPConnectionPool(host='127.0.0.1', port=10006): Max retries exceeded with url: /discover/snql (... /api/0/organizations/{organization_slug}/replay... View Issue

Did you find this useful? React with a 👍 or 👎

MichaelSun48 pushed a commit that referenced this pull request Apr 25, 2024
We want to have the replay_id column be queried on instead of the tag
that we previously had, as we no longer are populating the tag for non
javascript platforms. Depends on
getsentry/snuba#5777.
@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants