Skip to content

Commit 0fd80a9

Browse files
authored
Prepare 5.0.0 (#829)
1 parent 18a35be commit 0fd80a9

File tree

2 files changed

+161
-5
lines changed

2 files changed

+161
-5
lines changed

CHANGELOG.md

+107-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,115 @@
1-
# Changelog
2-
31
## 5.0.0
42

5-
The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v5.0.0.
3+
The Sentry SDK team is thrilled to announce the immediate availability of Sentry Symfony SDK v5.0.0.
4+
5+
### Breaking Change
6+
7+
Please refer to the [UPGRADE-5.0.md](https://github.com/getsentry/sentry-symfony/blob/master/UPGRADE-5.0.md) guide for a complete list of breaking changes.
8+
9+
This version adds support for the underlying [Sentry PHP SDK v4.0](https://github.com/getsentry/sentry-php).
10+
Please refer to the PHP SDK [sentry-php/UPGRADE-4.0.md](https://github.com/getsentry/sentry-php/blob/master/UPGRADE-4.0.md) guide for a complete list of breaking changes.
11+
12+
- This version exclusively uses the [envelope endpoint](https://develop.sentry.dev/sdk/envelopes/) to send event data to Sentry.
13+
14+
If you are using [sentry.io](https://sentry.io), no action is needed.
15+
If you are using an on-premise/self-hosted installation of Sentry, the minimum requirement is now version `>= v20.6.0`.
16+
17+
- You need to have `ext-curl` installed to use the SDK.
618

7-
### Breaking Changes
19+
- The `IgnoreErrorsIntegration` integration was removed. Use the `ignore_exceptions` option instead.
20+
Previously, both `Symfony\Component\ErrorHandler\Error\FatalError` and `Symfony\Component\Debug\Exception\FatalErrorException` were ignored by default.
21+
To continue ignoring these exceptions, make the following changes to the config file:
22+
23+
```yaml
24+
// config/packages/sentry.yaml
25+
26+
sentry:
27+
options:
28+
ignore_exceptions:
29+
- 'Symfony\Component\ErrorHandler\Error\FatalError'
30+
- 'Symfony\Component\Debug\Exception\FatalErrorException'
31+
```
32+
33+
This option performs an [`is_a`](https://www.php.net/manual/en/function.is-a.php) check now, so you can also ignore more generic exceptions.
834

935
### Features
1036

11-
### Bug Fixes
37+
- Add support for Sentry Developer Metrics [(#1619)](https://github.com/getsentry/sentry-php/pull/1619)
38+
39+
```php
40+
use function Sentry\metrics;
41+
42+
// Add 4 to a counter named hits
43+
metrics()->increment(key: 'hits', value: 4);
44+
45+
// Add 25 to a distribution named response_time with unit milliseconds
46+
metrics()->distribution(key: 'response_time', value: 25, unit: MetricsUnit::millisecond());
47+
48+
// Add 2 to gauge named parallel_requests, tagged with type: "a"
49+
metrics()->gauge(key: 'parallel_requests', value: 2, tags: ['type': 'a']);
50+
51+
// Add a user's email to a set named users.sessions, tagged with role: "admin"
52+
metrics()->set('users.sessions', '[email protected]', null, ['role' => User::admin()]);
53+
```
54+
55+
Metrics are automatically sent to Sentry at the end of a request, hooking into Symfony's `kernel.terminate` event.
56+
57+
- Add new fluent APIs [(#1601)](https://github.com/getsentry/sentry-php/pull/1601)
58+
59+
```php
60+
// Before
61+
$transactionContext = new TransactionContext();
62+
$transactionContext->setName('GET /example');
63+
$transactionContext->setOp('http.server');
64+
65+
// After
66+
$transactionContext = (new TransactionContext())
67+
->setName('GET /example');
68+
->setOp('http.server');
69+
```
70+
71+
- Simplify the breadcrumb API [(#1603)](https://github.com/getsentry/sentry-php/pull/1603)
72+
73+
```php
74+
// Before
75+
\Sentry\addBreadcrumb(
76+
new \Sentry\Breadcrumb(
77+
\Sentry\Breadcrumb::LEVEL_INFO,
78+
\Sentry\Breadcrumb::TYPE_DEFAULT,
79+
'auth', // category
80+
'User authenticated', // message (optional)
81+
['user_id' => $userId] // data (optional)
82+
)
83+
);
84+
85+
// After
86+
\Sentry\addBreadcrumb(
87+
category: 'auth',
88+
message: 'User authenticated', // optional
89+
metadata: ['user_id' => $userId], // optional
90+
level: Breadcrumb::LEVEL_INFO, // set by default
91+
type: Breadcrumb::TYPE_DEFAULT, // set by default
92+
);
93+
```
94+
95+
- New default cURL HTTP client [(#1589)](https://github.com/getsentry/sentry-php/pull/1589)
96+
97+
The SDK now ships with its own HTTP client based on cURL. A few new options were added.
98+
99+
```yaml
100+
// config/packages/sentry.yaml
101+
102+
sentry:
103+
options:
104+
- http_proxy_authentication: 'username:password' // user name and password to use for proxy authentication
105+
- http_ssl_verify_peer: false // default true, verify the peer's SSL certificate
106+
- http_compression: false // default true, http request body compression
107+
```
108+
109+
To use a different client, you may use the `http_client` option.
110+
To use a different transport, you may use the `transport` option. A custom transport must implement the `TransportInterface`.
111+
If you use the `transport` option, the `http_client` option has no effect.
12112

13113
### Misc
114+
115+
- The abandoned package `php-http/message-factory` was removed.

UPGRADE-5.0.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Upgrade 4.x to 5.0
2+
3+
This version adds support for the underlying [Sentry PHP SDK v4.0](https://github.com/getsentry/sentry-php).
4+
Please refer to the PHP SDK [sentry-php/UPGRADE-4.0.md](https://github.com/getsentry/sentry-php/blob/master/UPGRADE-4.0.md) guide for a complete list of breaking changes.
5+
6+
- This version exclusively uses the [envelope endpoint](https://develop.sentry.dev/sdk/envelopes/) to send event data to Sentry.
7+
8+
If you are using [sentry.io](https://sentry.io), no action is needed.
9+
If you are using an on-premise/self-hosted installation of Sentry, the minimum requirement is now version `>= v20.6.0`.
10+
11+
- You need to have `ext-curl` installed to use the SDK.
12+
13+
- The `IgnoreErrorsIntegration` integration was removed. Use the `ignore_exceptions` option instead.
14+
Previously, both `Symfony\Component\ErrorHandler\Error\FatalError` and `Symfony\Component\Debug\Exception\FatalErrorException` were ignored by default.
15+
To continue ignoring these exceptions, make the following changes to your `config/packages/sentry.yaml` file:
16+
17+
```yaml
18+
// config/packages/sentry.yaml
19+
20+
sentry:
21+
options:
22+
ignore_exceptions:
23+
- 'Symfony\Component\ErrorHandler\Error\FatalError'
24+
- 'Symfony\Component\Debug\Exception\FatalErrorException'
25+
```
26+
27+
This option performs an [`is_a`](https://www.php.net/manual/en/function.is-a.php) check now, so you can also ignore more generic exceptions.
28+
29+
- Removed support for `guzzlehttp/psr7: ^1.8.4`.
30+
31+
- The `RequestFetcher` now relies on `guzzlehttp/psr7: ^2.1.1`.
32+
33+
- Continue traces from the W3C `traceparent` request header.
34+
- Inject the W3C `traceparent` header on outgoing HTTP client calls.
35+
- Added `Sentry\SentryBundle\Twig\SentryExtension::getW3CTraceMeta()`.
36+
37+
- The new default value for the `sentry.options.trace_propagation_targets` option is now `null`. To not attach any headers to outgoing requests, set this option to `[]`.
38+
39+
- Added the `sentry.options.enable_tracing` option.
40+
- Added the `sentry.options.attach_metric_code_locations` option.
41+
- Added the `sentry.options.spotlight` option.
42+
- Added the `sentry.options.spotlight_url` option.
43+
- Added the `sentry.options.transport` option.
44+
- Added the `sentry.options.http_client` option.
45+
- Added the `sentry.options.http_proxy_authentication` option.
46+
- Added the `sentry.options.http_ssl_verify_peer` option.
47+
- Added the `sentry.options.http_compression` option.
48+
49+
- Removed the `sentry.transport_factory` option. Use `sentry.options.transport` to use a custom transport.
50+
- Removed the `sentry.options.send_attempts` option. You may use a custom transport if you rely on this behaviour.
51+
- Removed the `sentry.options.enable_compression` option. Use `sentry.options.http_compression` instead.
52+
53+
- Removed `Sentry\SentryBundle\Transport\TransportFactory`.
54+
- Removed `Sentry\State\HubInterface\Sentry\State\HubInterface`.

0 commit comments

Comments
 (0)