mirror of
https://github.com/ultravioletrs/cocos.git
synced 2026-08-07 07:14:50 +00:00
8be6129889
* Ensure graceful shutdown and improve connection handling Refined the network connection handling in both agent events and logs to continuously process incoming data in a loop, enabling the services to handle more than a single message per connection. Additionally, instituted a deferred close operation for the event service to guarantee resources are cleanly released upon the application's termination. Resolves potential resource leakage and enhances log processing efficiency. Signed-off-by: SammyOina <sammyoina@gmail.com> * Improve robustness in event and log handling Altered handling in agent event and log services to continue processing incoming data rather than returning early upon encountering errors. This ensures that a single erroneous data point does not prematurely halt the processing loop, improving the robustness and reliability of the services. Potential errors are now reported and logged, yet the system remains operational to handle subsequent data. Signed-off-by: SammyOina <sammyoina@gmail.com> * Upgrade gRPC telemetry to use StatsHandler Switched from using gRPC's UnaryInterceptor for telemetry to the more comprehensive StatsHandler provided by otelgrpc. This enhances telemetry collection by allowing the capture of a wider range of RPC stats, leading to improved monitoring and observability of the gRPC server. Signed-off-by: SammyOina <sammyoina@gmail.com> * use constants Signed-off-by: sammy <sammyoina@gmail.com> --------- Signed-off-by: SammyOina <sammyoina@gmail.com> Signed-off-by: sammy <sammyoina@gmail.com>