sentry icon indicating copy to clipboard operation
sentry copied to clipboard

[Session Replay] Export Replay Embeds/Videos

Open souredoutlook opened this issue 2 years ago • 13 comments

Problem Statement

Customers want to be able to add Replays to work items in places like Jira, Asana, Linear etc.

The request is usually framed like so:

  • "How can I download a video of this Replay"
  • "How can I share this Replay"

Solution Brainstorm

Embedded Replays might allow authenticated Sentry users to view the playback outside of Sentry in whatever tool is used to manage project work.

See linked Support Request: https://sentry.zendesk.com/agent/tickets/80723

Additional use case from @vinayman (issue)

For example, two API endpoints: One giving us all session replay events with unique identifiers with some metadata on the session replay with some suitable query params and would return: e.g., a user (if available), IP address, date/period of the session etc.

Another with the API query param of the session replay identifier and perhaps for example, what we want, e.g., ?data=user-click, returning: a time-series of user clicks (with the DOM elements).

I understand DOM elements might be challenging to return via API when they are excessively large. Perhaps we can have a query param that allows you to select what DOM elements to query, e.g., ?dom=only-children -> where it would return the innermost DOM element/child or ?dom=id -> where it would return the ID of the DOM elements only.

souredoutlook avatar Feb 21 '23 21:02 souredoutlook

Assigning to @getsentry/support for routing, due by (yyz). ⏲️

getsantry[bot] avatar Feb 21 '23 21:02 getsantry[bot]

Routing to @getsentry/replay for triage, due by (yyz). ⏲️

getsantry[bot] avatar Feb 21 '23 21:02 getsantry[bot]

@evanpurkhiser will your graph screenshot widget will cover/can be ported for this use case easily? [I'm not implying this is a priority, just connecting the dots since Evan demo'd something similar for graphs very recently]

therealarkin avatar Feb 23 '23 07:02 therealarkin

leaving this here https://github.com/rrweb-io/rrvideo

billyvg avatar Feb 23 '23 21:02 billyvg

Embedded Replays might allow authenticated Sentry users to view the playback outside of Sentry in whatever tool is used to manage project work.

@souredoutlook seems like retention might be an issue for this here? People might want to be able to go back to a ticket a few months later and still view the replay. Being able to export as a video they can store externally seems like the most likely way to make this possible.

mwarkentin avatar Mar 08 '23 13:03 mwarkentin

Hello @souredoutlook, I'm also interested in the outcome of this issue. Many users, including those on platforms like LogRocket (me) and PostHog, benefit from the ability to export session data for long-term storage or later restoration. It would be extremely useful if Sentry could integrate a feature that allows exporting replays directly to a cloud service like Google Cloud Storage, S3 Buckets. This would enable us to save replays for longer periods and restore them to Sentry when needed, providing flexibility in managing and archiving session data.

kessiler avatar Nov 08 '23 18:11 kessiler

Thanks for describing your use case. Could you share in more detail what types of problems does this workflow help you with? Replays live in Sentry for 3 months, that's for bugs that happen where the replay is helpful but the issue isn't high priority? Woundn't a similar replay come in eventually if the issue is still going on?

bruno-garcia avatar Nov 09 '23 17:11 bruno-garcia

hey @bruno-garcia. Thanks for your reply! Indeed, the recurring bugs can typically be captured by Sentry's 3-month retention. However, the need for exporting session replays extends beyond bug tracking. In business-critical situations, especially where user actions have legal or financial implications, the ability to review a user's session even after a long time can be invaluable. For example, consider a user's interaction with a tax filing application. If discrepancies are found in their tax submission, they might query this several months or even a year later. Having the ability to retrieve and review the session replay could provide crucial insights into user behavior, help rectify any user errors, or defend the application's functionality.

By allowing us to export and archive session data, we'd be empowered to support long-term audits, compliance requirements, and customer service inquiries.

kessiler avatar Nov 09 '23 18:11 kessiler

Thanks for sharing your use case! That makes sense. We're working on a service that can render the replay and allow us to get screenshots/video as well as accessibility issues. Once that's live we'll be unblocked to add this and a round of prioritization will happen

bruno-garcia avatar Nov 14 '23 17:11 bruno-garcia

any updates?

wellermiranda avatar Oct 03 '24 10:10 wellermiranda

any updates?

We have a service that can render the replay on a headless chrome but it's quite slow and hard to operate. So we haven't decided yet if we'll be adding an export functionality based on that.

@jas-kas for prioritizatoin

bruno-garcia avatar Oct 03 '24 16:10 bruno-garcia

Hey @wellermiranda, thanks for following up. This is not currently scoped in the team's work for this quarter. However, we might revisit this for work planned in Q4 (beginning in November).

jas-kas avatar Oct 03 '24 16:10 jas-kas

Thank you @bruno-garcia and @jas-kas

