Metrics improvements
-
memory_*_bytes metrics were not working properly. Somehow the lambda wasn't working correctly, but using partial is. Fine.
-
Instead of calling memory_full_info for every incovation of process_element, just have the gauge callback call it. This avoids the need to keep a local variable, and also reduces the number of times the function is called.
-
Small refactor of how metrics are stored and initialized in EventProcessFunction
Bug: T328925