The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.8.0.
-
Set cache keys as span descriptions (#677)
To better identify the source of a cache operation, we now set the cache key as the description of
cache
op spans.
- Add direct dependency for
guzzlehttp/psr7
(#708) - Drop
kernel.build_dir
param below Symfony 5.2 (#711)
The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.7.0.
-
Add
profiles_sample_rate
config option (#698)With this new config option, you can now use our new profiling feature in Symfony as well. Please consult https://github.com/getsentry/sentry-php/releases/3.15.0 for setup instructions.
The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.6.0. This release contains a colorful bouquet of new features.
-
Report exceptions to Sentry as unhandled by default (#674)
All unhandled exceptions will now be marked as
handled: false
. You can query for such events on the issues list page, by searching forerror.handled:false
. -
Exceptions from messages which will be retried are sent to Sentry as handled (#674)
All unhandled exceptions happening on the message bus will now be unpacked and reported individually. The
WorkerMessageFailedEvent::willRetry
property is used to determine thehandled
value of the event sent to Sentry. -
Add
register_error_handler
config option (#687)With this option, you can disable the global error and exception handlers of the base PHP SDK. If disabled, only events logged by Monolog will be sent to Sentry.
sentry: dsn: '%env(SENTRY_DSN)%' register_error_listener: false register_error_handler: false monolog: handlers: sentry: type: sentry level: !php/const Monolog\Logger::ERROR hub_id: Sentry\State\HubInterface
-
Add
before_send_transaction
(#691)Similar to
before_send
, you can now apply additional logic fortransaction
events. You can mutate thetransaction
event before it is sent to Sentry. If your callback returnsnull
, the event is dropped.sentry: options: before_send_transaction: 'sentry.callback.before_send_transaction' services: sentry.callback.before_send_transaction: class: 'App\Service\Sentry' factory: [ '@App\Service\Sentry', 'getBeforeSendTransaction' ]
<?php namespace App\Service; class Sentry { public function getBeforeSendTransaction(): callable { return function (\Sentry\Event $event): ?\Sentry\Event { return $event; }; } }
-
Use the
_route
attribute as the transaction name (#692)If you're using named routes, the SDK will default to use this attribute as the transaction name. With this change, you should be able to see a full list of your transactions on the performance page, instead of
<< unparameterized >>
.You may need to update your starred transactions as well as your dashboards due to this change.
- Sanatize HTTP client spans (#690)
- Symfony version 3.4 is no longer supported
- Drop Symfony support below 4.4 (#643)
- feat: Add support for tracing of Symfony HTTP client requests (#606)
- feat: Add support for HTTP client baggage propagation (#663)
- ref: Add proper HTTP client span descriptions (#680)
- feat: Support logging the impersonator user, if any (#647)
- ref: Use a constant for the SDK version (#662)
- feat: Add support for Dynamic Sampling (#665)
- fix: Update span ops (#655)
- Fix compatibility issue with Symfony
>= 6.1.0
(#635) - Add
TracingDriverConnectionInterface::getNativeConnection()
method to get the original driver connection (#597) - Add
options.http_timeout
andoptions.http_connect_timeout
configuration options (#593)
- Fix compatibility issue with Twig >= 3.4.0 (#628)
- Fix deprecation notice thrown when instrumenting the
PDOStatement::bindParam()
method and passing$length = null
on DBAL2.x
(#613)
- Fix compatibility issue with Doctrine Bundle
>= 2.6.0
(#608)
- Fix deprecation notice thrown when instrumenting the
PDOStatement::bindParam()
method and passing$length = null
(#586)
- Add support for
symfony/cache-contracts
package version3.x
(#588)
- Add support for Symfony 6 (#566)
- Fix fatal errors logged twice on Symfony
3.4
(#570)
- Add return typehints to the methods of the
SentryExtension
class to prepare for Symfony 6 (#563) - Fix setting the IP address on the user context when it's not available (#565)
- Fix wrong method existence check in
TracingDriverConnection::errorCode()
(#568) - Fix decoration of the Doctrine DBAL connection when it implemented the
ServerInfoAwareConnection
interface (#567)
- Fix: Test if
TracingStatement
exists before attempting to create the class alias, otherwise it breaks when opcache is enabled. (#552) - Fix: Pass logger from
logger
config option toTransportFactory
(#555) - Improve the compatibility layer with Doctrine DBAL to avoid deprecations notices (#553)
- Fix missing instrumentation of the
Statement::execute()
method of Doctrine DBAL (#548)
- Fix return type for
TracingDriver::getDatabase()
method (#541) - Avoid throwing exception from the
TraceableCacheAdapterTrait::prune()
andTraceableCacheAdapterTrait::reset()
methods when the decorated adapter does not implement the respective interfaces (#543)
- Log the bus name, receiver name and message class name as event tags when using Symfony Messenger (#492)
- Make the transport factory configurable in the bundle's config (#504)
- Add the
sentry_trace_meta()
Twig function to print thesentry-trace
HTML meta tag (#510) - Make the list of commands for which distributed tracing is active configurable (#515)
- Introduce
TracingDriverConnection::getWrappedConnection()
(#536) - Add the
logger
config option to ease setting a PSR-3 logger to debug the SDK (#538) - Bump requirement for DBAL tracing to
^2.13|^3
; simplify the DBAL tracing feature (#527)
- Fix decoration of cache adapters inheriting parent service (#525)
- Fix extraction of the username of the logged-in user in Symfony
5.3
(#518)
- Fix missing require of the
symfony/cache-contracts
package (#506)
- Fix the check of the existence of the
CacheItem
class while attempting to enable the cache instrumentation (#501)
- Fix the conditions to automatically enable the cache instrumentation when possible (#487)
- Fix deprecations triggered by Symfony
5.3
(#489) - Fix fatal error when the
SERVER_PROTOCOL
header is missing (#495)
- Avoid failures when the
RequestFetcher
fails to translate theRequest
(#472) - Add support for distributed tracing of Symfony request events (#423)
- Add support for distributed tracing of Twig template rendering (#430)
- Add support for distributed tracing of SQL queries while using Doctrine DBAL (#426)
- Add support for distributed tracing when running a console command (#455)
- Add support for distributed tracing of cache pools (#477)
- Add the full CLI command string to the extra context (#352)
- Deprecate the
Sentry\SentryBundle\EventListener\ConsoleCommandListener
class in favor of its parent classSentry\SentryBundle\EventListener\ConsoleListener
(#429) - Lower the required version of
symfony/psr-http-message-bridge
to allow installing it on a project that uses Symfony3.4.x
components only (#480)
- Fix regression from #454 for
null
value on DSN not disabling Sentry (#457)
- Add
kernel.project_dir
toprefixes
default value to trim paths to the project root (#434) - Fix
null
,false
or empty value not disabling Sentry (#454)
- Add missing
capture-soft-fails
option to the XSD schema for the XML config (#417) - Fix regression that send PII even when the
send_default_pii
option is off (#425) - Fix capture of console errors when the
register_error_listener
option is disabled (#427)
Breaking Change: This version uses the envelope endpoint. If you are
using an on-premise installation it requires Sentry version >= v20.6.0
to work. If you are using
sentry.io nothing will change and no action is needed.
- Enable back all error listeners from base SDK integration (#322)
- Add
options.traces_sampler
andoptions.traces_sample_rate
configuration options (#385) - [BC BREAK] Remove the
options.project_root
configuration option. Instead of setting it, use a combination ofoptions.in_app_include
andoptions.in_app_exclude
(#385) - [BC BREAK] Remove the
options.excluded_exceptions
configuration option. Instead of setting it, configure theIgnoreErrorsIntegration
integration (#385) - [BC BREAK] Refactorize the
ConsoleCommandListener
,ErrorListener
,RequestListener
andSubRequestListener
event listeners (#387) - Registered the CLI commands as lazy services (#373)
- [BC BREAK] Refactorize the configuration tree and the definitions of some container services (#401)
- Support the XML format for the bundle configuration (#401)
- PHP 8 support (#399, thanks to @Yozhef)
- Retrieve the request from the
RequestStack
when using theRequestIntegration
integration (#361) - Reorganize the folder structure and change CS standard (#405)
- [BC BREAK] Remove the
monolog
configuration option. Instead, register the service manually (#406) - [BC BREAK] Remove the
listener_priorities
configuration option. Instead, use a compiler pass to change the priority of the listeners (#407) - Prefer usage of the existing
Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface
service for theRequestFetcher
class (#409) - [BC BREAK] Change the priorities of the
RequestListener
andSubRequestListener
listeners (#414)
- Refactors and fixes class aliases for more robustness (#315 #359, thanks to @guilliamxavier)
- Use
jean85/pretty-package-versions
^1.5
to leverage the newgetRootPackageVersion
method (c8799ac) - Fix support for PHP preloading (#354, thanks to @annuh)
- Fix
capture_soft_fails: false
option for the Messenger (#353)
- Capture events using the
Hub
in theMessengerListener
to avoid loosingScope
data (#339, thanks to @sh41) - Capture multiple events if multiple exceptions are generated in a Messenger Worker context (#340, thanks to @emarref)
- Capture and flush messages in a Messenger Worker context (#326, thanks to @emarref)
- Support Composer 2 (#335)
- Avoid issues with dependency lower bound, fix #331 (#335)
- Improve
release
option default value (#325)
- Change default of
in_app_include
to empty, due to getsentry/sentry-php#958 (#311) - Improve class_alias robustness (#315)
- Remove space from classname used with
class_alias
(#313)
- Fix issue due to usage of
class_alias
to fix deprecations, which could break BC layers of third party packages (#309, thanks to @scheb)
- Add support for
sentry/sentry
2.3 (#298) - Drop support for
sentry/sentry
< 2.3 (#298) - Add support to
in_app_include
client option (#298) - Remap
excluded_exceptions
option to use the newIgnoreErrorsIntegration
(#298)
- Fix issue with exception listener under Symfony 4.3 (#301)
- Fixed Release
- Add support for Symfony 5.0 (#266, thanks to @Big-Shark)
- Drop support for Symfony < 3.4 (#277)
- Add default value for the
release
option, using the detected root package version (#291 #292, thanks to @Ocramius)
- Fix handling of command with no name on
ConsoleListener
(#261) - Remove check by AuthorizationChecker in
RequestListener
(#264) - Fixed undefined variable in
RequestListener
(#263)
- Add forward compatibility with Symfony 5 (#235, thanks to @garak)
- Fix Hub initialization for
ErrorListener
(#243, thanks to @teohhanhui) - Fix compatibility with sentry/sentry 2.2+ (#244)
- Add support for
class_serializers
option (#245) - Add support for
max_request_body_size
option (#249) - Add option to disable the error listener completely (#247, thanks to @HypeMC)
- Add options to register the Monolog Handler (#247, thanks to @HypeMC)
- Add support for Symfony 2.8 (#233, thanks to @nocive)
- Fix handling of ESI requests (#213, thanks to @franmomu)
- Add the
sentry:test
command, to test if the Sentry SDK is functioning properly.
- Disable Sentry's ErrorHandler, and report all errors using Symfony's events (#204)
The 3.0 major release has multiple breaking changes. The most notable one is the upgrade to the 2.0 base SDK client. Refer to the UPGRADE-3.0.md document for a detailed explanation.