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

Remove the deprecated sentry tracing extension #3672

Conversation

DoctorJohn
Copy link
Member

@DoctorJohn DoctorJohn commented Oct 13, 2024

Description

After a one-year deprecation period, this PR removes the SentryTracingExtension provided by Strawberry in favor of the official Sentry SDK integration.

We might need to coordinate this with Sentry. It looks like their integration will assume Strawberry is not installed at all when our (deprecated) extensions cannot be imported:

https://github.com/getsentry/sentry-python/blob/1e73ce9fa12ea04250a708c14531d94827501a1d/sentry_sdk/integrations/strawberry.py#L28-L39

I created an upstream PR addressing this: getsentry/sentry-python#3649

Issues Fixed or Closed by This PR

Summary by Sourcery

Remove the deprecated SentryTracingExtension in favor of the official Sentry SDK integration after a one-year deprecation period. Update documentation and remove related tests and files.

Documentation:

  • Update documentation to reflect the removal of the deprecated SentryTracingExtension and guide users to use the official Sentry SDK integration.

Tests:

  • Remove tests related to the deprecated SentryTracingExtension.

Chores:

  • Delete the SentryTracingExtension and its related files from the codebase.

Copy link
Contributor

sourcery-ai bot commented Oct 13, 2024

Reviewer's Guide by Sourcery

This pull request removes the deprecated SentryTracingExtension from Strawberry after a one-year deprecation period. The extension is being replaced by the official Sentry SDK integration. The changes include updating documentation, removing the extension code, and adding migration guides.

Class diagram for the removal of SentryTracingExtension

classDiagram
    class TracingExtensions {
        +ApolloTracingExtension
        +ApolloTracingExtensionSync
        +DatadogTracingExtension
        +DatadogTracingExtensionSync
        +OpenTelemetryExtension
        +OpenTelemetryExtensionSync
    }

    %% Removed classes
    class SentryTracingExtension {
        - Removed
    }
    class SentryTracingExtensionSync {
        - Removed
    }

    note for SentryTracingExtension "This class was removed in favor of the official Sentry SDK integration."
    note for SentryTracingExtensionSync "This class was removed in favor of the official Sentry SDK integration."
Loading

File-Level Changes

Change Details Files
Removal of SentryTracingExtension
  • Removed SentryTracingExtension and SentryTracingExtensionSync from all list
  • Deleted the sentry.py file containing the extension implementation
  • Removed import and getattr logic for Sentry tracing extensions
strawberry/extensions/tracing/__init__.py
strawberry/extensions/tracing/sentry.py
Documentation updates
  • Updated Sentry tracing extension documentation to reflect its removal
  • Added a warning about the extension's removal and link to official Sentry SDK integration
  • Added a new breaking changes document for version 0.247.0
  • Updated the list of breaking changes to include version 0.247.0
docs/extensions/sentry-tracing.md
docs/breaking-changes.md
docs/breaking-changes/0.247.0.md
Release preparation
  • Added RELEASE.md file explaining the change and migration steps
  • Added TWEET.md file for announcing the release on social media
RELEASE.md
TWEET.md
Test removal
  • Deleted the test file for Sentry tracing extension
tests/schema/extensions/test_sentry.py

Assessment against linked issues

Issue Objective Addressed Explanation
#3590 Remove the deprecated strawberry.extensions.tracing.sentry module
#3590 Address the potential import error with sentry-sdk>=3.0.0
#3590 Update documentation to reflect the removal of SentryTracingExtension

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @DoctorJohn - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟡 Documentation: 1 issue found

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

docs/extensions/sentry-tracing.md Show resolved Hide resolved
@botberry
Copy link
Member

botberry commented Oct 13, 2024

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:


After a year-long deprecation period, the SentryTracingExtension has been
removed in favor of the official Sentry SDK integration.

To migrate, remove the SentryTracingExtension from your Strawberry schema and
then follow the
official Sentry SDK integration guide.

Here's the tweet text:

After a year-long deprecation period, the SentryTracingExtension has
been removed in favor of the official Sentry SDK integration.

Checkout out our migration guides if you have not migrated yet.

Thanks to @NucleonJohn for the PR 👏

https://strawberry.rocks/release/(next)

Copy link

codecov bot commented Oct 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.70%. Comparing base (daec236) to head (f69c9c9).
Report is 25 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3672      +/-   ##
==========================================
- Coverage   96.70%   96.70%   -0.01%     
==========================================
  Files         503      500       -3     
  Lines       33457    33400      -57     
  Branches     5618     5601      -17     
==========================================
- Hits        32355    32299      -56     
- Misses        880      881       +1     
+ Partials      222      220       -2     
---- 🚨 Try these New Features:

@DoctorJohn DoctorJohn force-pushed the remove-the-deprecated-sentry-tracing-extension branch from c885868 to e76e43c Compare October 13, 2024 21:37
Copy link

codspeed-hq bot commented Oct 13, 2024

CodSpeed Performance Report

Merging #3672 will not alter performance

Comparing DoctorJohn:remove-the-deprecated-sentry-tracing-extension (f69c9c9) with main (0e2669f)

Summary

✅ 15 untouched benchmarks

Copy link
Member

@bellini666 bellini666 left a comment

Choose a reason for hiding this comment

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

I'm a simple man. I see deprecated code being removed, I approve

@bellini666
Copy link
Member

Btw, any reason to why the validate-tweet check is failing? 🤔

@DoctorJohn
Copy link
Member Author

DoctorJohn commented Oct 21, 2024

I'm a simple man. I see deprecated code being removed, I approve

🤭 fair enough. Still waiting for Sentry to address my PR preparing the Sentry SDK for this change.

Btw, any reason to why the validate-tweet check is failing? 🤔

Looks like the Tweet was considered too long. Only figured that out by running the action locally and removing random words from the TWEET file lol. Edit: CI still fails but the check passes locally, nice.

Copy link
Member

@erikwrede erikwrede left a comment

Choose a reason for hiding this comment

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

Nice!

@DoctorJohn DoctorJohn merged commit 891e576 into strawberry-graphql:main Nov 18, 2024
108 of 110 checks passed
@DoctorJohn DoctorJohn deleted the remove-the-deprecated-sentry-tracing-extension branch November 20, 2024 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

strawberry.extensions.tracing.sentry will be impossible to import with sentry-sdk>=3.0.0
4 participants