Skip to content

Conversation

@thomasleduc
Copy link
Contributor

@thomasleduc thomasleduc commented Oct 2, 2025

Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of
the pull request.

Description

Update sentry plugin to be used with sentry v10 (before sentry v8).

Since Sentry SDK v10, you don’t need to import '@sentry/tracing' anymore.

Remove the imports in documentation and test, already embedded in sentry/node or sentry/nextjs.

sentry/types

Remove sentry/types (deprecated) and install sentry/core where the types can be found now.

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • This change requires a documentation update

There is a breaking change since sentry is in peerDependencies and need to be updated to 10.

How Has This Been Tested?

The tests didn't changed and cover the same amount of code.

Test Environment:

  • OS: Mac 15.6.1
  • @envelop/sentry:
  • NodeJS: v22.13.1

Checklist:

  • I have followed the
    CONTRIBUTING doc and the
    style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Further comments

There is a discussion to address on whether we do a sentry/node | sentry/nextjs version of envelop/sentry plugin or not.
Now that sentry is embedding a lot in those imports, users may want to have only sentry/nextjs or sentry/node that do basically the same thing.
I choose to keep sentry/node for this plugin as it was before.

@thomasleduc thomasleduc marked this pull request as draft October 2, 2025 15:21
@ardatan
Copy link
Member

ardatan commented Oct 2, 2025

Thanks for the PR! Could you also add a changeset?

"peerDependencies": {
"@envelop/core": "workspace:^",
"@sentry/node": "^8.0.0",
"@sentry/core": "^10.17.0",
Copy link
Member

Choose a reason for hiding this comment

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

I think the code is still compatible with v8 and v9 right? So we can keep v8 and v9 in peerDependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know we removed global import of sentry/tracing which is now embedded in sentry/node. the type also are not compatible even if runtimewise it's not a problem.
Not sure we can consider it as compatible.

Copy link
Member

Choose a reason for hiding this comment

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

If so, let's make it a major release then because it removes the compatibility of older Sentry versions. chore(deps): sentry: Update sentry to ^10.17 by thomasleduc · Pull Request #2715 · graphql-hive/envelop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes you're right.
I have another thing to check. A parameter not tested yet in the plugin and that I don't use seems broken.

Copy link
Contributor Author

@thomasleduc thomasleduc Oct 6, 2025

Choose a reason for hiding this comment

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

TraceparentData is the old way to use Sentry.
Should I kept the original option name (tranceparentData) for minimal change, even if I change the shape for
something like { sentryTrace?: string; baggage?: string } instead of the old TraceparentData ?

@ardatan ardatan marked this pull request as ready for review October 6, 2025 09:55
@ardatan ardatan changed the title chore(deps): sentry: Update sentry to ^10.17 chore(deps): support sentry v10 Oct 6, 2025
@ardatan ardatan force-pushed the fix/sentry-v10-doc branch from a814729 to 8dce695 Compare October 6, 2025 09:56
@ardatan ardatan merged commit 262e761 into graphql-hive:main Oct 6, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants