From df16bb4630baba1ad5bb271678fb9b6a3d48c911 Mon Sep 17 00:00:00 2001 From: Sumera Priyadarsini <35404119+Sylfrena@users.noreply.github.com> Date: Wed, 16 Feb 2022 21:59:14 +0530 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Kemal Akkoyun --- pkg/profiler/profiler.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/profiler/profiler.go b/pkg/profiler/profiler.go index 074898a20f..c1af352b5c 100644 --- a/pkg/profiler/profiler.go +++ b/pkg/profiler/profiler.go @@ -102,10 +102,10 @@ func NewCgroupProfiler( mtx: &sync.RWMutex{}, missingStacks: promauto.With(reg).NewCounterVec( prometheus.CounterOpts{ - Name: "parca_agent_profiler_missing_stacks", + Name: "parca_agent_profiler_missing_stacks_total", Help: "Number of missing profile stacks", }, - []string{"stacktype"}), + []string{"type"}), } } @@ -312,7 +312,7 @@ func (p *CgroupProfiler) profileLoop(ctx context.Context, now time.Time, counts, stackBytes, err := stackTraces.GetValue(unsafe.Pointer(&userStackID)) if err != nil { - p.missingStacks.WithLabelValues("userstack").Inc() + p.missingStacks.WithLabelValues("user").Inc() continue } @@ -326,7 +326,7 @@ func (p *CgroupProfiler) profileLoop(ctx context.Context, now time.Time, counts, if kernelStackID >= 0 { stackBytes, err = stackTraces.GetValue(unsafe.Pointer(&kernelStackID)) if err != nil { - p.missingStacks.WithLabelValues("kernelstack").Inc() + p.missingStacks.WithLabelValues("kernel").Inc() continue }