broadinstitute / single_cell_portal_core

Rails/Docker application for the Broad Institute's single cell RNA-seq data portal
https://singlecell.broadinstitute.org
BSD 3-Clause "New" or "Revised" License
62 stars 26 forks source link

Enable canvas recording for Sentry replays (SCP-5826) #2151

Closed bistline closed 1 day ago

bistline commented 2 weeks ago

BACKGROUND & CHANGES

This updates the Sentry SDK to 7.119.1 to enable recording of canvas & WebGL DOM components during Session Replays and also address an open Dependabot alert. This will allow us much greater insight into user behavior when triaging front-end errors.

Demo of new replays (fast-forward to ~6:15 to see the new plots): https://broad-institute.sentry.io/replays/d6ee1185376e4b70832e94a965801330/?environment=development&project=1424198&query=&referrer=%2Freplays%2F&statsPeriod=14d&yAxis=count%28%29

MANUAL TESTING

  1. Boot as normal
  2. In your IDE, open app/javascript/lib/sentry-logging.js and in getIsSuppressedEnv() to add return false at line 71
  3. On line 122, set replaysOnErrorSampleRate to 1.0
  4. Back in a browser, load any study with fully initialized plots
  5. Query for one gene, and then once the plot has loaded use the Return to cluster view button immediately to the right of the gene search bar: Screenshot 2024-10-08 at 11 12 32 AM
  6. This will throw an error that is reported to Sentry (you can confirm this in the JS console & network tab) that should also now include a replay
  7. Go to Sentry Replays, make sure you have the development environment selected, and then find your replay, confirming you see the content of scatter plots
codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 69.96%. Comparing base (d2f033c) to head (3c6cf31). Report is 13 commits behind head on development.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2151/graphs/tree.svg?width=650&height=150&src=pr&token=HMWE5BO2a4&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute)](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2151?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute) ```diff @@ Coverage Diff @@ ## development #2151 +/- ## =============================================== - Coverage 69.97% 69.96% -0.02% =============================================== Files 331 331 Lines 27990 27990 Branches 2452 2452 =============================================== - Hits 19585 19582 -3 - Misses 8259 8262 +3 Partials 146 146 ``` | [Files with missing lines](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2151?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute) | Coverage Δ | | |---|---|---| | [app/javascript/lib/sentry-logging.js](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2151?src=pr&el=tree&filepath=app%2Fjavascript%2Flib%2Fsentry-logging.js&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute#diff-YXBwL2phdmFzY3JpcHQvbGliL3NlbnRyeS1sb2dnaW5nLmpz) | `70.21% <ø> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/broadinstitute/single_cell_portal_core/pull/2151/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=broadinstitute)