wellermiranda avatar Oct 03 '24 18:10 wellermiranda

I would be very interested in this feature for the following use case. We have session recording enabled for our production and staging environments already. We would like to use some of these recordings to create tutorials and training material for our customers as well as some of our engineers. Ideally, we would just be able to either export the recordings from sentry or have some method for storing them and replaying them later. I have played around with grabbing the events through the API but they don't seem to play in rrweb-player. I only see the first frame and the time is all wrong.

enxoco avatar Nov 06 '24 13:11 enxoco

create tutorials and training material for our customers

Do you use Sentry as a recording tool? There are desktop-based tools for recording the screen that can provide this service though

bruno-garcia avatar Nov 06 '24 14:11 bruno-garcia

create tutorials and training material for our customers

Do you use Sentry as a recording tool? There are desktop-based tools for recording the screen that can provide this service though

Yes I am well aware of that, I am looking for a more automated approach though.

enxoco avatar Nov 06 '24 14:11 enxoco

This would be amazing!

frmsaul avatar Nov 13 '24 18:11 frmsaul

I would much appreciate this feature as well.

ant1m4tt3r avatar Dec 19 '24 14:12 ant1m4tt3r

also requested here: https://sentry.zendesk.com/agent/tickets/147546 User would like to be able to share replays with someone that do not have access to Sentry

rodolfoBee avatar Mar 14 '25 10:03 rodolfoBee

I would love to be able to feed a session replay to an AI agent and ask it to use it to reproduce and fix a bug. We have an MCP allow the AI to access Sentry issues, and an MCP to allow it to control an iOS simulator, this is the missing piece.

zsperske avatar Mar 30 '25 04:03 zsperske

I would love to be able to feed a session replay to an AI agent and ask it to use it to reproduce and fix a bug. We have an MCP allow the AI to access Sentry issues, and an MCP to allow it to control an iOS simulator, this is the missing piece.

Sentry is building Autofix: https://sentry.io/resources/autofix-workshop/ It takes context from an error, trace and additional data connected to it to find the root cause, and open a PR to fix the issue.

MCP is being explored here: https://github.com/getsentry/sentry-mcp

bruno-garcia avatar Apr 01 '25 16:04 bruno-garcia

Another request for this here: https://sentry.zendesk.com/agent/tickets/149844

Fwang36 avatar Apr 11 '25 15:04 Fwang36

I have had some success writing a "convertor" tool that grabs the data from the Sentry API and replays it on a page using rrweb. I then calculate the length of the session and run Playwright headless against the page loaded with the replay. I keep Playwright running idle for the length of the session and then close it afterwards. I also have video recording turned on so it works fairly well to produce a video recording of my sessions. I have a basic UI that allows my users to view and "export" the replays. Unfortunately it takes as long as the session in question to "convert" it so it's not ideal for getting a quick export but I could potentially speed up the process by breaking the replays up into chunks and playing around with sharding in playwright.

enxoco avatar Apr 11 '25 15:04 enxoco

@enxoco You might be able to create a faster process with something like https://github.com/rrweb-io/rrvideo (alt: https://github.com/rrweb-io/rrweb/tree/master/packages/rrvideo). It also uses playwright internally it seems.

ryan953 avatar Apr 11 '25 18:04 ryan953

Another request for this feature here: https://sentry.zendesk.com/agent/tickets/149866

minori-fh avatar Apr 16 '25 02:04 minori-fh

@ryan953 I actually tried that approach first but I couldn't get it to run properly for whatever reason so I just decided to roll my own.

enxoco avatar Apr 18 '25 15:04 enxoco

Hi,

Is there an update on this? Currently handlers are screen recording the videos which is taking a lot of time and we are considering other providers.

mattcarterlakanaught avatar May 22 '25 15:05 mattcarterlakanaught

Hi,

Is there an update on this? Currently handlers are screen recording the videos which is taking a lot of time and we are considering other providers.

@mattcarterlakanaught We currently don't have any plans to implement an end to end, "export to video" feature -- however, as a short-term solution, we could look into allowing a method of exporting the recording data as JSON, something you could feed into rrvideo so that generate a video yourselves. Would something like this be useful?

billyvg avatar May 22 '25 19:05 billyvg

Hi, Is there an update on this? Currently handlers are screen recording the videos which is taking a lot of time and we are considering other providers.

@mattcarterlakanaught We currently don't have any plans to implement an end to end, "export to video" feature -- however, as a short-term solution, we could look into allowing a method of exporting the recording data as JSON, something you could feed into rrvideo so that generate a video yourselves. Would something like this be useful?

That would be a great interim solution for us

rfink avatar May 22 '25 20:05 rfink

I'm going to keep this issue open, but in the mean time you can export the replay JSON now from the dropdown in the header as seen in the screenshots in https://github.com/getsentry/sentry/pull/92310

billyvg avatar May 29 '25 20:05 billyvg