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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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:

🆕 Release (next) is out! Thanks to @NucleonJohn for the PR 👏

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

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

👇 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 97.02%. Comparing base (daec236) to head (e76e43c).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3672      +/-   ##
==========================================
+ Coverage   96.70%   97.02%   +0.31%     
==========================================
  Files         503      501       -2     
  Lines       33457    33287     -170     
  Branches     5618     5584      -34     
==========================================
- Hits        32355    32296      -59     
+ Misses        880      788      -92     
+ Partials      222      203      -19     

@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 (e76e43c) with main (56172dc)

Summary

✅ 15 untouched benchmarks

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
2 participants