Skip to content

Commit

Permalink
(BIDS-3222) serve metrics in notif collector/sender (#2916)
Browse files Browse the repository at this point in the history
  • Loading branch information
invis-bitfly authored Jul 25, 2024
1 parent dba0c62 commit 1354142
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/notification-collector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@ func main() {
if DBStr != frontendDBStr {
go metrics.MonitorDB(db.FrontendWriterDB)
}
// serve prometheus metrics
go func(addr string) {
logrus.Infof("serving metrics on %v", addr)
if err := metrics.Serve(addr); err != nil {
logrus.WithError(err).Fatal("Error serving metrics")
}
}(utils.Config.Metrics.Address)
}

logrus.Infof("database connection established")
Expand Down
7 changes: 7 additions & 0 deletions cmd/notification-sender/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ func main() {
if DBStr != frontendDBStr {
go metrics.MonitorDB(db.FrontendWriterDB)
}
// serve prometheus metrics
go func(addr string) {
logrus.Infof("serving metrics on %v", addr)
if err := metrics.Serve(addr); err != nil {
logrus.WithError(err).Fatal("Error serving metrics")
}
}(utils.Config.Metrics.Address)
}

logrus.Infof("database connection established")
Expand Down

0 comments on commit 1354142

Please sign in to comment.