增加链路追踪配置,优化服务退出流程,gf版本升级到v2.4.2

This commit is contained in:
孟帅
2023-06-09 19:13:26 +08:00
parent 48f8c20d9c
commit 05e85f52e7
16 changed files with 94 additions and 33 deletions

View File

@@ -25,6 +25,7 @@ import (
"hotgo/internal/model/input/sysin"
"hotgo/internal/service"
"hotgo/utility/charset"
"hotgo/utility/simple"
"hotgo/utility/useragent"
"hotgo/utility/validate"
"time"
@@ -171,7 +172,7 @@ func (s *sSysEmsLog) Send(ctx context.Context, in sysin.SendEmsInp) (err error)
subject, ok := consts.EmsSubjectMap[in.Event]
if !ok {
subject = "HotGo"
subject = simple.AppName(ctx)
}
err = ems.Send(config, in.Email, subject, in.Content)
@@ -235,7 +236,7 @@ func (s *sSysEmsLog) newView(ctx context.Context, in sysin.SendEmsInp, config *m
if basic == nil {
basic = new(model.BasicConfig)
basic.Name = "HotGo"
basic.Name = simple.AppName(ctx)
basic.Domain = "https://hotgo.facms.cn"
basic.Logo = "http://bufanyun.cn-bj.ufileos.com/haoka/attachment/images/2023-02-04/cq9kf7s66jt7hkpvbh.png"
basic.SystemOpen = true

View File

@@ -26,6 +26,7 @@ import (
"hotgo/internal/model/input/sysin"
"hotgo/internal/service"
"hotgo/utility/excel"
"hotgo/utility/simple"
"hotgo/utility/validate"
)
@@ -61,7 +62,7 @@ func (s *sSysLog) Export(ctx context.Context, in sysin.LogListInp) (err error) {
var (
titleList = []string{"ID", "应用", "提交类型", "模块", "提交url", "ip地址", "报错code", "报错信息", "对外id", "请求耗时", "创建时间", "用户", "访问地"}
fileName = "访问日志导出-" + gctx.CtxId(ctx) + ".xlsx"
sheetName = "HotGo"
sheetName = simple.AppName(ctx)
exportList []exportImage
row exportImage
)

View File

@@ -26,7 +26,7 @@ func (s *sTCPServer) Start(ctx context.Context) {
g.Log().Debug(ctx, "TCPServer start..")
server, err := tcp.NewServer(&tcp.ServerConfig{
Name: "hotgo",
Name: simple.AppName(ctx),
Addr: g.Cfg().MustGet(ctx, "tcp.server.address").String(),
})