Signed-off-by: Carl Schwan <carl@carlschwan.eu>tags/v26.0.0beta1
@@ -28,12 +28,13 @@ use OCP\AppFramework\Http\Response; | |||
use OCP\DataCollector\AbstractDataCollector; | |||
class LdapDataCollector extends AbstractDataCollector { | |||
public function startLdapRequest(string $query, array $args): void { | |||
public function startLdapRequest(string $query, array $args, array $backtrace): void { | |||
$this->data[] = [ | |||
'start' => microtime(true), | |||
'query' => $query, | |||
'args' => $args, | |||
'end' => microtime(true), | |||
'backtrace' => $backtrace, | |||
]; | |||
} | |||
@@ -330,7 +330,8 @@ class LDAP implements ILDAPWrapper { | |||
return $item; | |||
}, $this->curArgs); | |||
$this->dataCollector->startLdapRequest($functionName, $args); | |||
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); | |||
$this->dataCollector->startLdapRequest($functionName, $args, $backtrace); | |||
} | |||
if ($this->logFile !== '' && is_writable(dirname($this->logFile)) && (!file_exists($this->logFile) || is_writable($this->logFile))) { |