This commit is contained in:
parent
ce1b5546eb
commit
4fe735ce0d
@ -49,6 +49,7 @@ func (n nacosClient) Remote(ctx *gin.Context) {
|
||||
})
|
||||
if err != nil {
|
||||
Log.Error("获取健康服务失败: %v\n", err.Error())
|
||||
ctx.String(http.StatusBadGateway, "服务异常: %v", err.Error())
|
||||
return
|
||||
}
|
||||
// 组装内部接口
|
||||
@ -57,6 +58,7 @@ func (n nacosClient) Remote(ctx *gin.Context) {
|
||||
req, err := http.NewRequest(ctx.Request.Method, apiUrl, ctx.Request.Body)
|
||||
if err != nil {
|
||||
Log.Error("请求异常: %v\n", err)
|
||||
ctx.String(http.StatusBadGateway, "请求异常: %v", err.Error())
|
||||
return
|
||||
}
|
||||
// 填充Form参数(大概率用不上)
|
||||
@ -72,6 +74,7 @@ func (n nacosClient) Remote(ctx *gin.Context) {
|
||||
response, err := client.Do(req)
|
||||
if err != nil {
|
||||
Log.Error("请求异常: %v\n", err)
|
||||
ctx.String(http.StatusBadGateway, "请求异常:%v", err.Error())
|
||||
return
|
||||
}
|
||||
// 返回结果到前端
|
||||
|
@ -66,10 +66,10 @@ func NewJaegerTracer() (opentracing.Tracer, io.Closer) {
|
||||
|
||||
tracer, closer, err := cfg.NewTracer()
|
||||
if err != nil {
|
||||
core.Log.Error("Jaeger连接失败: %v", err.Error())
|
||||
//core.Log.Error("Jaeger连接失败: %v", err.Error())
|
||||
return nil, nil
|
||||
}
|
||||
core.Log.Debug("Jaeger连接成功")
|
||||
//core.Log.Debug("Jaeger连接成功")
|
||||
opentracing.SetGlobalTracer(tracer)
|
||||
return tracer, closer
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user