Files

26 lines
474 B
Go
Raw Permalink Normal View History

2020-04-06 19:57:19 +08:00
package main
import (
2026-01-30 16:49:29 +08:00
"code.infininov.com/Infini/unitech-golib/metric"
2020-04-06 19:57:19 +08:00
"fmt"
)
func main() {
cfg := metric.ExporterCfg{
Listener: nil,
RegisterConsul: false,
ProductName: "ProductName_001",
ServiceRegion: "ServiceRegion_001",
AppName: "AppName_001",
}
go func() {
if err := metric.InitExporter(cfg); err != nil {
fmt.Println("prometheus exporter stopped,err: ", err)
}
}()
fmt.Println("prometheus exporter started")
select {}
}