Skip to content

Commit

Permalink
policyfiltermetrics: Rename metrics
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
lambdanis committed Aug 9, 2024
1 parent 6feacec commit 9a0024a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion contrib/upgrade-notes/latest.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ tetragon:

#### Metrics

* TBD
* `tetragon_policyfilter_metrics_total` metric is renamed to `tetragon_policyfilter_operations_total`, and its `op`
label is renamed to `operation`.
6 changes: 3 additions & 3 deletions docs/content/en/docs/reference/metrics.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/metrics/policyfiltermetrics/policyfiltermetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ var (
}

operationLabel = metrics.ConstrainedLabel{
Name: "op",
Name: "operation",
Values: maps.Values(operationLabelValues),
}

Expand All @@ -84,8 +84,8 @@ var (

var (
PolicyFilterOpMetrics = metrics.MustNewCounter(metrics.NewOpts(
consts.MetricsNamespace, "", "policyfilter_metrics_total",
"Policy filter metrics. For internal use only.",
consts.MetricsNamespace, "", "policyfilter_operations_total",
"Number of policy filter operations.",
nil, []metrics.ConstrainedLabel{subsysLabel, operationLabel, errorLabel}, nil,
), nil)

Expand Down

0 comments on commit 9a0024a

Please sign in to comment.