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

feat!(node): support sentry>=8 #243

Closed
wants to merge 6 commits into from
Closed

Conversation

songkeys
Copy link

@songkeys songkeys commented Jul 12, 2024

Problem

see getsentry/sentry-javascript#11238

Changes

Change the inner implmenetation of sentry integration.

Release info Sub-libraries affected

Bump level

  • Major
  • Minor
  • Patch

Libraries affected

  • All of them
  • posthog-web
  • posthog-node
  • posthog-react-native

Changelog notes

  • Added support for sentry >= 8. No longer supports sentry < 8 as the function signature is changed.

@alyavasilyeva
Copy link

Any updates on this PR? Looking forward to have it deployed 🙂

@songkeys
Copy link
Author

I have currently released it within my scope (@songkeys/[email protected]). I have been using it in production for several weeks. If you require it urgently, feel free to try it now. (The API is not changed.) Otherwise, please subscribe to this PR and stay updated on the latest developments.

@songkeys songkeys requested a review from marandaneto October 14, 2024 09:07
@marandaneto
Copy link
Member

cc @neilkakkar @daibhin in case you wanna test this out before merging.
it will likely break people using sentry <= v7 so ideally a changelog + docs would be ideal

@songkeys
Copy link
Author

It will certainly cause issues for users on v7. We'll need to bump to a major version, or implement different handling logics depending on the detected version of the sentry peer dependency.

@marandaneto
Copy link
Member

It will certainly cause issues for users on v7. We'll need to bump to a major version, or implement different handling logics depending on the detected version of the sentry peer dependency.

that would be even cooler, if its possible to keep the old and the new one, like duplicate the code and let people use either, eg sentry-integration-v7 (sentry-integration is an alias to sentry-integration-v7) and sentry-integration-v8.
If it's possible to detect at runtime and use the right one, we would keep back compatibility and not break people's apps.

@pauldambra
Copy link
Member

yep, we do that in posthog-js (With a very subtle name difference 😅)

https://github.com/PostHog/posthog-js/blob/main/src/extensions/sentry-integration.ts#L135-L145

@songkeys
Copy link
Author

Yeah. I think it's feasible. Give me some time to write this up then. Will do this later when I'm off my work.

@songkeys
Copy link
Author

Just pushed the change. The current API (with 1 method and 1 class exported just like posthog-js) is not ideal. But it's the only way we can do to get people using sentry@8 onboard while not releasing a major version. Please take a look.

@marandaneto marandaneto removed their request for review November 6, 2024 17:22
@marandaneto marandaneto mentioned this pull request Nov 18, 2024
7 tasks
@daibhin daibhin mentioned this pull request Nov 20, 2024
7 tasks
@daibhin
Copy link
Contributor

daibhin commented Nov 20, 2024

Thank you so much for taking this on @songkeys, it was a great basis for the changes we needed to make here. I made my own PR in #311 to better align with what we have in posthog-js (I wanted to avoid making the types changes). I'm going to work on shipping that PR tomorrow which should fix your issues

@daibhin
Copy link
Contributor

daibhin commented Nov 25, 2024

Closing this as #311 is now merged! Thank you again @songkeys for taking this on and providing the original direction

@daibhin daibhin closed this Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants