getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
37.51k stars 4.04k forks source link

Session Replays Not Working for Front End Errors in AspNetCore #72511

Open karl-gardner opened 3 weeks ago

karl-gardner commented 3 weeks ago

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Create a new project in with visual studio as an AspNetCore Web App (Model-View-Controller): image

  2. Should have the following folder structure: image

  3. Create new project in Sentry with browser javascript:

image

  1. Add the following line of code to the header in the Views/Home/Shared/_Layout.cshtml file with the correct dsn number for that project:

image

  1. Add the following line of code to the Views/Home/Privacy.cshtml file to trigger an error that is sent to sentry:

image

  1. Run the solution and click on the Privacy tab at the top and the error will be triggered and sent to the Sentry project:

image

Expected Result

Since session replays are on by default with the loader script:

https://docs.sentry.io/platforms/javascript/install/loader/

This should trigger an Error with a session replay as we threw an error in the Githubissues.

  • Githubissues is a development platform for aggregating issues.