You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the GCP Stackdriver scalar to retrieve metrics that have a value type of double it always returns a value of 0. Since it does not create any errors, it triggers a scale down to zero but can never scale back up.
Expected Behavior
Since double is a valid metric value type and can still have a similar average target value calculation, we would expect the scalar to retrieve the correct metric value instead of returning 0. If this is expected behavior, maybe we can update the documentation to make it more clear that the only supported value type is int64.
Actual Behavior
We believe the issue is here where the getMetrics() function in the client is casting the value to an Int64. In the calling function here it also attempts to cast the value back to a float64.
Steps to Reproduce the Problem
Create a ScaledObject that uses a Google Cloud Platform stackdriver scalar with a metric filter of some external metric type. We used metric.type="external.googleapis.com/prometheus/test_pod_scaling" for testing purposes.
Publish values of 1.0 to the stackdriver metric ensuring the gauge value type is double.
Check operator logs and associated HPA to see that the values are always returning 0.
The setup can be verified by:
Deleting the metric created above
Publish values of 1 to that same metric ensuring the gauge value type is now int64
Check operator logs and associated HPA to see that the values retrieved are now 1.
KEDA Version
2.8.1
Platform
Google Cloud
The text was updated successfully, but these errors were encountered:
Report
When using the GCP Stackdriver scalar to retrieve metrics that have a value type of double it always returns a value of 0. Since it does not create any errors, it triggers a scale down to zero but can never scale back up.
Expected Behavior
Since double is a valid metric value type and can still have a similar average target value calculation, we would expect the scalar to retrieve the correct metric value instead of returning 0. If this is expected behavior, maybe we can update the documentation to make it more clear that the only supported value type is int64.
Actual Behavior
We believe the issue is here where the getMetrics() function in the client is casting the value to an Int64. In the calling function here it also attempts to cast the value back to a float64.
Steps to Reproduce the Problem
ScaledObject
that uses a Google Cloud Platform stackdriver scalar with a metric filter of some external metric type. We usedmetric.type="external.googleapis.com/prometheus/test_pod_scaling"
for testing purposes.The setup can be verified by:
KEDA Version
2.8.1
Platform
Google Cloud
The text was updated successfully, but these errors were encountered: