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

add filters to enable session recordings #2966

Closed
rikinsk opened this issue Jan 18, 2021 · 10 comments
Closed

add filters to enable session recordings #2966

rikinsk opened this issue Jan 18, 2021 · 10 comments
Labels
enhancement New feature or request

Comments

@rikinsk
Copy link

rikinsk commented Jan 18, 2021

Is your feature request related to a problem?

it would be cool if we could restrict session recordings based on a url pattern or other such properties to avoid recordings on unwanted pages/sessions

Describe the solution you'd like

add filter options to enable session recording based on user/page properties

Describe alternatives you've considered

currently the workaround would be to disable session recordings via config on pages but that is quite a cumbersome process when you just want to enable the feature for a very specific set of pages

Additional context

Thank you for your feature request – we love each and every one!

@rikinsk rikinsk added the enhancement New feature or request label Jan 18, 2021
@yakkomajuri
Copy link
Contributor

yakkomajuri commented Jan 18, 2021

This makes sense to me, thanks for submitting!

cc @macobo @paolodamico

@macobo
Copy link
Contributor

macobo commented Jan 19, 2021

@rikinsk - can you elaborate on the why? Is the request here about avoiding running out of storage space or about finding interesting recordings to be viewing at or something else?

Possibly related ticket: #2389

@rikinsk
Copy link
Author

rikinsk commented Jan 21, 2021

@macobo A combination of them all I would say :).

  • Storage space: Thats is definitely a concern as recordings do take up a lot more space than simple events data. Additionally recording and persisting lots of sessions must definitely have a performance impact requiring additional resources to be allotted
  • Uninteresting sessions: There might be a very small subset of sessions that we might actually be interested in and the rest might end up being just noise which would have to be cleaned up.
    • Case 1: We might have an app with a lot of read-only pages and just a few pages that are interactive. e.g. a blog with lots of articles and just one page where a user can signup for updates. Here we might want recordings of only sessions that involve the signup page.
    • Case 2: We might simply be interested in how new users interact with our app and hence might just want to record first time visitors to our app or just sessions that involve the signup page.
  • Security/Trust: Some pages of an app might be dealing with highly sensitive data which should never be recorded e.g. payment pages where users enter credit card details, etc.

The above being said, having the ability to filter sessions based on certain criteria (e.g. includes a particular path or action) would also be an immensely powerful feature

@macobo
Copy link
Contributor

macobo commented Jan 21, 2021

Thanks for sharing the context.

Regarding uninteresting sessions - we'll be releasing #2595 next array which should help with both usecases you brought up.

Storage space: Agreed. Here's what we have in mind:

  1. Retaining recordings for a shorter period in the db, with the option to back up to s3: Save old session recordings to S3 #2142
  2. Allow setting a sampling percentage + filter criteria similar to feature flags

Re security/trust: Agreed. Trying to do this on server-side is tricky due to prevalence of single-page apps. https://posthog.com/docs/features/session-recording#ignoring-sensitive-elements is another way of handling this, though perhaps we can improve the documentation further here. cc @yakkomajuri

🚀

@rikinsk
Copy link
Author

rikinsk commented Jan 21, 2021

Thanks for the quick response!

FWIW, I had already seen and was able to find the docs on hiding sensitive elements with ease and it's great you folks had thought of it already.

That being said, Its just a matter of convenience to be able to just disable recording on a particular page if needed rather than having to update code and deploy changes as I am sure you could imagine.

Great work and thanks for this feature btw!

@posthog-bot
Copy link
Contributor

This issue hasn't seen activity in 6 months. Is it still relevant?

@Twixes Twixes removed the stale label Aug 3, 2021
@macobo
Copy link
Contributor

macobo commented Sep 27, 2021

Another request today from users chat: #2966

Hi folks, any way to enable recordings conditionally based on some user properties?
Recordings take up a lot of space, so we wish to run recordings for only a small segment of users

@yakkomajuri
Copy link
Contributor

This is actually doable now via feature flags @macobo. Users should default session recording to false and then conditionally call the method to enable it based on a feature flag.

@yakkomajuri
Copy link
Contributor

the method is posthog.startSessionRecording

@pauldambra
Copy link
Member

This would be possible in posthog-js now by conditionally stopping and starting recordings from application code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants