Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency sentry/sentry-symfony to v5 #4901

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 9, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
sentry/sentry-symfony (source) 4.14.0 -> 5.0.0 age adoption passing confidence

Release Notes

getsentry/sentry-symfony (sentry/sentry-symfony)

v5.0.0

Compare Source

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.

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.

@renovate renovate bot added the renovate label Apr 9, 2024
@renovate renovate bot force-pushed the renovate/sentry-sentry-symfony-5.x branch from dc5ff67 to e03625f Compare April 11, 2024 22:16
@renovate renovate bot changed the title fix(deps): update dependency sentry/sentry-symfony to v5 Update dependency sentry/sentry-symfony to v5 Apr 13, 2024
@renovate renovate bot force-pushed the renovate/sentry-sentry-symfony-5.x branch from e03625f to 6d90935 Compare April 14, 2024 11:08
@BacLuc BacLuc added the deploy! Creates a feature branch deployment for this PR label Apr 14, 2024
Copy link
Contributor Author

renovate bot commented Apr 14, 2024

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.

@renovate renovate bot changed the title Update dependency sentry/sentry-symfony to v5 Update dependency sentry/sentry-symfony to v5 - abandoned Apr 14, 2024
Copy link
Contributor Author

renovate bot commented Apr 14, 2024

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.

@@ -3,8 +3,9 @@ sentry:
register_error_listener: false # Disables the ErrorListener to avoid duplicated log in sentry
options:
environment: '%env(SENTRY_ENVIRONMENT)%'
integrations:
- 'Sentry\Integration\IgnoreErrorsIntegration'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used IgnoreErrorsIntegration before to filter out 4xx error (see further below in this file). We should add these exceptions again.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

integrations:
- 'Sentry\Integration\IgnoreErrorsIntegration'
ignore_exceptions:
- 'Symfony\Component\ErrorHandler\Error\FatalError'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to understand, why these should be ignored. To me it doesn't seem like an error that should be ignored. But there might be a good reason for it (maybe related to getsentry/sentry-symfony#63?).

Copy link
Contributor

@BacLuc BacLuc May 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the changelog:

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:
https://github.com/getsentry/sentry-symfony/blob/master/UPGRADE-5.0.md

I am just keeping it the way it was. We can change it in another PR.

@BacLuc BacLuc force-pushed the renovate/sentry-sentry-symfony-5.x branch from 9509819 to a2aacb5 Compare May 12, 2024 10:18
@BacLuc BacLuc changed the title Update dependency sentry/sentry-symfony to v5 - abandoned Update dependency sentry/sentry-symfony to v5 May 12, 2024
Copy link

github-actions bot commented May 12, 2024

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.

@BacLuc BacLuc removed the deploy! Creates a feature branch deployment for this PR label May 12, 2024
@BacLuc BacLuc added Meeting Discuss Am nächsten Core-Meeting besprechen and removed Meeting Discuss Am nächsten Core-Meeting besprechen labels Jun 1, 2024
@BacLuc BacLuc requested a review from a team July 9, 2024 19:32
@BacLuc BacLuc force-pushed the renovate/sentry-sentry-symfony-5.x branch from a2aacb5 to 2b4260b Compare July 9, 2024 21:22
@BacLuc BacLuc added the deploy! Creates a feature branch deployment for this PR label Jul 9, 2024
@BacLuc
Copy link
Contributor

BacLuc commented Jul 9, 2024

@BacLuc BacLuc force-pushed the renovate/sentry-sentry-symfony-5.x branch from 2b4260b to f5ebc07 Compare July 15, 2024 13:13
@BacLuc BacLuc enabled auto-merge July 15, 2024 13:14
@BacLuc BacLuc added this pull request to the merge queue Jul 15, 2024
Merged via the queue into devel with commit f17d81a Jul 15, 2024
59 checks passed
@BacLuc BacLuc deleted the renovate/sentry-sentry-symfony-5.x branch July 15, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy! Creates a feature branch deployment for this PR renovate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants