remove c-style (incorrect) swtich handling
@@ -112,12 +112,12 @@ func initStatsExporter() {
// Register stats exporter according to config
switch globalConfig.Stats.Exporter {
case obs.Datadog:
+ fallthrough
case obs.Stackdriver:
logger.Warn("Not implemented!")
return
case obs.Prometheus:
err = initPrometheusExporter()
- break
default:
logger.Info("Invalid or no stats exporter was specified")
return
@@ -154,14 +154,15 @@ func initTracingExporter() {
switch globalConfig.Tracing.Exporter {
case obs.AzureMonitor:
+ fallthrough
case obs.Datadog:
+ fallthrough
case obs.Stackdriver:
+ fallthrough
case obs.Zipkin:
logger.Warn("Not implemented!")
- return
case obs.Jaeger:
err = initJaegerExporter()
- break
default:
logger.Info("Invalid or no tracing exporter was specified")
return
@@ -179,13 +180,10 @@ func initTracingExporter() {
switch globalConfig.Tracing.SamplingStrategy {
case "always":
sampler = trace.AlwaysSample()
- break
case "never":
sampler = trace.NeverSample()
- break
case "probabilistic":
sampler = trace.ProbabilitySampler(globalConfig.Tracing.SamplingParam)
- break
default:
logger.Warn("Invalid tracing sampling strategy specified")
return
