Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

policyfiltermetrics: Refactor and rename metrics #2784

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

lambdanis
Copy link
Contributor

Description

See commits.

Changelog

`tetragon_policyfilter_metrics_total` metric is renamed to `tetragon_policyfilter_operations_total`, and its `op` label is renamed to `operation`.

This lets us constrain label values (preventing growing cardinality) and drop
the explicit initialization function.

Signed-off-by: Anna Kapuscinska <[email protected]>
Rename `tetragon_policyfilter_metrics_total` metric to
`tetragon_policyfilter_operations_total`, and its `op` label to `operation` (to
prevent confusion with ops.OpCode).

Signed-off-by: Anna Kapuscinska <[email protected]>
@lambdanis lambdanis added area/metrics Related to prometheus metrics release-note/minor This PR introduces a minor user-visible change labels Aug 9, 2024
@lambdanis lambdanis requested review from mtardy and a team as code owners August 9, 2024 02:41
Copy link

netlify bot commented Aug 9, 2024

Deploy Preview for tetragon ready!

Name Link
🔨 Latest commit 9a0024a
🔍 Latest deploy log https://app.netlify.com/sites/tetragon/deploys/66b581ddad177d000860310e
😎 Deploy Preview https://deploy-preview-2784--tetragon.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, new changes in metrics pkg look cool, I took a look while reviewing! :)

@@ -4,6 +4,8 @@
package policyfiltermetrics

import (
"golang.org/x/exp/maps"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a note (that we will forget) maps.Values will be moved into the standard library for 1.23.

@lambdanis lambdanis merged commit 9efa574 into cilium:main Aug 13, 2024
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/metrics Related to prometheus metrics release-note/minor This PR introduces a minor user-visible change
Projects
Development

Successfully merging this pull request may close these issues.

2 participants