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

[Spotlight 2.0.0] Make Spotlight compatible with Sentry SDK v8 #387

Closed
8 tasks done
Lms24 opened this issue Mar 28, 2024 · 10 comments
Closed
8 tasks done

[Spotlight 2.0.0] Make Spotlight compatible with Sentry SDK v8 #387

Lms24 opened this issue Mar 28, 2024 · 10 comments
Assignees
Labels
Milestone

Comments

@Lms24
Copy link
Member

Lms24 commented Mar 28, 2024

v8 of the Sentry SDKs is slowly becoming stable, so we need to ensure that Spotlight works correctly with the SDK. Primarily, this will only affect the overlay where we interact with the Sentry SDK in the Sentry spotlight integration to add a sentry integration for spotlight. This should be fairly straight forward but it's unfortunately subtly breaking.

Therefore, we'll cut a new major version for Spotlight, so that:

  • for SentrySDK@7 use Spotlight@1 (but we won't support this officially any longer)
  • for SentrySDK@8 or SentrySDK@>=7.99.0 use Spotlight@2

For Alpha Release

Preview Give feedback
  1. Lms24
  2. Lms24

For Stable release

Preview Give feedback
  1. Lms24
  2. Lms24
  3. Lms24
  4. Lms24
@Lms24
Copy link
Member Author

Lms24 commented Apr 2, 2024

Update: As written in #386 (comment) we decided to make v7 also compativle with v7.99.0 or greater; meaning there are fairly recent v7 versions with which Spotlight@2 can still be used.

@Lms24
Copy link
Member Author

Lms24 commented Apr 3, 2024

first alpha released today to NPM: https://www.npmjs.com/package/@spotlightjs/spotlight/v/2.0.0-alpha.1

@gajus
Copy link

gajus commented May 8, 2024

@Lms24 It looks like it works to capture some traces/spans, but not all.

Recorded a brief video: https://www.loom.com/share/6bc3596a831647809316e5d93c5c5fae

Using 2.0.0-alpha.1 and rc2

@Lms24
Copy link
Member Author

Lms24 commented May 10, 2024

Hey @gajus thanks for the video! If there are missing child spans of another span, I think we need to check first if this isn't rather an SDK issue than a Spotlight issue. Does the same trace look more complete in the Sentry UI?

Also small heads-up: I'm seeing http.client transactions in this trace. These shouldn't be here in this form and will be fixed in rc.3 (getsentry/sentry-javascript#11974). Fwiw, this is a larger topic; but just to clear up confusion in case you're comparing what you're seeing now vs. when you were still using v7 SDKs.

@Shubhdeep12
Copy link
Collaborator

Shubhdeep12 commented May 10, 2024

Yeah @gajus can you please try Spotlight v1.2.17 and Sentry v7 sdk

if the issue still persists, then it can be a spotlight issue(it would be great if you could share a minimal reproduction example in this case), otherwise, as @Lms24 said above, it can be an issue because of some inconsistency with parent spans in sentry v8.

@gajus
Copy link

gajus commented May 10, 2024

I am just realizing that this is most likely an ESM issue.

In production we use --loader=import-in-the-middle/hook.mjs.

In development, we do not. That's likely the cause here.

@bmulholland
Copy link

bmulholland commented May 22, 2024

I just spent a couple hours debugging my Sentry 8 upgrade. It wasn't clear that spotlight was the issue: the exception happens inside Sentry 8. If Spotlight doesn't support a Sentry version, could it flag that somehow? Via package manager or by detecting it at runtime? That would have saved me time :)

Here's the Sentry stacktrace I got, maybe it will help others via Google:

VM14563 chunk-345U675O.js:4394 Uncaught (in promise) TypeError: a is not a function
    at gw.setupOnce (VM14563 chunk-345U675O.js:4394:5)
    at setupIntegration (VM14524 @sentry_vue.js:4818:17)
    at BrowserClient.addIntegration (VM14524 @sentry_vue.js:5037:5)
    at J3 (VM14563 chunk-345U675O.js:18078:7)
    at Object.setup (VM14563 chunk-345U675O.js:17993:7)
    at Ev (VM14563 chunk-345U675O.js:3922:27)
    at Module.q4 (VM14563 chunk-345U675O.js:36761:18)
    at useSentry (VM14536 sentry.ts:30:15)
    at VM14507 main.ts:19:1

@Shubhdeep12
Copy link
Collaborator

Hi @bmulholland just want to confirm - you were using Spotlight v1.xx.x with Sentry v8. right?

@bmulholland
Copy link

Yep, latest tag. After hunting it down by disabling parts of my Sentry config until my app worked again, I was led here, found this PR, and tried the alpha. That worked.

@Lms24 Lms24 added this to the 2.0 milestone May 31, 2024
@Lms24 Lms24 changed the title Make Spotlight compatible with Sentry SDK v8 [Spotlight 2.0.0] Make Spotlight compatible with Sentry SDK v8 Jun 13, 2024
@Lms24
Copy link
Member Author

Lms24 commented Jun 13, 2024

Spotlight 2.x (and Spotlight Electron 1.x) was relased today! Closing this issue as now, Spotlight is compatible with v8 JS SDKs.

Please let us know if you encounter any issues when updating and open a new issue. Thanks!

@Lms24 Lms24 closed this as completed Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants