Skip to content

Commit bc99f4c

Browse files
authored
Limit query in timeline to 100 chars
1 parent b8914ce commit bc99f4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/DataCollector/QueryCollector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use DebugBar\DataCollector\PDO\PDOCollector;
66
use DebugBar\DataCollector\TimeDataCollector;
7+
use Illuminate\Support\Str;
78

89
/**
910
* Collects data about SQL statements executed with PDO
@@ -178,7 +179,7 @@ public function addQuery($query, $bindings, $time, $connection)
178179
];
179180

180181
if ($this->timeCollector !== null) {
181-
$this->timeCollector->addMeasure($query, $startTime, $endTime);
182+
$this->timeCollector->addMeasure(Str::limit($query, 100), $startTime, $endTime);
182183
}
183184
}
184185

0 commit comments

Comments
 (0)