diff options
Diffstat (limited to 'pkg/tracing/tracing.go')
-rw-r--r-- | pkg/tracing/tracing.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/pkg/tracing/tracing.go b/pkg/tracing/tracing.go deleted file mode 100644 index 5be24faaa..000000000 --- a/pkg/tracing/tracing.go +++ /dev/null @@ -1,29 +0,0 @@ -package tracing - -import ( - "fmt" - "io" - - "github.com/opentracing/opentracing-go" - "github.com/uber/jaeger-client-go" - "github.com/uber/jaeger-client-go/config" -) - -// Init returns an instance of Jaeger Tracer that samples 100% of traces and logs all spans to stdout. -func Init(service string) (opentracing.Tracer, io.Closer) { - cfg := &config.Configuration{ - ServiceName: service, - Sampler: &config.SamplerConfig{ - Type: "const", - Param: 1, - }, - 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 -} |