Skip to content

Commit 9a11bbb

Browse files
authored
Merge pull request #31 from getsentry/feature/query-breadcrumbs
Improve breadcrumbs
2 parents aa59802 + fa1a0e1 commit 9a11bbb

File tree

15 files changed

+145
-16
lines changed

15 files changed

+145
-16
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ return array(
116116

117117
// capture release as git sha
118118
// 'release' => trim(exec('git log --pretty="%h" -n1 HEAD')),
119+
120+
// Capture bindings on SQL queries
121+
'breadcrumbs.sql_bindings' => true,
119122
);
120123
```
121124

examples/laravel-4.2/app/config/packages/sentry/sentry-laravel/config.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@
55

66
// capture release as git sha
77
// 'release' => trim(exec('git log --pretty="%h" -n1 HEAD')),
8+
9+
// Capture bindings on SQL queries
10+
'breadcrumbs.sql_bindings' => false,
811
);

examples/laravel-4.2/app/routes.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
|
88
| Here is where you can register all of the routes for an application.
99
| It's a breeze. Simply tell Laravel the URIs it should respond to
10-
| and give it the Closure to execute when that URI is requested.
10+
| and give it the controller to call when that URI is requested.
1111
|
1212
*/
1313

1414
function verifyCredentials()
1515
{
1616
Log::info('Verifying credentials');
17+
$user = DB::table('migrations')->where('migration', 'a migration')->first();
1718
throw new Exception('No credentials passed!');
1819
}
1920

examples/laravel-5.1/config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
|
7979
*/
8080

81-
'key' => env('APP_KEY', 'SomeRandomString'),
81+
'key' => env('APP_KEY', 'xlhF31NeOlibJcoOW9tvZg7TkHcAZI3a'),
8282

8383
'cipher' => 'AES-256-CBC',
8484

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<?php
22

33
return array(
4-
'dsn' => env('SENTRY_DSN'),
4+
'dsn' => env('SENTRY_DSN', 'https://e9ebbd88548a441288393c457ec90441:[email protected]/3235'),
55

66
// capture release as git sha
77
// 'release' => trim(exec('git log --pretty="%h" -n1 HEAD')),
8+
9+
// Capture bindings on SQL queries
10+
'breadcrumbs.sql_bindings' => true,
811
);

examples/laravel-5.2/app/Http/routes.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
function verifyCredentials()
1515
{
1616
Log::info('Verifying credentials');
17+
$user = DB::table('users')->where('name', 'John')->first();
1718
throw new Exception('No credentials passed!');
1819
}
1920

examples/laravel-5.2/config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
|
9292
*/
9393

94-
'key' => env('APP_KEY'),
94+
'key' => env('APP_KEY', 'xlhF31NeOlibJcoOW9tvZg7TkHcAZI3a'),
9595

9696
'cipher' => 'AES-256-CBC',
9797

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<?php
22

33
return array(
4-
'dsn' => env('SENTRY_DSN'),
4+
'dsn' => env('SENTRY_DSN', 'https://e9ebbd88548a441288393c457ec90441:[email protected]/3235'),
55

66
// capture release as git sha
77
// 'release' => trim(exec('git log --pretty="%h" -n1 HEAD')),
8+
9+
// Capture bindings on SQL queries
10+
'breadcrumbs.sql_bindings' => false,
811
);

examples/lumen-5.2/app/Http/routes.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,22 @@
1111
|
1212
*/
1313

14+
function verifyCredentials()
15+
{
16+
Log::info('Verifying credentials');
17+
$user = DB::table('migrations')->where('migration', 'a migration')->first();
18+
throw new Exception('No credentials passed!');
19+
}
20+
21+
22+
function authenticateUser()
23+
{
24+
Log::info('Authenticating the current user');
25+
verifyCredentials();
26+
}
27+
28+
1429
$app->get('/', function () use ($app) {
1530
Log::info('Rendering a page thats about to error');
16-
throw new Exception('An unhandled exception');
31+
authenticateUser();
1732
});

examples/lumen-5.2/bootstrap/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
realpath(__DIR__.'/../')
2424
);
2525

26-
// $app->withFacades();
26+
$app->withFacades();
2727

2828
// $app->withEloquent();
2929

0 commit comments

Comments
 (0)