PostHog / posthog

šŸ¦” PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
20.7k stars 1.24k forks source link

Improvement: Group by minute #10633

Open joao-venue opened 2 years ago

joao-venue commented 2 years ago

Is your feature request related to a problem?

Hello, guys šŸ‘‹ ,

I'm part of the Venue team. We integrated PostHog into our product recently. I recently posted in PostHog's community-support channel on Slack, asking whether we could create insight charts with the data grouped by minute, instead of by hour/day/week/month.

What is our goal?

For a given meeting, monitor video metrics (WebRTC) during the meeting. The goal is to understand how the video is performing for each user in the meeting, both for the sender as well as for the receiver.

The proposed solution

Each user sends events to PostHog with video metrics every 20 seconds. An insight (trend chart) is created for each video metric we want to monitor (e.g. 2 Insights per Speaker, 1 for the sender, 1 for receivers). The event payload contains information that we use for filtering (e.g. the meeting id and the user id in case of receivers insight). We would like to group the events in those charts by minute, so we can monitor how the video is performing by comparing the results minute-by-minute.

The problem

PostHog charts can't be grouped by minute. Grouping by hour isn't enough in this case, given that most meetings take less than 2 hours.

Describe the solution you'd like

Possible Solution

Allow grouping by minute if the date range is "Today", "Yesterday", or "Last 24 hours". I've seen that the possibility of grouping charts by minute was removed because of problems when the date range is too big (1 year, for example): https://github.com/PostHog/posthog/issues/7625 I'm assuming it is not a problem when the date range is short (1 day).

I also noticed that some recent improvements were made in Date Filters (marked as experimental behind ff) but I don't think the possibility of grouping by minute has been added back in that PR: https://github.com/PostHog/posthog/pull/10462

Describe alternatives you've considered

Using "Breakdown by" to group the events by timestamp. That works well for tables, but not very well with charts.

I really appreciate your help and the attention I already had on the Slack Group šŸ™‚

ConnorVG commented 2 years ago

I've been looking for this solution myself for a very similar use case, was going to open an issue but I found this one asking for exactly what I would like myself.