Repository navigation
Conversation
Contributor
posthog-python Compliance ReportDate: 2026-10-08T15:14:31.996902+00:00 ✅ All Tests Passed!121/121 tests passed Capture_V1 Tests✅ 95/95 tests passed View Details
Capture_Ai Tests✅ 5/5 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
Feature_Flags_Local_Evaluation Tests✅ 4/4 tests passed View Details
|
hpouillot
marked this pull request as draft
October 8, 2026 16:21
hpouillot
marked this pull request as ready for review
October 8, 2026 16:26
ablaszkiewicz
approved these changes
Oct 10, 2026
This branch has not been deployed
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.
💡 Motivation and Context
Public API change: align ASGI, Flask, and Django request integration options so request enrichment can be used independently of error tracking. This follows the ASGI/Flask integrations in #1037 and #1038. The matching DRF handler update is in #1036.
capture_exceptionstoNone, inheriting the effective client'senable_exception_autocapture; explicitTrue/Falseoverrides remain available. Inheritance is resolved when exceptions occur, including when global client setup happens after middleware registration.trust_tracing_headers=Falseto Flask andPOSTHOG_MW_TRUST_TRACING_HEADERS=Falseto Django, matching ASGI. Browser identity/session attribution now requires explicit opt-in; these identifiers are analytics context, never authentication.POSTHOG_MW_EXTRA_PROPERTIES,POSTHOG_MW_PROPERTIES_MAP, and property-named extraction methods. Existing settings, attributes, and methods remain aliases, with new settings taking precedence.POSTHOG_MW_CAPTURE_EXCEPTIONS=Noneto inherit the client, orFalsefor context-only behavior.references/middleware_configuration.md. The integration client routes automatic exceptions only; manually captured events keep their chosen destination and inherit request context independently.Behavior changes: ASGI/Flask no longer enable integration error tracking by default on clients with autocapture disabled. Django/Flask no longer accept tracing identity/session headers unless explicitly enabled.
💚 How did you test it?
📝 Checklist
If releasing new changes
sampo addto generate a changeset fileAdded
.sampo/changesets/consistent-request-integration-api.mdmanually.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Implemented with the pi coding agent and Cockpit child sessions, using local file/command tools and the GitHub CLI. The human-directed API keeps one integration per framework rather than introducing ordering-sensitive middleware layers. Shared semantics use the existing private client-default resolver and preserve Django's capture default and old property-setting aliases for compatibility. Session:
344b8733-8056-4f90-b182-7535cf8db88b.Human review is required; this PR has not been auto-approved or merged.