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

Session replay filtering does not work as expected when several filter options specified #26549

Open
bacher opened this issue Nov 29, 2024 · 1 comment
Assignees
Labels
bug Something isn't working right

Comments

@bacher
Copy link

bacher commented Nov 29, 2024

Bug Description

Bug description

When I try to filter session replays by specific events and match logic is set to AND I see results like if those filters applied with OR logic, so I see events that contains the first event or the second event, but I would expect that I should see the only records which includes both events at the same time, so logic operator AND.

On this screenshot you can see results when both event are specified as filters:

image

Then I removed the second filter and my results got shrunk to just 1 session:

image

Expect results that adding of new filtering rule will shrunk number of results and
removing of filtering rule should increase number of results.


We actually checked results, and can confirm, that returned sessions do not contain targeted event (except for 1 of course).


If you are on PostHog Cloud it would be really valuable if you can share any links where the problem occurs. This speeds up our ability to troubleshoot tremendously.

session replays

How to reproduce

  1. Add a few filters with Match logic set to AND;
  2. Number of results get growth but should reduce.

Additional context

Debug info

- [x] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables or https://eu.posthog.com/settings/project-details#variables]

Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/01937830-fbd6-7b24-b3c3-f984f1c302f3?t=941
Admin: http://go/adminOrgUS/01826d68-12b6-0000-a6a7-29ce579bab99 (project ID 49356)
Sentry: http://go/sentryUS/49356

- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
@bacher bacher added the bug Something isn't working right label Nov 29, 2024
@pauldambra
Copy link
Member

Ugh, annoying!

I have this PR which is changing some of the query code here and the tests already forced me to account for the AND/OR of some things so I'm surprised this isn't covered

I'll get that PR in since I'd have to make a fix to filtering in two places otherwise and then look at this

thanks for reporting it!

@pauldambra pauldambra self-assigned this Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right
Projects
None yet
Development

No branches or pull requests

2 participants