|
1 | 1 | # Changelog
|
2 | 2 |
|
3 |
| -## Unreleased |
| 3 | +## 4.6.0 |
4 | 4 |
|
5 |
| -- Report exceptions to Sentry as unhandled by default (#670) |
6 |
| -- Exceptions from messages which will be retried are sent to Sentry as handled (#670) |
| 5 | +The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.6.0. |
| 6 | + |
| 7 | +- Report exceptions to Sentry as unhandled by default [(#674)](https://github.com/getsentry/sentry-symfony/pull/674) |
| 8 | + |
| 9 | + All unhandled exceptions will now be marked as `handled: false`. You can query for such events on the issues list page, |
| 10 | + by searching for `error.handled:false`. |
| 11 | + |
| 12 | +- Exceptions from messages which will be retried are sent to Sentry as handled [(#674)](https://github.com/getsentry/sentry-symfony/pull/674) |
| 13 | + |
| 14 | + All unhandled exceptions happening on the message bus will now be unpacked and reported individually. |
| 15 | + The `WorkerMessageFailedEvent::willRetry` property is used to determine the `handled` value of the event sent to Sentry. |
| 16 | + |
| 17 | +- Add `register_error_handler` config option [(#687)](https://github.com/getsentry/sentry-symfony/pull/687) |
| 18 | + |
| 19 | + With this option, you can disable the global error and exception handlers of the base PHP SDK. |
| 20 | + If disabled, only events logged by Monolog will be sent to Sentry. |
| 21 | + |
| 22 | + ```yaml |
| 23 | + sentry: |
| 24 | + dsn: '%env(SENTRY_DSN)%' |
| 25 | + register_error_listener: false |
| 26 | + register_error_handler: false |
| 27 | + |
| 28 | + monolog: |
| 29 | + handlers: |
| 30 | + sentry: |
| 31 | + type: sentry |
| 32 | + level: !php/const Monolog\Logger::ERROR |
| 33 | + hub_id: Sentry\State\HubInterface |
| 34 | + ``` |
| 35 | +
|
| 36 | +- feat: Add before_send_transaction (#691) |
| 37 | +
|
| 38 | + Similar to `before_send`, you can now apply additional logic for `transaction` events. |
| 39 | + You can mutate the `transaction` event before it is sent to Sentry. If your callback returns `null`, |
| 40 | + the event is dropped. |
| 41 | + |
| 42 | + ```yaml |
| 43 | + sentry: |
| 44 | + options: |
| 45 | + before_send_transaction: 'sentry.callback.before_send_transaction' |
| 46 | +
|
| 47 | + services: |
| 48 | + sentry.callback.before_send_transaction: |
| 49 | + class: 'App\Service\Sentry' |
| 50 | + factory: [ '@App\Service\Sentry', 'getBeforeSendTransaction' ] |
| 51 | + ``` |
| 52 | + |
| 53 | + ```php |
| 54 | + <?php |
| 55 | +
|
| 56 | + namespace App\Service; |
| 57 | +
|
| 58 | + class Sentry |
| 59 | + { |
| 60 | + public function getBeforeSendTransaction(): callable |
| 61 | + { |
| 62 | + return function (\Sentry\Event $event): ?\Sentry\Event { |
| 63 | + return $event; |
| 64 | + }; |
| 65 | + } |
| 66 | + } |
| 67 | + ``` |
| 68 | + |
| 69 | +- Use the `_route` attribute as the transaction name [(#692)](https://github.com/getsentry/sentry-symfony/pull/692) |
| 70 | + |
| 71 | + If you're using named routes, the SDK will default to use this attribute as the transaction name. |
| 72 | + With this change, you should be able to see a full list of your transactions on the performance page, |
| 73 | + instead of `<< unparameterized >>`. |
| 74 | + |
| 75 | + You may need to update your starred transactions as well as your dashboards due to this change. |
7 | 76 |
|
8 | 77 | ## 4.5.0 (2022-11-28)
|
9 | 78 |
|
|
0 commit comments