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

Configure Feed

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

indexserver: track number of repository options we fetch (#266)

This will make it possible for us to tell what percentage of repo
options fail. Currently we hardcode a threshold for alerting, but a
percentage would scale better with different cluster sizes.

+5
+4
cmd/zoekt-sourcegraph-indexserver/main.go
··· 54 54 Buckets: prometheus.ExponentialBuckets(.25, 2, 4), // 250ms -> 2s 55 55 }, []string{"success"}) // success=true|false 56 56 57 + metricGetIndexOptions = promauto.NewCounter(prometheus.CounterOpts{ 58 + Name: "get_index_options_total", 59 + Help: "The total number of times we tried to get index options for a repository. Includes errors.", 60 + }) 57 61 metricGetIndexOptionsError = promauto.NewCounter(prometheus.CounterOpts{ 58 62 Name: "get_index_options_error_total", 59 63 Help: "The total number of times we failed to get index options for a repository.",
+1
cmd/zoekt-sourcegraph-indexserver/sg.go
··· 148 148 149 149 metricResolveRevisionDuration.WithLabelValues("true").Observe(time.Since(start).Seconds()) 150 150 for _, opt := range opts { 151 + metricGetIndexOptions.Inc() 151 152 if opt.Error != "" { 152 153 metricGetIndexOptionsError.Inc() 153 154 tr.LazyPrintf("failed fetching options for %v: %v", opt.Name, opt.Error)