Skip to content

Releases: getsentry/sentry-symfony

5.0.0

09 Apr 06:05
Compare
Choose a tag to compare

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-curl installed to use the SDK.

  • The IgnoreErrorsIntegration integration was removed. Use the ignore_exceptions option instead.
    Previously, both Symfony\Component\ErrorHandler\Error\FatalError and Symfony\Component\Debug\Exception\FatalErrorException were 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_a check 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', 'jane.doe@example.com', null, ['role' => User::admin()]);

    Metrics are automatically sent to Sentry at the end of a request, hooking into Symfony's kernel.terminate event.

  • 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 compression

    To use a different client, you may use the http_client option.
    To use a different transport, you may use the transport option. A custom transport must implement the TransportInterface.
    If you use the transport option, the http_client option has no effect.

Misc

  • The abandoned package php-http/message-factory was removed.

4.14.0

26 Feb 09:30
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.14.0.

Features

  • Add support for doctrine/dbal: ^4.0 (#811)

Bug Fixes

  • Fix overwritting DbalTracingPass (#808)
  • Use AbstractDriverMiddleware (#810)

4.13.2

11 Jan 14:57
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.13.2.

Bug Fixes

  • Fix detection of the installed version of symfony/http-client (#797)

4.13.1

06 Dec 16:29
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.13.1.

Bug Fixes

  • Fix the HTTP client decoration when no http_client service is registered (#792)

4.13.0

05 Dec 13:17
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.13.0.

Features

  • Add support for Symfony 7 (#761)

Bug Fixes

  • Fix the decoration of the HTTP client when tracing is enabled (#786)

4.12.0

30 Oct 19:37
Compare
Choose a tag to compare

Features

  • Add support for symfony/psr-http-message-bridge: ^6.4 (#750)
  • Report individual exceptions from DelayedMessageHandlingException (#760)

4.11.0

07 Sep 14:44
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.11.0.

Bug Fixes

  • Silence TokenInterface::isAuthenticated deprecation in LoginListener (#755)

Misc

  • Prefer the SENTRY_RELEASE environment variable over the package root version (#753)

4.10.0

01 Aug 14:01
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.10.0.

Features

  • Tracing without Performance (#742)

    The SDK will now continue a trace from incoming HTTP requests, even if performance is not enabled.
    To continue a trace outward, you may attach the Sentry tracing headers to any HTTP client request.
    You can fetch the required header values by calling \Sentry\getBaggage() and \Sentry\getTraceparent().

  • Add ignore_exceptions and ignore_transactions options (#724)

Misc

  • Improve setting logged-in users on the scope (#720)
  • Move DB span tags to span data (#743)
  • Set the span status when tracing an HTTP client request (#748)

4.9.2

19 Jun 12:05
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.9.2.

Bug Fixes

  • We decided to revert two previous PRs that aimed to remove deprecation warnings during test runs (#736)

    • Revert: Add a new Doctrine DBAL tracing driver that does not implement the deprecated VersionAwarePlatformDriver (#723)
    • Revert: Fix a regression in TracingDriverForV32 by adding VersionAwarePlatformDriver::createDatabasePlatformForVersion (#731)

We are sorry for the inconvenience caused by these changes.

4.9.1

19 Jun 08:56
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.9.1.

Bug Fixes

  • Fix a regression in TracingDriverForV32 by adding VersionAwarePlatformDriver::createDatabasePlatformForVersion (#731)