Skip to content

Commit 0bd2041

Browse files
authored
Merge pull request #54 from BenConstable/query-bindings-fixes
Adds missing query bindings to breadcrumbs
2 parents e9b5a8b + 6bb99ba commit 0bd2041

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Sentry/SentryLaravel/SentryLaravelEventHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ protected function queryHandler($query, $bindings, $time, $connectionName)
133133
$this->record([
134134
'message' => $query,
135135
'category' => 'sql.query',
136+
'data' => $data
136137
]);
137138
}
138139

@@ -147,7 +148,7 @@ protected function queryExecutedHandler(QueryExecuted $query)
147148
'connectionName' => $query->connectionName,
148149
];
149150

150-
if ($this->sqlBindings && !empty($bindings)) {
151+
if ($this->sqlBindings && !empty($query->bindings)) {
151152
$data['bindings'] = $query->bindings;
152153
}
153154

0 commit comments

Comments
 (0)