mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
Grpc tracing (#544)
* checkpoint * Pass context through ServeDNS, enable gRPC tracing * Fix types and make tracer available to proxy. go fmt * Fix imports * Use the DoNotStartTrace option * Change to SpanFilter from DoNotStartTrace * Use new name (IncludeSpan) * Final names * Add tests; fix possible client/conn leaks in grpc * go fmt
This commit is contained in:
@@ -155,6 +155,10 @@ func (s *Server) Address() string { return s.Addr }
|
||||
// defined in the request so that the correct zone
|
||||
// (configuration and middleware stack) will handle the request.
|
||||
func (s *Server) ServeDNS(w dns.ResponseWriter, r *dns.Msg) {
|
||||
s.ServeDNSWithContext(context.Background(), w, r)
|
||||
}
|
||||
|
||||
func (s *Server) ServeDNSWithContext(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) {
|
||||
defer func() {
|
||||
// In case the user doesn't enable error middleware, we still
|
||||
// need to make sure that we stay alive up here
|
||||
@@ -171,7 +175,6 @@ func (s *Server) ServeDNS(w dns.ResponseWriter, r *dns.Msg) {
|
||||
q := r.Question[0].Name
|
||||
b := make([]byte, len(q))
|
||||
off, end := 0, false
|
||||
ctx := context.Background()
|
||||
|
||||
var dshandler *Config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user