Skip to content

Commit

Permalink
tracing: Initialize metrics with labels
Browse files Browse the repository at this point in the history
Initialize tetragon_process_loader_stats with all possible event types.

Signed-off-by: Anna Kapuscinska <anna@isovalent.com>
  • Loading branch information
lambdanis committed Feb 28, 2024
1 parent d5696f4 commit 3de6bd6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/grpc/tracing/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ func registerMetrics(registry *prometheus.Registry) {
func InitMetrics(registry *prometheus.Registry) {
registerMetrics(registry)

// Initialize metrics with labels
for _, ty := range LoaderTypeStrings {
LoaderStats.WithLabelValues(ty).Add(0)
}

// NOTES:
// * Rename process_loader_stats metric (to e.g. process_loader_events_total) and count label (to e.g. event)?
}
Expand Down

0 comments on commit 3de6bd6

Please sign in to comment.