Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(signals): rename census day property to census_date (#127022)

posthog[bot]13a54e7e22a7
diff --git a/products/signals/backend/anomaly_scores/tick.py b/products/signals/backend/anomaly_scores/tick.py
index 9d9857c9b9c5..0a8541b31a1b 100644
--- a/products/signals/backend/anomaly_scores/tick.py
+++ b/products/signals/backend/anomaly_scores/tick.py
@@ -372,7 +372,7 @@ def capture_census(census: list[TeamCensus], now: datetime.datetime) -> None:
properties={
"deployment": settings.CLOUD_DEPLOYMENT,
"team_id": team.team_id,
- "day": day.isoformat(),
+ "census_date": day.isoformat(),
"active_insights": team.active,
**{f"active_{reason}": count for reason, count in team.active_reasons.items()},
**{f"interval_{interval}": count for interval, count in team.active_intervals.items()},
diff --git a/products/signals/backend/test/test_anomaly_scoring_tick.py b/products/signals/backend/test/test_anomaly_scoring_tick.py
index 0d3ffda6f7c4..28b41af2de6d 100644
--- a/products/signals/backend/test/test_anomaly_scoring_tick.py
+++ b/products/signals/backend/test/test_anomaly_scoring_tick.py
@@ -594,7 +594,8 @@ class TestCaptureCensus(SimpleTestCase):
capture_census(census, now)
sent = [
- (call.kwargs["properties"]["day"], call.kwargs["properties"]["team_id"]) for call in capture.call_args_list
+ (call.kwargs["properties"]["census_date"], call.kwargs["properties"]["team_id"])
+ for call in capture.call_args_list
]
assert sent == [("2026-10-22", 901), ("2026-10-22", 902), ("2026-10-23", 901), ("2026-10-23", 902)]