Skip to content
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

Improve Session Replay integration with server rendered HTML pages #9490

Open
bruno-garcia opened this issue Nov 8, 2023 · 8 comments
Open
Assignees
Labels
Package: replay Issues related to the Sentry Replay SDK

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented Nov 8, 2023

We're working on onboarding for backend project to include browser support. Similar to how we have NextJS, Remix, we want to onboarding for Laravel, ASP.NET, Django, Express, Spring, etc to include a snippet to be added to their html template. Enabling an experience to a single framework such as NextJS:

I was talking to @mydea and a few ideas came up:

  • Tracing end to end
  • Release from trace baggage (to make it easier to onboard with the loader, uses same release version as backend)
  • If exception happens on the backend, we want to replay to sample.
    • Pass event_Id to the frontend so replay can send it. We could also define the replay_id on the backend so the error includes
      • Could be done by setting the replay_id on the baggage given by the BE to the FE when rendering
    • but for that to make sense we need the buffer to persist page loads
    • Needs: remove minFlushDelay
    • Keep last 30 seconds buffer for on error somehow?
      • Shared worker?
      • In the compression worker have an opt-in to store data in the worker in indexDB.

Also:

@mydea mydea changed the title Improve SSR integration with browser monitoring Improve Session Replay integration with server rendered HTML pages Nov 8, 2023
@mydea mydea added the Package: replay Issues related to the Sentry Replay SDK label Nov 8, 2023
@mydea
Copy link
Member

mydea commented Nov 9, 2023

ref: #9468

@bruno-garcia
Copy link
Member Author

Set to p1 because we're improving onboarding for MPA this quarter

@bruno-garcia
Copy link
Member Author

Realistically unlikely we'll tackle this in the next 2 months

@souredoutlook
Copy link
Member

Something I think we can tackle now without adding features is maybe making a guide with Laravel (or similar) about how to wring the most out of Replay by re-throwing back end errors on the front end or cooking the baggage headers to get the traces tab to conform with the framework.

@ericemmrich
Copy link

Something I think we can tackle now without adding features is maybe making a guide with Laravel (or similar) about how to wring the most out of Replay by re-throwing back end errors on the front end or cooking the baggage headers to get the traces tab to conform with the framework.

That would already help a lot - thank you in advance!

@bruno-garcia
Copy link
Member Author

Came up on Twitter too:

image

@mydea
Copy link
Member

mydea commented Jun 3, 2024

Side note, you can try setting up replay with this config:

replayIntegration({
  minReplayDuration: 0,
  flushMinDelay: 200,
  flushMaxDelay: 250,
})

To get an experience that is better suited for MPAs!

@mydea
Copy link
Member

mydea commented Jun 10, 2024

See: https://www.notion.so/sentry/Replay-for-Server-Side-Rendered-SSR-Applications-a203bcba705a4823a9c5fbaed551c9af (internal document tracking possible implementation paths for this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: replay Issues related to the Sentry Replay SDK
Projects
Status: No status
Development

No branches or pull requests

6 participants