Skip to content

Commit

Permalink
process: Register metrics
Browse files Browse the repository at this point in the history
There is a metric (tetragon_process_cache_size) defined in the process package,
but it wasn't registered in the Prometheus registry, so it wasn't exposed. Fix
this and register the metric.

Signed-off-by: Anna Kapuscinska <[email protected]>
  • Loading branch information
lambdanis committed Apr 11, 2024
1 parent 04a4140 commit 870f92c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 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.

2 changes: 2 additions & 0 deletions pkg/metrics/metricsconfig/initmetrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/cilium/tetragon/pkg/metrics/syscallmetrics"
"github.com/cilium/tetragon/pkg/metrics/watchermetrics"
"github.com/cilium/tetragon/pkg/observer"
"github.com/cilium/tetragon/pkg/process"
"github.com/cilium/tetragon/pkg/version"
grpcmetrics "github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus"
"github.com/prometheus/client_golang/prometheus"
Expand All @@ -35,6 +36,7 @@ func initHealthMetrics(registry *prometheus.Registry) {
mapmetrics.InitMetrics(registry)
opcodemetrics.InitMetrics(registry)
policyfiltermetrics.InitMetrics(registry)
process.InitMetrics(registry)
ringbufmetrics.InitMetrics(registry)
ringbufqueuemetrics.InitMetrics(registry)
watchermetrics.InitMetrics(registry)
Expand Down

0 comments on commit 870f92c

Please sign in to comment.