feat: 尝试添加 tracing

This commit is contained in:
2025-01-22 12:56:41 +08:00
parent 9d82d63a64
commit 275221adbd
7 changed files with 415 additions and 2 deletions
+2 -2
View File
@@ -22,14 +22,14 @@ func NewRegisterService(Context context.Context, RequestContext *app.RequestCont
}
// curl -X POST 10.42.0.106:8080/register
// 使用POST请求,即可看到效果
// 使用 POST 请求,即可看到效果
// 使用了 rpc 调用,并且使用 hertz 框架暴露出 http 接口
func (h *RegisterService) Run(req *facade.RegisterReq) (resp *facade.RegisterResp, err error) {
//defer func() {
// hlog.CtxInfof(h.Context, "req = %+v", req)
// hlog.CtxInfof(h.Context, "resp = %+v", resp)
//}()
// todo edit your code
r, err := consul.NewConsulResolver("consul:8500")
if err != nil {
return nil, err