feat(feature-flags): support quota limiting for feature flags #403#56
feat(feature-flags): support quota limiting for feature flags #403#56
Conversation
There was a problem hiding this comment.
PR Summary
This PR adds support for handling quota limits in PostHog's .NET SDK, responding to changes in the /decide and /local_evaluation APIs when users exceed their quota limits.
- Added
QuotaLimitedproperty toDecideApiResultin/src/PostHog/Api/DecideApiResult.csto track which features are quota-limited - Implemented quota limit handling in
/src/PostHog/PostHogClient.csto return empty dictionaries for bulk flag requests when limits are hit - Added quota limit checks in
DecideAsync()method to handle feature flag quota limitations - Added debug logging for quota exceeded scenarios with appropriate messages
- Added comprehensive test coverage in
/tests/UnitTests/Features/FeatureFlagsTests.csfor quota limit scenarios
3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
|
Thanks @dmarticus! I'll fix this up. |
|
@haacked thanks! I was working on it locally but my .NET LSP isn't playing nicely so it's been a pain. Thanks for helping, lmk if you have questions about the implementation! |
|
When attempting a local evaluation API call that is quota limited, I assume we don't want to fallback to |
|
@dmarticus I also noticed the log level for quota exceeded is |
Yup, we should short-circuit if we get a local eval call that's quota limited |
Yeah, let's go with a warning log, that's what the other PRs do. |
with PostHog/posthog#28564, we now start to respond different with the /decide and /local_evaluation APIs if users have gone over their quota limit. Now we need to change the SDKs to handle these new responses.