Browse Source

added prometheus route

Stephen McQuay 3 years ago
parent
commit
57e252ce2b
No known key found for this signature in database
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      routes.go

+ 3
- 0
routes.go View File

@@ -5,6 +5,7 @@ import (
5 5
 
6 6
 	"github.com/elazarl/go-bindata-assetfs"
7 7
 	"github.com/gorilla/context"
8
+	"github.com/prometheus/client_golang/prometheus"
8 9
 )
9 10
 
10 11
 var prefix map[string]string
@@ -50,5 +51,7 @@ func addRoutes(sm *http.ServeMux, a *Allowances, staticFiles string) {
50 51
 		)
51 52
 	}
52 53
 
54
+	sm.Handle("/metrics", prometheus.Handler())
55
+
53 56
 	context.ClearHandler(sm)
54 57
 }

Loading…
Cancel
Save