New Analytics Tracking & System Updates Implemented
What developments have taken place today?
This commit implements a new analytics tracking system for the application. It introduces a middleware function, TrackAnalyticsForWebsite
, that intercepts incoming HTTP requests and gathers relevant data such as cookies, IP addresses, user agents, and request source information. This data is then transmitted asynchronously via a gRPC channel to a dedicated gRPC service (“analyticsforwebsite_grpc:15018”) for processing or storage. A background process continuously consumes analytics data from the channel and sends it to the gRPC server, preventing blocking of the main application thread. Additionally, the Docker health check script has been updated to verify the health status of all core components (database, Elasticsearch, application, API, and gRPC) before proceeding with deployment or updates, ensuring system stability. The configuration includes the gRPC server address for easy setup.
These changes represent an important improvement by introducing a structured and asynchronous approach to collecting user behavior data. The middleware ensures that analytics are captured without impacting performance, while the gRPC channel facilitates efficient communication between the application and a dedicated analytics service. Integrating Docker health checks strengthens system reliability and simplifies deployment processes.