Skip to content

Commit 81f8c8e

Browse files
authored
Merge pull request #587 from getsentry/3.x
Laravel SDK version 3.0.0
2 parents 9cfb082 + ab86de5 commit 81f8c8e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+786
-1229
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ jobs:
2121
php: [ "8.1", "8.0", "7.4", "7.3", "7.2" ]
2222
packages:
2323
# All versions below should be test on PHP ^7.1 (Sentry SDK requirement)
24-
- { laravel: 5.1.*, testbench: 3.1.*, phpunit: 5.7.* }
25-
- { laravel: 5.2.*, testbench: 3.2.*, phpunit: 5.7.* }
26-
- { laravel: 5.3.*, testbench: 3.3.*, phpunit: 5.7.* }
27-
- { laravel: 5.4.*, testbench: 3.4.*, phpunit: 5.7.* }
28-
- { laravel: 5.5.*, testbench: 3.5.*, phpunit: 6.5.* }
29-
- { laravel: 5.6.*, testbench: 3.6.*, phpunit: 7.5.* }
30-
- { laravel: 5.7.*, testbench: 3.7.*, phpunit: 7.5.* }
31-
- { laravel: 5.8.*, testbench: 3.8.*, phpunit: 7.5.* }
3224
- { laravel: ^6.0, testbench: 4.7.*, phpunit: 8.4.* }
3325
- { laravel: ^7.0, testbench: 5.1.*, phpunit: 8.4.* }
3426

@@ -48,43 +40,11 @@ jobs:
4840
- php: "7.2"
4941
packages: { laravel: ^8.0, testbench: ^6.0, phpunit: 9.3.* }
5042

51-
- php: "8.0"
52-
packages: { laravel: 5.1.*, testbench: 3.1.*, phpunit: 5.7.* }
53-
- php: "8.0"
54-
packages: { laravel: 5.2.*, testbench: 3.2.*, phpunit: 5.7.* }
55-
- php: "8.0"
56-
packages: { laravel: 5.3.*, testbench: 3.3.*, phpunit: 5.7.* }
57-
- php: "8.0"
58-
packages: { laravel: 5.4.*, testbench: 3.4.*, phpunit: 5.7.* }
59-
- php: "8.0"
60-
packages: { laravel: 5.5.*, testbench: 3.5.*, phpunit: 6.5.* }
61-
- php: "8.0"
62-
packages: { laravel: 5.6.*, testbench: 3.6.*, phpunit: 7.5.* }
63-
- php: "8.0"
64-
packages: { laravel: 5.7.*, testbench: 3.7.*, phpunit: 7.5.* }
65-
- php: "8.0"
66-
packages: { laravel: 5.8.*, testbench: 3.8.*, phpunit: 7.5.* }
6743
- php: "8.0"
6844
packages: { laravel: ^6.0, testbench: 4.7.*, phpunit: 8.4.* }
6945
- php: "8.0"
7046
packages: { laravel: ^7.0, testbench: 5.1.*, phpunit: 8.4.* }
7147

72-
- php: "8.1"
73-
packages: { laravel: 5.1.*, testbench: 3.1.*, phpunit: 5.7.* }
74-
- php: "8.1"
75-
packages: { laravel: 5.2.*, testbench: 3.2.*, phpunit: 5.7.* }
76-
- php: "8.1"
77-
packages: { laravel: 5.3.*, testbench: 3.3.*, phpunit: 5.7.* }
78-
- php: "8.1"
79-
packages: { laravel: 5.4.*, testbench: 3.4.*, phpunit: 5.7.* }
80-
- php: "8.1"
81-
packages: { laravel: 5.5.*, testbench: 3.5.*, phpunit: 6.5.* }
82-
- php: "8.1"
83-
packages: { laravel: 5.6.*, testbench: 3.6.*, phpunit: 7.5.* }
84-
- php: "8.1"
85-
packages: { laravel: 5.7.*, testbench: 3.7.*, phpunit: 7.5.* }
86-
- php: "8.1"
87-
packages: { laravel: 5.8.*, testbench: 3.8.*, phpunit: 7.5.* }
8848
- php: "8.1"
8949
packages: { laravel: ^6.0, testbench: 4.7.*, phpunit: 8.4.* }
9050
- php: "8.1"

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,41 @@
22

