Add flag to enable high-cardinality HTTP duration labels#7751
Add flag to enable high-cardinality HTTP duration labels#7751aliaqel-stripe wants to merge 3 commits into
Conversation
|
Thank you for your contribution! 🙏 Please understand that we will do our best to review your PR and give you feedback as soon as possible, but please bear with us if it takes a little longer as expected. While you are waiting, make sure to:
Once the initial tests are successful, a KEDA member will ensure that the e2e tests are run. Once the e2e tests have been successfully completed, the PR may be merged at a later date. Please be patient. Learn more about our contribution guide. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
|
||
| require.Truef(t, updated, "container %s not found in deployment %s/%s", containerName, namespace, name) | ||
|
|
||
| _, err = kc.AppsV1().Deployments(namespace).Update(context.TODO(), deployment, metav1.UpdateOptions{}) |
There was a problem hiding this comment.
Semgrep identified an issue in your code:
Consider to use well-defined context
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by context-todo.
You can view more details about this finding in the Semgrep AppSec Platform.
| func SetDeploymentContainerArg(t *testing.T, kc *kubernetes.Clientset, name, namespace, containerName, flagName, flagValue string) { | ||
| t.Helper() | ||
|
|
||
| deployment, err := kc.AppsV1().Deployments(namespace).Get(context.TODO(), name, metav1.GetOptions{}) |
There was a problem hiding this comment.
Semgrep identified an issue in your code:
Consider to use well-defined context
To resolve this comment:
🔧 No guidance has been designated for this issue. Fix according to your organization's approved methods.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasons
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by context-todo.
You can view more details about this finding in the Semgrep AppSec Platform.
Signed-off-by: Ali Aqel <aliaqel@stripe.com>
Signed-off-by: Ali Aqel <aliaqel@stripe.com>
Signed-off-by: Ali Aqel <aliaqel@stripe.com>
b9cd055 to
5e00a93
Compare
Provide a description of what has been changed
This adds
--enable-high-cardinality-metrics-labelsto the KEDA operator, defaulting tofalse.When the flag is enabled,
keda_scaler_http_request_duration_secondsincludes the high-cardinalitynamespace,scaled_resource,trigger_name, andmetric_namelabels in addition to the existing low-cardinality labels. When the flag is disabled, the histogram is still emitted with onlyscalerandstatus_codelabels.The existing scaler HTTP request counter labels are unchanged, and the internal Metrics Service gRPC histograms are no longer gated by this flag.
This also updates unit and e2e coverage for both label modes and updates the changelog.
The e2e coverage was also hardened so the new flag assertions are reliable:
Checklist
Fixes #7731
Relates to kedacore/keda-docs#1772, kedacore/charts#855