aboutsummaryrefslogtreecommitdiff
path: root/plugin/trace/trace.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/trace/trace.go')
-rw-r--r--plugin/trace/trace.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugin/trace/trace.go b/plugin/trace/trace.go
index 7b3ce2a5f..90b4632e8 100644
--- a/plugin/trace/trace.go
+++ b/plugin/trace/trace.go
@@ -54,7 +54,8 @@ func (t *trace) OnStartup() error {
case "zipkin":
err = t.setupZipkin()
case "datadog":
- t.setupDatadog()
+ tracer := opentracer.New(tracer.WithAgentAddr(t.Endpoint), tracer.WithServiceName(t.serviceName), tracer.WithDebugMode(true))
+ t.tracer = tracer
default:
err = fmt.Errorf("unknown endpoint type: %s", t.EndpointType)
}
@@ -75,11 +76,6 @@ func (t *trace) setupZipkin() error {
return err
}
-func (t *trace) setupDatadog() {
- tracer := opentracer.New(tracer.WithAgentAddr(t.Endpoint), tracer.WithServiceName(t.serviceName), tracer.WithDebugMode(true))
- t.tracer = tracer
-}
-
// Name implements the Handler interface.
func (t *trace) Name() string { return "trace" }