diff --git a/app/vmalert/datasource/vm_prom_api_timing_test.go b/app/vmalert/datasource/vm_prom_api_timing_test.go index 71d6be1d2..4bcb84e84 100644 --- a/app/vmalert/datasource/vm_prom_api_timing_test.go +++ b/app/vmalert/datasource/vm_prom_api_timing_test.go @@ -13,7 +13,7 @@ func BenchmarkMetrics(b *testing.B) { var pi promInstant if err := pi.Unmarshal(payload); err != nil { - b.Fatalf(err.Error()) + b.Fatal(err.Error()) } b.Run("Instant", func(b *testing.B) { for i := 0; i < b.N; i++ { diff --git a/app/vmselect/main.go b/app/vmselect/main.go index 42d039f7b..dbe57eb8e 100644 --- a/app/vmselect/main.go +++ b/app/vmselect/main.go @@ -115,7 +115,7 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) bool { startTime := time.Now() defer requestDuration.UpdateDuration(startTime) tracerEnabled := httputils.GetBool(r, "trace") - qt := querytracer.New(tracerEnabled, r.URL.Path) + qt := querytracer.New(tracerEnabled, "%s", r.URL.Path) // Limit the number of concurrent queries. select { diff --git a/lib/querytracer/tracer_test.go b/lib/querytracer/tracer_test.go index b0e4c0973..6cada898a 100644 --- a/lib/querytracer/tracer_test.go +++ b/lib/querytracer/tracer_test.go @@ -1,7 +1,6 @@ package querytracer import ( - "fmt" "regexp" "sync" "testing" @@ -153,11 +152,11 @@ func TestTraceConcurrent(t *testing.T) { childLocal.Done() var wg sync.WaitGroup for i := 0; i < 3; i++ { - child := qt.NewChild(fmt.Sprintf("child %d", i)) + child := qt.NewChild("child %d", i) wg.Add(1) go func() { for j := 0; j < 100; j++ { - child.Printf(fmt.Sprintf("message %d", j)) + child.Printf("message %d", j) } wg.Done() }()