feat Prometheus

This commit is contained in:
2026-01-16 22:36:18 +08:00
parent 6d5c7e81e9
commit 53cda1ce5e
6 changed files with 23 additions and 71 deletions

View File

@@ -21,11 +21,11 @@ func (p *Program) Init(_ svc.Environment) error {
}
p.moduleList = append(p.moduleList, base)
p.moduleList = append(p.moduleList, (&module.DB{}).Bind(config.Get().DB))
p.moduleList = append(p.moduleList, &ModulePrometheus{})
p.moduleList = append(p.moduleList, &ModuleWebServer{})
p.moduleList = append(p.moduleList, &ModuleWebsocketServer{})
p.moduleList = append(p.moduleList, &ModuleGrpcServer{})
p.moduleList = append(p.moduleList, &ModuleLoginQueue{})
p.moduleList = append(p.moduleList, (&module.Prometheus{}).Bind(config.Get().Metric))
p.moduleList = append(p.moduleList, (&module.Tracer{}).Bind(config.Get().Metric, common.KeyDiscoverServiceNameGateway))
for i, m := range p.moduleList {