getsentry / sentry

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

[Session Replay] Export Replay Embeds/Videos #44919

Open souredoutlook opened 1 year ago

souredoutlook commented 1 year ago

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:

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.

getsantry[bot] commented 1 year ago

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

getsantry[bot] commented 1 year ago

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

therealarkin commented 1 year ago

@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]

billyvg commented 1 year ago

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

mwarkentin commented 1 year ago

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.

kessiler commented 8 months ago

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.

bruno-garcia commented 7 months ago

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?

kessiler commented 7 months ago

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.

bruno-garcia commented 7 months ago

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