Commit c86be342 authored by Oleg Atamanenko's avatar Oleg Atamanenko Committed by GitHub

Disable debug mode for tracing - removes extra logging (#4016)

Signed-off-by: default avatarOleg Atamanenko <oleg.atamanenko@gmail.com>
parent 8c6d016a
......@@ -7,6 +7,7 @@
## Description
With *trace* you enable OpenTracing of how a request flows through CoreDNS.
Enable *debug* plugin to get logs from the trace plugin.
## Syntax
......@@ -84,3 +85,7 @@ trace tracinghost:9411 {
client_server
}
~~~
## Also See
See the *debug* plugin for more information about debug logging.
......@@ -10,6 +10,7 @@ import (
"github.com/coredns/coredns/plugin"
"github.com/coredns/coredns/plugin/metrics"
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/pkg/log"
"github.com/coredns/coredns/plugin/pkg/rcode"
_ "github.com/coredns/coredns/plugin/pkg/trace" // Plugin the trace package.
"github.com/coredns/coredns/request"
......@@ -52,7 +53,7 @@ func (t *trace) OnStartup() error {
case "zipkin":
err = t.setupZipkin()
case "datadog":
tracer := opentracer.New(tracer.WithAgentAddr(t.Endpoint), tracer.WithServiceName(t.serviceName), tracer.WithDebugMode(true))
tracer := opentracer.New(tracer.WithAgentAddr(t.Endpoint), tracer.WithServiceName(t.serviceName), tracer.WithDebugMode(log.D.Value()))
t.tracer = tracer
default:
err = fmt.Errorf("unknown endpoint type: %s", t.EndpointType)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment