Skip to content

'(' is not sanitized from datadog scalar #3789

Closed
@tehlers320

Description

Report

Not sure if this is a bug or working as intended but having "(" in kubernetes objects doesnt feel right.

metrics name:

s1-datadog-moving_rollup(sum-istio-mesh-request-count

Expected Behavior

metrics name:

s1-datadog-moving_rollup-sum-istio-mesh-request-count

Actual Behavior

metrics name:

s1-datadog-moving_rollup(sum-istio-mesh-request-count

Steps to Reproduce the Problem

  1. use query
moving_rollup(sum:istio.mesh.request.count{}.as_rate().rollup(sum, 30), 120, 'max')

Logs from KEDA operator

example

KEDA Version

2.8.1

Kubernetes Version

1.25

Platform

Any

Scaler Details

datadog

Anything else?

This is probably just a simple update to this function

// NormalizeString will replace all slashes, dots, colons and percent signs with dashes
func NormalizeString(s string) string {
	s = strings.ReplaceAll(s, "/", "-")
	s = strings.ReplaceAll(s, ".", "-")
	s = strings.ReplaceAll(s, ":", "-")
	s = strings.ReplaceAll(s, "%", "-")
	return s
}

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions