1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
10 "git.curoverse.com/arvados.git/sdk/go/httpserver"
11 "github.com/prometheus/client_golang/prometheus"
19 func (srv *server) Start() error {
20 h := &handler{Config: srv.Config}
21 reg := prometheus.NewRegistry()
22 h.Config.Cache.registry = reg
23 mh := httpserver.Instrument(reg, nil, httpserver.AddRequestIDs(httpserver.LogRequests(nil, h)))
24 h.MetricsAPI = mh.ServeAPI(h.Config.ManagementToken, http.NotFoundHandler())
26 srv.Addr = srv.Config.Listen
27 return srv.Server.Start()