Skip to content

Commit

Permalink
register metrics on init to prometheus registry (#12)
Browse files Browse the repository at this point in the history
* added monitoring-stack,prometheus rule,metrics service and servicemonitor CR objects

* default info and 5d

* added back Makefile for yaml to bundle image

* changed path from config/deploy to config/olm

* register metrics to global

* alertmanagerconfig

* removed namespace

* rename names

* moved config files for metrics,mso to mt-bundles for now
  • Loading branch information
sandhyadalavi authored May 23, 2022
1 parent e66947b commit 5516e2c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/reference-addon-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ var (
func init() {
_ = clientgoscheme.AddToScheme(scheme)
_ = refapis.AddToScheme(scheme)

// Register metrics with the global Prometheus registry
metrics.RegisterMetrics()
}

func main() {
Expand Down Expand Up @@ -105,8 +108,7 @@ func main() {
os.Exit(1)
}

// register and fill metrics
metrics.RegisterMetrics()
// add sample metrics
metrics.RequestSampleResponseData()

setupLog.Info("starting manager")
Expand Down

0 comments on commit 5516e2c

Please sign in to comment.