From 53ad91c63c2788a83d0e80985ffa89ce7cdf203f Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Wed, 4 Nov 2020 23:09:42 +0100 Subject: added prometheus metrics --- server/main.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'server') diff --git a/server/main.go b/server/main.go index aea2239..7cf9ccf 100644 --- a/server/main.go +++ b/server/main.go @@ -9,6 +9,7 @@ import ( "github.com/golang/glog" "github.com/google/trillian" + "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/system-transparency/stfe" "google.golang.org/grpc" ) @@ -40,6 +41,9 @@ func main() { mux := http.NewServeMux() http.Handle("/", mux) + glog.Info("Adding prometheus handler on path: /metrics") + http.Handle("/metrics", promhttp.Handler()) + lp, err := stfe.NewLogParameters(*trillianID, *prefix, *anchorPath, *keyPath, *maxRange, *maxChain) if err != nil { glog.Fatalf("failed setting up log parameters: %v", err) -- cgit v1.2.3