Analytics Pipeline Enhancements: IP Capture & gRPC Updates
Today’s changes:
The analytics data processing pipeline has been enhanced with improved IP address capture and expanded functionality for sending data to the gRPC server.
A new helper function, helper.GetRealAddr()
, is now utilized to retrieve client IP addresses from HTTP requests, ensuring more accurate tracking compared to relying solely on the web framework’s client IP information.
The application now supports sending different types of analytics data to the gRPC server via a newly implemented type parameter within URL construction. Functions like BuildUrl
, BuildStatsUrl
, and BuildUrlTableData
have been updated to include this parameter, derived from user selections or other configured logic. Related functions such as prepareAnalyticsData
, getSearchConfig()
, and updateChartSelect
were also modified to accommodate the new type parameter along with validation checks. A select box has been added to the analytics form allowing users to choose between Javascript tracker and gRPC data transmission.
Furthermore, the gRPC connection string and authorization header have been updated to reflect a change in server address and authentication token for enhanced security and reliability. A short delay is now implemented before establishing the gRPC connection, coupled with an authenticated request.