Repository navigation
fix: read tracing headers by default in v1 integrations (port of #1061) - #1107
Merged
Merged
Conversation
) (cherry picked from commit 780cba9)
v1 turns person processing off for a generated distinct ID with an event option, which beats the legacy property, so the ported test checks the derived option. The 8.0 migration guide notes the default and the off switch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eli-r-ph
force-pushed
the
v1-tracing-headers-default-on
branch
from
October 22, 2026 17:37
8354240 to
eadf5a3
Compare
dustinbyrne
approved these changes
Oct 22, 2026
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
v1never received #1061, so 8.0 would still ignore theX-PostHog-Distinct-IdandX-PostHog-Session-Idheaders unless enabled.That silently breaks backend-to-frontend session linking for apps upgrading from 7.67 or earlier, or from 7.71+.
All v1 SDKs now read these headers by default once the middleware is installed, with an off switch, matching the tracing-header spec and the other server SDKs. Go counterpart: PostHog/posthog-go#386.
mainunchanged (cherry-pick of780cba9): Django, Flask and ASGI read the headers by default;capture_tracing_headersandPOSTHOG_MW_CAPTURE_TRACING_HEADERSturn it off; thetrust_*names stay as deprecated aliases.v1: a generated distinct ID turns person processing off with an event option, which beats the legacy$process_person_profileproperty, so the test checks the option.💚 How did you test it?
780cba9; the second commit holds everyv1difference.pytest posthog/testpasses with thetestextra, including the 236 integration tests.ruff format --checkflagsposthog/test/mcp/test_features_m4.py, which this PR does not touch and is unchanged fromv1.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file (ported from fix(integrations): align tracing-header capture across frameworks #1061)🤖 Agent context
Autonomy: Human-driven (agent-assisted). Written with Claude Code (claude-opus-5-5) after a fleet decision to keep tracing headers on by default.
🤖 Generated with Claude Code