Update dependency sentry/sentry-symfony to v5
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| sentry/sentry-symfony (source) | 4.14.0 -> 5.0.0 |
Release Notes
getsentry/sentry-symfony (sentry/sentry-symfony)
v5.0.0
The Sentry SDK team is thrilled to announce the immediate availability of Sentry Symfony SDK v5.0.0.
Breaking Change
Please refer to the UPGRADE-5.0.md guide for a complete list of breaking changes.
This version adds support for the underlying Sentry PHP SDK v4.0. Please refer to the PHP SDK sentry-php/UPGRADE-4.0.md guide for a complete list of breaking changes.
-
This version exclusively uses the envelope endpoint to send event data to Sentry.
If you are using sentry.io, no action is needed. If you are using an on-premise/self-hosted installation of Sentry, the minimum requirement is now version
>= v20.6.0. -
You need to have
ext-curlinstalled to use the SDK. -
The
IgnoreErrorsIntegrationintegration was removed. Use theignore_exceptionsoption instead. Previously, bothSymfony\Component\ErrorHandler\Error\FatalErrorandSymfony\Component\Debug\Exception\FatalErrorExceptionwere ignored by default. To continue ignoring these exceptions, make the following changes to the config file:// config/packages/sentry.yaml sentry: options: ignore_exceptions: - 'Symfony\Component\ErrorHandler\Error\FatalError' - 'Symfony\Component\Debug\Exception\FatalErrorException'This option performs an
is_acheck now, so you can also ignore more generic exceptions.
Features
-
Add support for Sentry Developer Metrics (#1619)
use function Sentry\metrics; // Add 4 to a counter named hits metrics()->increment(key: 'hits', value: 4); // Add 25 to a distribution named response_time with unit milliseconds metrics()->distribution(key: 'response_time', value: 25, unit: MetricsUnit::millisecond()); // Add 2 to gauge named parallel_requests, tagged with type: "a" metrics()->gauge(key: 'parallel_requests', value: 2, tags: ['type': 'a']); // Add a user's email to a set named users.sessions, tagged with role: "admin" metrics()->set('users.sessions', '[email protected]', null, ['role' => User::admin()]);Metrics are automatically sent to Sentry at the end of a request, hooking into Symfony's
kernel.terminateevent. -
Add new fluent APIs (#1601)
// Before $transactionContext = new TransactionContext(); $transactionContext->setName('GET /example'); $transactionContext->setOp('http.server'); // After $transactionContext = (new TransactionContext()) ->setName('GET /example'); ->setOp('http.server'); -
Simplify the breadcrumb API (#1603)
// Before \Sentry\addBreadcrumb( new \Sentry\Breadcrumb( \Sentry\Breadcrumb::LEVEL_INFO, \Sentry\Breadcrumb::TYPE_DEFAULT, 'auth', // category 'User authenticated', // message (optional) ['user_id' => $userId] // data (optional) ) ); // After \Sentry\addBreadcrumb( category: 'auth', message: 'User authenticated', // optional metadata: ['user_id' => $userId], // optional level: Breadcrumb::LEVEL_INFO, // set by default type: Breadcrumb::TYPE_DEFAULT, // set by default ); -
New default cURL HTTP client (#1589)
The SDK now ships with its own HTTP client based on cURL. A few new options were added.
// config/packages/sentry.yaml sentry: options: - http_proxy_authentication: 'username:password' // user name and password to use for proxy authentication - http_ssl_verify_peer: false // default true, verify the peer's SSL certificate - http_compression: false // default true, http request body compressionTo use a different client, you may use the
http_clientoption. To use a different transport, you may use thetransportoption. A custom transport must implement theTransportInterface. If you use thetransportoption, thehttp_clientoption has no effect.
Misc
- The abandoned package
php-http/message-factorywas removed.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
Autoclosing Skipped
This PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.
Edited/Blocked Notification
Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.
You can manually request rebase by checking the rebase/retry box above.
⚠️ Warning: custom changes will be lost.
Feature branch deployment currently inactive.
If the PR is still open, you can add the deploy! label to this PR to trigger a feature branch deployment.
It still works: https://ecamp.sentry.io/issues/4691566459/events/06d25741b4544011b4e8266f20ddc450/
@pmattmann ?