Skip to content

Proxy stats log only what occurred that time interval

Cecylia Bocovich requested to merge cohosh/snowflake:issue/40302 into main

Modify the periodic stats output by standalone snowflake proxies to only include the data transferred during the time interval being logged. This is an improvement of previous behaviour that logged the total data transferred by all proxy connections that were closed within the time interval being logged.

Closes #40302 (closed)

This merge request contains several refactors, the largest of which happens in proxy/lib/pt_event_logger.go and moves the creation of the periodic task into the library and turns the periodic event logger into something that produces Snowflake events. I think this behaviour fits the idea of the library and events well, and has the potential to work more nicely with other applications that are using the Snowflake proxy library. I believe there is just one API breaking change in cohosh/snowflake@0424578a that changes the function signature of NewProxyEventLogger to not include the summary interval. I can modify this if needed but I think it's unlikely anyone is using this function other than ourselves.

Edited by Cecylia Bocovich

Merge request reports