Skip to content

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

Closed

Description

@Lms24

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
- [ ] #386
- [ ] https://github.com/getsentry/spotlight/pull/402
- [x] verify with playground/demo
### For Stable release
- [ ] https://github.com/getsentry/spotlight/pull/406
- [ ] https://github.com/getsentry/spotlight/pull/412
- [ ] https://github.com/getsentry/spotlight/pull/413
- [ ] https://github.com/getsentry/spotlight/pull/414
- [x] Cut release

Activity

  1. self-assigned this
    on Mar 28, 2024
  2. Lms24 commented on Apr 2, 2024

    @Lms24
    MemberAuthor

    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.

  3. Lms24 commented on Apr 3, 2024

    @Lms24
    MemberAuthor
  4. gajus commented on May 8, 2024

    @gajus

    @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

  5. Lms24 commented on May 10, 2024

    @Lms24
    MemberAuthor

    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.

  6. Shubhdeep12 commented on May 10, 2024

    @Shubhdeep12
    Contributor

    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.

  7. gajus commented on May 10, 2024

    @gajus

    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.

  8. bmulholland commented on May 22, 2024

    @bmulholland
    Contributor

    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
    
  9. Shubhdeep12 commented on May 22, 2024

    @Shubhdeep12
    Contributor

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

  10. bmulholland commented on May 23, 2024

    @bmulholland
    Contributor

    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.

  11. added this to the 2.0 milestone on May 31, 2024
  12. changed the title [-]Make Spotlight compatible with Sentry SDK v8[/-] [+][Spotlight 2.0.0] Make Spotlight compatible with Sentry SDK v8[/+] on Jun 13, 2024
  13. Lms24 commented on Jun 13, 2024

    @Lms24
    MemberAuthor

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Package: OverlayType: Enhancement

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions