Procházet zdrojové kódy

pkg/tracing/tracing.go: replace deprecated cfg.New function

$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline=6m ./...
pkg/tracing/tracing.go:81:25:warning: cfg.New is deprecated: use NewTracer() function  (SA1019) (megacheck)
Mario Trangoni před 7 roky
rodič
revize
03a2a39a2a
1 změnil soubory, kde provedl 3 přidání a 2 odebrání
  1. 3 2
      pkg/tracing/tracing.go

+ 3 - 2
pkg/tracing/tracing.go

@@ -58,7 +58,8 @@ func (ts *TracingService) parseSettings() {
 
 func (ts *TracingService) initGlobalTracer() error {
 	cfg := jaegercfg.Configuration{
-		Disabled: !ts.enabled,
+		ServiceName: "grafana",
+		Disabled:    !ts.enabled,
 		Sampler: &jaegercfg.SamplerConfig{
 			Type:  ts.samplerType,
 			Param: ts.samplerParam,
@@ -78,7 +79,7 @@ func (ts *TracingService) initGlobalTracer() error {
 		options = append(options, jaegercfg.Tag(tag, value))
 	}
 
-	tracer, closer, err := cfg.New("grafana", options...)
+	tracer, closer, err := cfg.NewTracer(options...)
 	if err != nil {
 		return err
 	}