summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-10-20 11:23:58 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-10-20 16:55:44 +0200
commit25519b7089b748c09f39f01651fae08866b84305 (patch)
tree75f1e13fec9f29853402064cdcc6166be3ab1b0f /apps
parent0f0f132959254432fd40e709dd558a45585e0803 (diff)
downloadnextcloud-server-25519b7089b748c09f39f01651fae08866b84305.tar.gz
nextcloud-server-25519b7089b748c09f39f01651fae08866b84305.zip
Add backtrace to ldap profiler collector
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/lib/DataCollector/LdapDataCollector.php3
-rw-r--r--apps/user_ldap/lib/LDAP.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/DataCollector/LdapDataCollector.php b/apps/user_ldap/lib/DataCollector/LdapDataCollector.php
index cb61de96e37..833b314b199 100644
--- a/apps/user_ldap/lib/DataCollector/LdapDataCollector.php
+++ b/apps/user_ldap/lib/DataCollector/LdapDataCollector.php
@@ -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,
];
}
diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php
index c03337a9e51..6a54f89880d 100644
--- a/apps/user_ldap/lib/LDAP.php
+++ b/apps/user_ldap/lib/LDAP.php
@@ -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))) {