@@ -36,7 +36,7 @@ type sumologicMetadata struct {
3636 queryType string `keda:"name=queryType, order=triggerMetadata"`
3737 query string `keda:"name=query, order=triggerMetadata"`
3838 queries map [string ]string `keda:"name=query.*, order=triggerMetadata"` // Only for metrics queries
39- resultQueryRowId string `keda:"name=query.*, order=triggerMetadata"` // Only for metrics queries
39+ resultQueryRowId string `keda:"name=resultQueryRowId, order=triggerMetadata"` // Only for metrics queries
4040 quantization time.Duration `keda:"name=quantization, order=triggerMetadata"` // Only for metrics queries
4141 rollup string `keda:"name=rollup, order=triggerMetadata, optional"` // Only for metrics queries
4242 resultField string `keda:"name=resultField, order=triggerMetadata"` // Only for logs queries
@@ -180,7 +180,7 @@ func parseSumoMetadata(config *scalersconfig.ScalerConfig) (*sumologicMetadata,
180180 if val , ok := config .TriggerMetadata ["activationThreshold" ]; ok {
181181 activationThreshold , err := strconv .ParseFloat (val , 64 )
182182 if err != nil {
183- return nil , fmt .Errorf ("activationThreshold parsing error %w" , err )
183+ return nil , fmt .Errorf ("activationThreshold parsing error: %w" , err )
184184 }
185185 meta .activationThreshold = activationThreshold
186186 }
@@ -197,7 +197,7 @@ func parseSumoMetadata(config *scalersconfig.ScalerConfig) (*sumologicMetadata,
197197 if val , ok := config .TriggerMetadata ["threshold" ]; ok {
198198 threshold , err := strconv .ParseFloat (val , 64 )
199199 if err != nil {
200- return nil , fmt .Errorf ("threshold parsing error %w" , err )
200+ return nil , fmt .Errorf ("threshold parsing error: %w" , err )
201201 }
202202 meta .threshold = threshold
203203 }
@@ -209,7 +209,7 @@ func parseMultiMetricsQueries(triggerMetadata map[string]string) (map[string]str
209209 queries := make (map [string ]string )
210210 for key , value := range triggerMetadata {
211211 if strings .HasPrefix (key , multiMetricsQueryPrefix ) {
212- rowId := strings .Replace (key , multiMetricsQueryPrefix , "" , - 1 )
212+ rowId := strings .TrimPrefix (key , multiMetricsQueryPrefix )
213213 if rowId == "" {
214214 return nil , fmt .Errorf ("malformed metadata, unable to parse rowId from key: %s" , key )
215215 }
0 commit comments