Skip to content

Commit

Permalink
Enable prometheus stats on /metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Robinson <[email protected]>
  • Loading branch information
henryr committed Apr 11, 2024
1 parent 83f23bc commit 99b3959
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions go/cmd/vtgateproxy/vtgateproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ import (
"time"

"vitess.io/vitess/go/exit"
"vitess.io/vitess/go/stats/prometheusbackend"
"vitess.io/vitess/go/vt/servenv"
"vitess.io/vitess/go/vt/vtgateproxy"
)

var ()

func init() {
rand.Seed(time.Now().UnixNano())
servenv.RegisterDefaultFlags()
Expand All @@ -38,6 +37,8 @@ func main() {
servenv.ParseFlags("vtgateproxy")
servenv.Init()

prometheusbackend.Init("vtgateproxy")

servenv.OnRun(func() {
// Flags are parsed now. Parse the template using the actual flag value and overwrite the current template.
vtgateproxy.RegisterJsonDiscovery()
Expand Down

0 comments on commit 99b3959

Please sign in to comment.