jaeger修改读取config字段名
This commit is contained in:
@@ -3,6 +3,7 @@ package jaeger
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"gitee.com/red-future---jilin-g/common/http"
|
||||||
"github.com/gogf/gf/contrib/trace/otlphttp/v2"
|
"github.com/gogf/gf/contrib/trace/otlphttp/v2"
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
"github.com/gogf/gf/v2/frame/g"
|
||||||
"github.com/gogf/gf/v2/net/ghttp"
|
"github.com/gogf/gf/v2/net/ghttp"
|
||||||
@@ -15,8 +16,7 @@ var ShutDown func(ctx context.Context)
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
jaegerAgent := g.Cfg().MustGet(context.Background(), "jaeger.addr").String()
|
jaegerAgent := g.Cfg().MustGet(context.Background(), "jaeger.addr").String()
|
||||||
serverName := g.Cfg().MustGet(context.Background(), "server.Name").String()
|
shutdown, err := otlphttp.Init(http.Httpserver.GetName(), jaegerAgent, "/v1/traces")
|
||||||
shutdown, err := otlphttp.Init(serverName, jaegerAgent, "/v1/traces")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user