集成 otel 记录接口性能数据

This commit is contained in:
2025-12-01 19:31:45 +08:00
parent a024c38375
commit e59c7c96f6
8 changed files with 121 additions and 39 deletions

View File

@@ -23,6 +23,12 @@ func RunApp(pCtx context.Context) error {
if err != nil {
return fmt.Errorf("初始化依赖失败: %w", err)
}
defer func() {
err := base.Close()
if err != nil {
slog.Error("关闭依赖失败", "error", err)
}
}()
// 运行服务
g.Go(func() error {