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-warming): add team id to metrics #27381

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion posthog/caching/warming.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ def schedule_warming_for_teams_task():
capture_ph_event(
str(team.uuid),
"cache warming - insights to cache",
properties={"count": len(insight_tuples)},
properties={
"count": len(insight_tuples),
"team_id": team.id,
"organization_id": team.organization_id,
},
)

# We chain the task execution to prevent queries *for a single team* running at the same time
Expand Down Expand Up @@ -233,6 +237,8 @@ def warm_insight_cache_task(insight_id: int, dashboard_id: Optional[int]):
"insight_id": insight.pk,
"dashboard_id": dashboard_id,
"is_cached": is_cached,
"team_id": insight.team_id,
"organization_id": insight.team.organization_id,
},
)

Expand Down
Loading