Skip to content

Conversation

@oliverb123
Copy link
Contributor

This change makes it so backend events have session id's, and a correctly set $current_url. I've verified this locally against PostHog/posthog-python#264, using the make prop_local command and modifying pyproject to point to the local SDK version.

This means you can do things like watch the session replay for exceptions that occur in the backend, as well as all the sorting, filtering etc that you'd expect.

@oliverb123 oliverb123 requested review from a team, daibhin and hpouillot June 18, 2025 15:49
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Updates posthoganalytics dependency and adds middleware to enhance backend event tracking capabilities with session IDs and $current_url properties.

  • Bumps posthoganalytics dependency from >=4.6.2 to >=5.1.0 in pyproject.toml
  • Adds PosthogContextMiddleware at the end of middleware stack in posthog/settings/web.py
  • Enables session replay integration for backend exceptions through proper session tracking
  • Adds ability to associate backend events with frontend session context

2 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

@oliverb123 oliverb123 merged commit 399feb1 into master Jun 18, 2025
100 checks passed
@oliverb123 oliverb123 deleted the err/use-middleware branch June 18, 2025 17:17
oliverb123 added a commit that referenced this pull request Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants