Skip to content

Commit 86af27d

Browse files
author
Mike Heffner
authored
WithServiceName is deprecated (#250)
1 parent f3d694f commit 86af27d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tracing/config.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,18 @@ func Configure(tc *Config, log logrus.FieldLogger, svcName string) {
2828
if tc.Enabled {
2929
tracerAddr := fmt.Sprintf("%s:%s", tc.Host, tc.Port)
3030
tracerOps := []tracer.StartOption{
31-
tracer.WithServiceName(svcName),
31+
tracer.WithService(svcName),
3232
tracer.WithAgentAddr(tracerAddr),
3333
tracer.WithDebugMode(tc.EnableDebug),
3434
tracer.WithLogger(debugLogger{log.WithField("component", "opentracing")}),
3535
}
3636

37+
if tc.UseDatadog {
38+
tracerOps = append(tracerOps, tracer.WithLogger(debugLogger{log.WithField("component", "datadog")}))
39+
} else {
40+
tracerOps = append(tracerOps, tracer.WithLogger(debugLogger{log.WithField("component", "opentracing")}))
41+
}
42+
3743
for k, v := range tc.Tags {
3844
tracerOps = append(tracerOps, tracer.WithGlobalTag(k, v))
3945
}

0 commit comments

Comments
 (0)