Skip to content

Commit 70efb72

Browse files
committed
Expose Prometheus metrics for the scheduler web UI HTTP server
1 parent 39f60bc commit 70efb72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/bb_scheduler/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,11 @@ func main() {
209209
}
210210
subrouter := router.PathPrefix(routePrefix).Subrouter()
211211
newBuildQueueStateService(buildQueue, clock.SystemClock, browserURL, subrouter)
212-
if err := http.NewServersFromConfigurationAndServe(configuration.AdminHttpServers, router, siblingsGroup); err != nil {
212+
if err := http.NewServersFromConfigurationAndServe(
213+
configuration.AdminHttpServers,
214+
http.NewMetricsHandler(router, "SchedulerUI"),
215+
siblingsGroup,
216+
); err != nil {
213217
return util.StatusWrap(err, "Failed to create admin HTTP servers")
214218
}
215219

0 commit comments

Comments
 (0)