fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

monitoring: add metric that tracks the total number of search requests (#509)

+7
+7
cmd/zoekt-webserver/main.go
··· 477 477 s.log(ctx, q, opts, stats, err) 478 478 }() 479 479 480 + metricSearchRequestsTotal.Inc() 480 481 return s.Streamer.Search(ctx, q, opts) 481 482 } 482 483 ··· 489 490 var ( 490 491 stats zoekt.Stats 491 492 ) 493 + 494 + metricSearchRequestsTotal.Inc() 492 495 err := s.Streamer.StreamSearch(ctx, q, opts, stream.SenderFunc(func(event *zoekt.SearchResult) { 493 496 stats.Add(event.Stats) 494 497 sender.Send(event) ··· 580 583 metricWatchdogErrorsTotal = promauto.NewCounter(prometheus.CounterOpts{ 581 584 Name: "zoekt_webserver_watchdog_errors_total", 582 585 Help: "The total number of errors from zoekt watchdog.", 586 + }) 587 + metricSearchRequestsTotal = promauto.NewCounter(prometheus.CounterOpts{ 588 + Name: "zoekt_search_requests_total", 589 + Help: "The total number of search requests that zoekt received", 583 590 }) 584 591 ) 585 592