Skip to content

Commit f4c9971

Browse files
authored
chore(flags): improved some logs for quota limiting (#197)
* haha okay * tests workin * format * use case-sensitive comparisons * omg LOL * fix tests * jeez * this will probably work * now do local eval * okay * yo * formatting * fix import order * type check * ai yi yi * code review * format * do it * merge conflict UGH * black formatting * bump version * correct changelog
1 parent 7dc4cbb commit f4c9971

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 3.18.1 – 2025-03-03
2+
3+
1. Improve quota-limited feature flag logs
14

25
## 3.18.0 - 2025-02-28
36

posthog/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,9 @@ def _load_feature_flags(self):
659659
"More information: https://posthog.com/docs/api/overview",
660660
)
661661
elif e.status == 402:
662-
self.log.warning("[FEATURE FLAGS] PostHog feature flags quota limited")
662+
self.log.warning(
663+
"[FEATURE FLAGS] PostHog feature flags quota limited, resetting feature flag data. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"
664+
)
663665
# Reset all feature flag data when quota limited
664666
self.feature_flags = []
665667
self.feature_flags_by_key = {}

posthog/request.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ def _process_response(
7878
and isinstance(response["quotaLimited"], list)
7979
and "feature_flags" in response["quotaLimited"]
8080
):
81-
log.warning("PostHog feature flags quota limited")
81+
log.warning(
82+
"[FEATURE FLAGS] PostHog feature flags quota limited, resetting feature flag data. Learn more about billing limits at https://posthog.com/docs/billing/limits-alerts"
83+
)
8284
raise QuotaLimitError(res.status_code, "Feature flags quota limited")
8385
return response
8486
try:

posthog/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = "3.18.0"
1+
VERSION = "3.18.1"
22

33
if __name__ == "__main__":
44
print(VERSION, end="") # noqa: T201

0 commit comments

Comments
 (0)