集成 otel 记录接口性能数据
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
func Init(ctx context.Context) error {
|
||||
errs := make([]error, 0)
|
||||
|
||||
errs = append(errs, initBaiyin())
|
||||
errs = append(errs, initAlipay())
|
||||
errs = append(errs, initWechatPay())
|
||||
@@ -18,22 +17,14 @@ func Init(ctx context.Context) error {
|
||||
errs = append(errs, initAsynq(Redis))
|
||||
errs = append(errs, initProxy())
|
||||
errs = append(errs, initSft())
|
||||
|
||||
errs = append(errs, initOtel(ctx))
|
||||
return u.CombineErrors(errs)
|
||||
}
|
||||
|
||||
func Stop() error {
|
||||
func Close() error {
|
||||
var errs = make([]error, 0)
|
||||
|
||||
err := stopRedis()
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
|
||||
err = stopOrm()
|
||||
if err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
|
||||
errs = append(errs, closeRedis())
|
||||
errs = append(errs, closeOrm())
|
||||
errs = append(errs, closeOtel())
|
||||
return u.CombineErrors(errs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user