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

chore: cache error tracking query longer #27555

Closed
wants to merge 3 commits into from
Closed

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Jan 15, 2025

Problem

Error tracking queries are not being cached for long enough

Changes

Without the query_date_range the cache_target_age interval gets set to minute, which results in a 15 second cache. Bumping the interval to hour will cache for 15 minutes which feels more reasonable for the error tracking query

@daibhin daibhin requested a review from a team January 15, 2025 14:39
@neilkakkar
Copy link
Contributor

something to eventually think about: One workflow I love with sentry is:

  1. I go into a user account to try and repro a bug. This throws an error
  2. I immediately go into sentry to find the issues in the last few minutes to correlate and find the right one (maybe some searches as well, but it can sometimes be hard to figure out what to search for, like in async cohort recalculation celery tasks)
  3. Sentry shows me the exact issue and I can go from there

With caching for 15 minutes at a time, this workflow becomes much more painful...

@daibhin
Copy link
Contributor Author

daibhin commented Jan 16, 2025

I think what we can do here for the case Neil mentioned is to use the cached results if present but continue to load in the background to refresh the cache. I believe this is called lazy_async but will need to confirm with the product analytics folks. And for how to implement that within the data table logic... 🤷‍♂️

@posthog-bot
Copy link
Contributor

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. If you want to permanentely keep it open, use the waiting label.

@posthog-bot
Copy link
Contributor

This PR was closed due to lack of activity. Feel free to reopen if it's still relevant.

@posthog-bot posthog-bot closed this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants