morhidi opened a new pull request, #945:
URL: https://github.com/apache/flink-kubernetes-operator/pull/945

   ## What is the purpose of the change
   
   Currently autoscaler metrics although collected are not published during 
stabilization period. We report metrics after the stabilization period only. In 
practice this could result in larger gaps in metric charts during scale 
operations that makes it hard for end users to interpret. The metrics could 
appear to be broken, especially when multiple scale operations executed in a 
row, for example:
   <img width="450" alt="image" 
src="https://github.com/user-attachments/assets/e533cfc1-b712-498a-b9d9-3b3a2b4a700a";
 />
   
   This change mitigates this issue by shortening the gaps in reported metrics. 
The collected metrics won't be withhold during stabilization period either.
   
   ## Brief change log
   - Removing the logic to report no metrics during stabilization
   - Adjusted the logging to better understand the stabilization/metric window 
periods
   - Update the timestamp format to contain millis (unit tests operate with 
millis)
   
   ```
   2025-02-17 16:56:13,948 o.a.f.a.ScalingMetricCollector [INFO ] 
Stabilizing... until 1969-12-31 16:00:00.100. 1 samples collected
   2025-02-17 16:56:13,952 o.a.f.a.ScalingMetricCollector [INFO ] 
Stabilizing... until 1969-12-31 16:00:00.100. 2 samples collected
   2025-02-17 16:56:13,957 o.a.f.a.ScalingMetricCollector [INFO ] Metric window 
is not full until 1969-12-31 16:00:00.250. 3 samples collected
   2025-02-17 16:56:13,958 o.a.f.a.ScalingMetricCollector [INFO ] Metric window 
is not full until 1969-12-31 16:00:00.250. 4 samples collected
   2025-02-17 16:56:13,960 o.a.f.a.ScalingMetricCollector [INFO ] Metric window 
is now full. Dropped 3 samples before 1969-12-31 16:00:00.160, keeping 2.
   
   ```
   ## Verifying this change
   Updated existing unit tests.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changes to the `CustomResourceDescriptors`: 
no
     - Core observer or reconciler logic that is regularly executed: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to