posthog
posthog copied to clipboard
fix: Fix and improve "Debug CH Queries"
Problem
- The modal often doesn't show queries as the caching is kind of unreliable.
- If you're self hosting, you should always have access to this data without having to make yourself staff
Changes
- Use system.query_log instead of this caching mechanism
- Always allow you to view this if you're self hosting
- Filtering based on the path of the request, so you don't have to scroll through a ton of queries to find relevant ones
- Show exceptions if any

👉 Stay up-to-date with PostHog coding conventions for a smoother review.
How did you test this code?
command + k
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.
this is epic