Skip to content

Commit

Permalink
Reset non-configured tracers to make sure there is no multi-tracer in…
Browse files Browse the repository at this point in the history
…italization
  • Loading branch information
aantono authored and traefiker committed Jul 26, 2018
1 parent 21d2b64 commit f46e772
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ func (gc *GlobalConfiguration) initTracing() {
log.Warn("Zipkin configuration will be ignored")
gc.Tracing.Zipkin = nil
}
if gc.Tracing.DataDog != nil {
log.Warn("DataDog configuration will be ignored")
gc.Tracing.DataDog = nil
}
case zipkin.Name:
if gc.Tracing.Zipkin == nil {
gc.Tracing.Zipkin = &zipkin.Config{
Expand All @@ -346,6 +350,10 @@ func (gc *GlobalConfiguration) initTracing() {
log.Warn("Jaeger configuration will be ignored")
gc.Tracing.Jaeger = nil
}
if gc.Tracing.DataDog != nil {
log.Warn("DataDog configuration will be ignored")
gc.Tracing.DataDog = nil
}
case datadog.Name:
if gc.Tracing.DataDog == nil {
gc.Tracing.DataDog = &datadog.Config{
Expand All @@ -354,9 +362,13 @@ func (gc *GlobalConfiguration) initTracing() {
Debug: false,
}
}
if gc.Tracing.DataDog != nil {
log.Warn("DataDog configuration will be ignored")
gc.Tracing.DataDog = nil
if gc.Tracing.Zipkin != nil {
log.Warn("Zipkin configuration will be ignored")
gc.Tracing.Zipkin = nil
}
if gc.Tracing.Jaeger != nil {
log.Warn("Jaeger configuration will be ignored")
gc.Tracing.Jaeger = nil
}
default:
log.Warnf("Unknown tracer %q", gc.Tracing.Backend)
Expand Down

0 comments on commit f46e772

Please sign in to comment.