code: public function queryEnd($queryId)
      {
          $result = $this->parentQueryEnd($queryId);
  
          if ($this->captureStacktraces) {
              $this->stackTraces[$queryId] = $this->getStackTrace();
          }
  
          return $result;
      }
docs: Calls parent implementation and saves stack trace
  
  @param int $queryId
  @return string