Skip to content

Conversation

@SasLord
Copy link
Contributor

@SasLord SasLord commented Aug 6, 2025

  • Add getAllPossibleIps() function to collect 15+ IP header variants for debugging geolocation issues in Kubernetes environments
  • Include all collected IPs (ip_connection, ip_x_forwarded_for_*, ip_cf_connecting_ip, etc.) in PostHog events
  • Add SessionManager class for proper session/pageview tracking with UUID generation

…acking

Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
@huly-github-staging
Copy link

Connected to Huly®: UBERF-13013

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive IP collection and session tracking capabilities to the analytics system. The changes focus on improving geolocation debugging in Kubernetes environments and implementing proper session/pageview tracking.

  • Enhanced IP address collection with 15+ header variants for debugging geolocation issues
  • Implemented SessionManager class for proper session and pageview tracking with UUID generation
  • Fixed navigation event timing to ensure proper URL state before analytics capture

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
services/analytics-collector/pod-analytics-collector/src/server.ts Integrates getAllPossibleIps function to collect all IP headers in PostHog events
services/analytics-collector/pod-analytics-collector/src/geoip.ts Adds comprehensive IP collection function and simplifies getClientIp logic
packages/ui/src/location.ts Moves Analytics.navigate call after state update to ensure proper timing
packages/analytics-providers/src/utils.ts Implements SessionManager class and enhances event metadata collection
packages/analytics-providers/src/analyticsCollector.ts Adds URL change trigger for navigation tracking

SasLord added 2 commits August 7, 2025 03:05
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
@BykhovDenis BykhovDenis merged commit 879f67f into develop Aug 7, 2025
14 checks passed
@BykhovDenis BykhovDenis deleted the analytic-ip-headers-session-tracking branch August 7, 2025 06:10
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