config: add missing related settings from mitol-django-olposthog package#3943
Merged
Conversation
Anas12091101
requested changes
Jun 2, 2026
Anas12091101
left a comment
Contributor
There was a problem hiding this comment.
I think a cleaner fix would be to import the PostHog settings using import_settings_modules, as in MITx Online here. WDYT?
Contributor
Author
I agree. Let me work on that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
None. Follow up on #3843.
Also resolves this sentry error from CI.
Description (What does it do?)
Adds the missing settings from mitodl/ol-django#408
This pull request adds new configuration options for the PostHog integration, specifically introducing circuit breaker settings to improve reliability when communicating with the PostHog API. The changes allow the application to better handle slow or failed requests to PostHog by specifying cooldown and trip threshold durations.
PostHog circuit breaker configuration:
POSTHOG_CIRCUIT_BREAKER_COOLDOWN_SECONDSandPOSTHOG_CIRCUIT_BREAKER_TRIP_THRESHOLD_SECONDSas optional environment variables inapp.jsonto document and enable these settings for deployment environments.mitxpro/settings.pywith default values (60seconds for cooldown and6seconds for trip threshold), allowing the application to control how long to wait before retrying PostHog after a failure and how long a request can take before the circuit breaker trips.These changes enhance the robustness of the PostHog integration by preventing repeated failures from impacting the system.
Screenshots (if appropriate):
How can this be tested?
The Posthog flags should keep working.
Additional Context
These settings were missed during the merge of #3843.