aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-04 23:09:42 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-04 23:09:42 +0100
commit53ad91c63c2788a83d0e80985ffa89ce7cdf203f (patch)
tree33b7244bc0e7e036ecb411c2d6dfd2d2bc4f6c8c /server
parent7fb24c41ec04d31d3170c9f26ebdbd6eb2ee5aa5 (diff)
added prometheus metrics
Diffstat (limited to 'server')
-rw-r--r--server/main.go4
1 files changed, 4 insertions, 0 deletions
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)