Skip to content

Commit

Permalink
chore(cache-warming): add team id to metrics (#27381)
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhpillai authored Jan 9, 2025
1 parent bd3ca52 commit e2307b0
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit e2307b0

Please sign in to comment.