code: func (t *trace) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
  	trace := false
  	if t.every > 0 {
  		queryNr := atomic.AddUint64(&t.count, 1)
  
  		if queryNr%t.every == 0 {
  			trace = true
  		}
  	}
  	if span := ot.SpanFromContext(ctx); span == nil && trace {
  		span := t.Tracer().StartSpan("servedns")
  		defer span.Finish()
  		ctx = ot.ContextWithSpan(ctx, span)
  	}
  	return plugin.NextOrFailure(t.Name(), t.Next, ctx, w, r)
  }
docs: // ServeDNS implements the plugin.Handle interface.