Changeset 712 in code for trunk/cmd/soju/main.go


Ignore:
Timestamp:
Nov 17, 2021, 2:58:19 PM (4 years ago)
Author:
contact
Message:

Add Prometheus instrumentation for the database

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cmd/soju/main.go

    r707 r712  
    294294        }
    295295
     296        if db, ok := db.(soju.MetricsCollectorDatabase); ok && srv.MetricsRegistry != nil {
     297                srv.MetricsRegistry.MustRegister(db.MetricsCollector())
     298        }
     299
    296300        sigCh := make(chan os.Signal, 1)
    297301        signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP)
Note: See TracChangeset for help on using the changeset viewer.