33
## Unreleased
44

5+
## 3.0.0
6+
7+
**New features**
8+
9+
- We are now creating more spans to give you better insights into the performance of your application
10+
- Add a `http.client` span. This span indicates the time that is spent when using the Laravel HTTP client (#585)
11+
- Add a `http.route` span. This span indicates the time that is spent inside a controller method or route closure (#593)
12+
- Add a `db.transaction` span. This span indicates the time that is spent inside a database transaction (#594)
13+
- Add support for [Dynamic Sampling](https://docs.sentry.io/product/data-management-settings/dynamic-sampling/), allowing developers to set a server-side sampling rate without the need to re-deploy their applications
14+
- Add support for Dynamic Sampling (#572)
15+
16+
**Breaking changes**
17+
18+
- Laravel Lumen is no longer supported
19+
- Drop support for Laravel Lumen (#579)
20+
- Laravel versions 5.0 - 5.8 are no longer supported
21+
- Drop support for Laravel 5.x (#581)
22+
- Remove `Sentry\Integration::extractNameForRoute()`, it's alternative `Sentry\Integration::extractNameAndSourceForRoute()` is marked as `@internal` (#580)
23+
- Remove internal `Sentry\Integration::currentTracingSpan()`, use `SentrySdk::getCurrentHub()->getSpan()` if you were using this internal method (#592)
24+
25+
**Other changes**
26+
27+
- Set the tracing transaction name on the `Illuminate\Routing\Events\RouteMatched` instead of at the end of the request (#580)
28+
- Remove extracting route name or controller for transaction names (#583). This unifies the transaction names to a more concise format.
29+
- Simplify Sentry meta tag retrieval, by adding `Sentry\Laravel\Integration::sentryMeta()` (#586)
30+
- Fix tracing with nested queue jobs (mostly when running jobs in the `sync` driver) (#592)
31+
532
## 2.14.2
633

734
- Fix extracting command input resulting in errors when calling Artisan commands programatically with `null` as an argument value (#589)
835

936
## 2.14.1
1037

1138
- Fix not setting the correct SDK ID and version when running the `sentry:test` command (#582)
39+
- Transaction names now only show the parameterized URL (`/some/{route}`) instead of the route name or controller class (#583)
1240

1341
## 2.14.0
1442

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,21 @@ try {
7878

7979
## Laravel Version Compatibility
8080

81-
- Laravel `<= 4.2.x` is supported until `0.8.x`
82-
- Laravel `<= 5.7.x` on PHP `<= 7.0` is supported until `0.11.x`
83-
- Laravel `>= 5.x.x` on PHP `>= 7.1` is supported in all versions
81+
The Laravel versions listed below are all currently supported:
82+
8483
- Laravel `>= 6.x.x` on PHP `>= 7.2` is supported starting from `1.2.0`
8584
- Laravel `>= 7.x.x` on PHP `>= 7.2` is supported starting from `1.7.0`
8685
- Laravel `>= 8.x.x` on PHP `>= 7.3` is supported starting from `1.9.0`
8786
- Laravel `>= 9.x.x` on PHP `>= 8.0` is supported starting from `2.11.0`
8887

89-
Please note that of version `>= 2.0.0` we require PHP Version `>= 7.2` because we are using our new [PHP SDK](https://github.com/getsentry/sentry-php) underneath.
88+
Please note that starting with version `>= 2.0.0` we require PHP Version `>= 7.2` because we are using our new [PHP SDK](https://github.com/getsentry/sentry-php) underneath.
89+
90+
The Laravel and Lumen version listed below were supported in previous versions:
91+
92+
- Laravel `<= 4.2.x` is supported until `0.8.x`
93+
- Laravel `<= 5.7.x` on PHP `<= 7.0` is supported until `0.11.x`
94+
- Laravel `>= 5.x.x` on PHP `>= 7.1` is supported until `2.14.x`
95+
- Laravel Lumen is supported until `2.14.x`
9096

9197
## Contributing to the SDK
9298

composer.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,24 @@
2222
],
2323
"require": {
2424
"php": "^7.2 | ^8.0",
25-
"illuminate/support": "5.0 - 5.8 | ^6.0 | ^7.0 | ^8.0 | ^9.0",
26-
"sentry/sentry": "^3.3",
25+
"illuminate/support": "^6.0 | ^7.0 | ^8.0 | ^9.0",
26+
"sentry/sentry": "^3.9",
2727
"sentry/sdk": "^3.1",
2828
"symfony/psr-http-message-bridge": "^1.0 | ^2.0",
2929
"nyholm/psr7": "^1.0"
3030
},
31+
"conflict": {
32+
"laravel/lumen-framework": "*"
33+
},
3134
"autoload": {
3235
"psr-0": {
3336
"Sentry\\Laravel\\": "src/"
3437
}
3538
},
3639
"require-dev": {
37-
"phpunit/phpunit": "^5.7 | ^6.5 | ^7.5 | ^8.4 | ^9.3",
38-
"laravel/framework": "5.0 - 5.8 | ^6.0 | ^7.0 | ^8.0 | ^9.0",
39-
"orchestra/testbench": "3.1 - 3.8 | ^4.7 | ^5.1 | ^6.0 | ^7.0",
40+
"phpunit/phpunit": "^8.4 | ^9.3",
41+
"laravel/framework": "^6.0 | ^7.0 | ^8.0 | ^9.0",
42+
"orchestra/testbench": "^4.7 | ^5.1 | ^6.0 | ^7.0",
4043
"friendsofphp/php-cs-fixer": "^3.11",
4144
"mockery/mockery": "^1.3"
4245
},
@@ -61,8 +64,8 @@
6164
},
6265
"extra": {
6366
"branch-alias": {
64-
"dev-3.x": "3.x-dev",
65-
"dev-master": "2.x-dev",
67+
"dev-master": "3.x-dev",
68+
"dev-2.x": "2.x-dev",
6669
"dev-1.x": "1.x-dev",
6770
"dev-0.x": "0.x-dev"
6871
},

config/sentry.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,14 @@
4545

4646
// Indicates if the tracing integrations supplied by Sentry should be loaded
4747
'default_integrations' => true,
48+
49+
// Indicates that requests without a matching route should be traced
50+
'missing_routes' => false,
4851
],
4952

5053
// @see: https://docs.sentry.io/platforms/php/configuration/options/#send-default-pii
5154
'send_default_pii' => env('SENTRY_SEND_DEFAULT_PII', false),
5255

5356
'traces_sample_rate' => (float)(env('SENTRY_TRACES_SAMPLE_RATE', 0.0)),
5457

55-
'controllers_base_namespace' => env('SENTRY_CONTROLLERS_BASE_NAMESPACE', 'App\\Http\\Controllers'),
56-
5758
];

src/Sentry/Laravel/Console/PublishCommand.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@
1010

1111
class PublishCommand extends Command
1212
{
13-
/**
14-
* Laravel 5.0.x: The name and signature of the console command.
15-
*
16-
* @var string
17-
*/
18-
protected $name = 'sentry:publish';
19-
2013
/**
2114
* The name and signature of the console command.
2215
*

src/Sentry/Laravel/Console/TestCommand.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,11 @@
1212
use Sentry\State\HubInterface;
1313
use Sentry\Tracing\SpanContext;
1414
use Sentry\Tracing\TransactionContext;
15+
use Sentry\Tracing\TransactionSource;
1516
use Throwable;
1617

1718
class TestCommand extends Command
1819
{
19-
/**
20-
* Laravel 5.0.x: The name and signature of the console command.
21-
*
22-
* @var string
23-
*/
24-
protected $name = 'sentry:test';
25-
2620
/**
2721
* The name and signature of the console command.
2822
*
@@ -145,6 +139,7 @@ public function log($level, $message, array $context = []): void
145139
$transactionContext = new TransactionContext();
146140
$transactionContext->setSampled(true);
147141
$transactionContext->setName('Sentry Test Transaction');
142+
$transactionContext->setSource(TransactionSource::custom());
148143
$transactionContext->setOp('sentry.test');
149144

150145
$transaction = $hub->startTransaction($transactionContext);

0 commit comments

Comments
 (0)