Move out of else block
@@ -154,7 +154,9 @@ func initTracingExporter() {
if err != nil {
logger.WithError(err).Error("Failed initialising tracing exporter")
- } else {
+ return
+ }
+
var traceConfig trace.Config
logger = logger.WithField("tracing.samplingStrategy", globalConfig.Tracing.SamplingStrategy)
@@ -175,7 +177,6 @@ func initTracingExporter() {
trace.ApplyConfig(traceConfig)
}
-}
func initJaegerExporter() (err error) {
jaegerExporter, err := jaeger.NewExporter(jaeger.Options{
