Add instrumentation with prometheus
This commit is contained in:
parent
2a72154308
commit
f4ca9e2dbc
6 changed files with 138 additions and 32 deletions
14
lib/instrument/dummy.go
Normal file
14
lib/instrument/dummy.go
Normal file
|
@ -0,0 +1,14 @@
|
|||
// +build noprometheus
|
||||
|
||||
package instrument
|
||||
|
||||
import "time"
|
||||
|
||||
type dummyInst struct{}
|
||||
|
||||
func Init() Instrument {
|
||||
return &dummyInst{}
|
||||
}
|
||||
|
||||
func (i dummyInst) Visit(section string, id string, search string, fmt string) {}
|
||||
func (i dummyInst) Duration(section string, duration time.Duration) {}
|
Reference in a new issue