Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove c-style (incorrect) switch handling #433

Merged
merged 1 commit into from
Aug 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down