keda: `metricName` shouldn't be required and should be deprecated for all the scalers

Proposal

Currently, some scalers require a metricName which is used only for KEDA internal things (it’s not sent to the prom server). This requirement isn’t necessary since we introduced mechanisms to ensure the unique metrics names inside the ScaledObject and we should make it optional and also deprecate it in favour of self-generated internal name

Scalers:

  • aws-cloudwatch - metric name is needed for this one
  • azure-log-analytics
  • azure-monitor
  • azure-storage-blob
  • cassandra
  • couchdb - just lefover in the code, doesn’t have to be included in the docs and deprecations
  • graphite
  • huawei-cloudeye - metric name is needed for this one
  • influxdb
  • mongodb
  • mssql
  • postgresql
  • prometheus
  • rabbitmq-queue

TODO list

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 19 (18 by maintainers)

Most upvoted comments

@JorTurFer

https://github.com/kedacore/keda/pull/4235 will complete the tasks “code change to print warning message with deprecation notice” and “update deprecation notice in the Changelog”.

https://github.com/kedacore/keda-docs/pull/1074 will complete “update documentation to specify deprecation notice…”.

@JorTurFer I could help with 1 or 2. If you can do 1 first as an example, I could look at it and see what are needed to be changed 🙏

Sure, I will do one of them this week (I have a trip today and I’ll be outside until Wednesday night)

Yeah, I will do a round checking all the scalers. I rename this issue with a generic title to track the new issues I’ll create

Nice catch @dttung2905 I have checked the code, and azure_monitor scaler uses metricName for the request, so it’s correctly added in the scaler and we don’t have to remove it

I think this is done

Should we create the discussion now or maybe as part of the release @kedacore/keda-core-contributors ? I guess that we should open it during the release, because maybe the new way of doing the things isn’t release yet (not in this specific case)

Some more scalers to add to the task list (based on searching metricName in v2.10 docs):

  • aws-cloudwatch
  • azure-log-analytics
  • azure-monitor
  • azure-storage-blob
  • huawei-cloudeye
  • influxdb
  • mongodb
  • mssql
  • postgresql
  • rabbitmq-queue

What should be done:

anything else @kedacore/keda-core-contributors ?

@JorTurFer I could help with 1 or 2. If you can do 1 first as an example, I could look at it and see what are needed to be changed 🙏

@JorTurFer could you please identify those scalers and create a separate issues for them? And give them good first issues/help wanted labels? As these could be ideal issues for newcomers.