func initTracer(serviceName string) (opentracing.Tracer, io.Closer) {
	cfg := &config.Configuration{
		Sampler: &config.SamplerConfig{},
	}
	cfg.ServiceName = serviceName
	cfg.Sampler.Type = "const"
	cfg.Sampler.Param = 1
	_, err := config.FromEnv()
	println(cfg.Sampler.SamplingServerURL, cfg.Sampler.Param)
	if err != nil {
		panic(fmt.Sprintf("ERROR: cannot load config from env: %v\n", err))
	}
	cfg.Reporter = &config.ReporterConfig{
		LogSpans: true,
	}
	tracer, closer, err := cfg.NewTracer(config.Logger(jaeger.StdLogger))
	if err != nil {
		panic(fmt.Sprintf("ERROR: cannot init Jaeger: %v\n", err))
	}
	return tracer, closer
}
// initTracer returns an instance of Jaeger Tracer that samples 100% of traces and logs all spans to stdout.
initTracer returns an instance of Jaeger Tracer that samples 100% of traces and logs all spans to stdout.
// initTracer returns an instance of Jaeger Tracer that samples 100% of traces and logs all spans to stdout .
func initTracer(serviceName string) (opentracing.Tracer, io.Closer) {
	cfg := &config.Configuration{
		Sampler: &config.SamplerConfig{},
	}
	cfg.ServiceName = serviceName
	cfg.Sampler.Type = "const"
	cfg.Sampler.Param = 1
	_, err := config.FromEnv()
	println(cfg.Sampler.SamplingServerURL, cfg.Sampler.Param)
	if err != nil {
		panic(fmt.Sprintf("ERROR: cannot load config from env: %v\n", err))
	}
	cfg.Reporter = &config.ReporterConfig{
		LogSpans: true,
	}
	tracer, closer, err := cfg.NewTracer(config.Logger(jaeger.StdLogger))
	if err != nil {
		panic(fmt.Sprintf("ERROR: cannot init Jaeger: %v\n", err))
	}
	return tracer, closer
}
func initTracer ( serviceName string ) ( opentracing . Tracer , io . Closer ) { cfg := & config . Configuration { Sampler : & config . SamplerConfig { } , } cfg . ServiceName = serviceName cfg . Sampler . Type = " " cfg . Sampler . Param = 1 _ , err := config . FromEnv ( ) println ( cfg . Sampler . SamplingServerURL , cfg . Sampler . Param ) if err != nil { panic ( fmt . Sprintf ( " \n " , err ) ) } cfg . Reporter = & config . ReporterConfig { LogSpans : true , } tracer , closer , err := cfg . NewTracer ( config . Logger ( jaeger . StdLogger ) ) if err != nil { panic ( fmt . Sprintf ( " \n " , err ) ) } return tracer , closer }
initTracer returns an instance of Jaeger Tracer that samples 100% of traces and logs all spans to stdout.
initTracer returns an instance of Jaeger Tracer that samples 100% of traces and logs all spans to stdout .