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

Loading Fullstory through Segment not supported #30

Closed
s5no5t opened this issue Mar 16, 2020 · 7 comments · Fixed by #60
Closed

Loading Fullstory through Segment not supported #30

s5no5t opened this issue Mar 16, 2020 · 7 comments · Fixed by #60

Comments

@s5no5t
Copy link

s5no5t commented Mar 16, 2020

I'm using Segment to load and configure Fullstory (see https://help.fullstory.com/hc/en-us/articles/360020828993-Segment). When I try to use this integration, I get a compile error originating from

import * as FullStory from '@fullstory/browser';

This doesn't compile because I don't have @fullstory/browser as a dependency.

Is there a way to use this integration in the above szenario? If it involves having @fullstory/browser as a dependency, can I avoid loading that twice at runtime?

Thanks a lot!

@scefali
Copy link
Contributor

scefali commented Mar 17, 2020

@jugglingthebits Thanks for this question, it's a good one. My follow up question to you is how are you initializing Sentry? Is that coming from Segment as well?

@s5no5t
Copy link
Author

s5no5t commented Mar 18, 2020

We are initializing Sentry by loading the SDK directly. I only learned the other day that loading Sentry through Segment is even possible, as the decision to use Sentry predated the one to use Segment.
I do think though that not going through Segment makes some sense, as Sentry has a different focus (error handling VS analytics), so IMO it would be nice to not go through Segment here.
Just my current thinking though, I'm interested in how others think of this.

@chengyin
Copy link

chengyin commented May 6, 2020

We have a similar setup, Sentry is loaded in our own code and FullStory through Segment. We do wrap Sentry with our own logging logic; For FullStory we don't add extra configurations.

In this setup, Fullstory is available as window.FS. A suggestion would be to provide a way to pass in the Fullstory SDK instead of always importing it in this library.

@s5no5t
Copy link
Author

s5no5t commented May 6, 2020

@chengyin I learned that there is a way to hook up Fullstory to Sentry "manually". You can find it here https://gist.github.com/patrick-fs/8066c2a0c97aec6cca6d355a55a52506

@scefali
Copy link
Contributor

scefali commented Jun 8, 2020

@chengyin Sorry for not responding earlier. As @jugglingthebits said, you can hook it up manually by using the window variable like that. There is actually an earlier version of this library that did not use the NPM package you probably could use (https://github.com/getsentry/sentry-fullstory/tree/ad2c9a3115141f3ec05a449183697fc2238ab11d/src). I don't think we are going to officially support doing it this way anymore, but you could vendorize the package at that commit and get it to work easily enough I think.

@jacque006
Copy link

Just encountered this issue trying to link up Sentry and FullStory. We also load FullStory via Segment and Sentry by itself.

Although I appreciate the workarounds posted by @jugglingthebits & @scefali , I would be hesitant to use either in production as changes in this lib, FullStory, and/or Sentry could break the integration with future updates (brittle). Would ideally load from window itself or via passed in window instance (per @chengyin 's suggestion). Although some of the compatibility issues from the workarounds would still be possible, I'd at least have confidence that I could pull in fixes from those dependencies (including this lib) to move forward vs maintaining a fork/npm dist or spend time modifying a custom script we maintain and no one else benefits from fixes to.

yordis added a commit to yordis/sentry-fullstory that referenced this issue Oct 20, 2021
yordis added a commit to yordis/sentry-fullstory that referenced this issue Dec 12, 2021
yordis added a commit to yordis/sentry-fullstory that referenced this issue Dec 12, 2021
yordis added a commit to yordis/sentry-fullstory that referenced this issue Dec 12, 2021
yordis added a commit to yordis/sentry-fullstory that referenced this issue Jan 20, 2022
@Hugodby
Copy link

Hugodby commented Aug 3, 2022

Hello, while there has been progress on this in #60 it doesn't seem to be working yet. Currently the library still depends on @fullstory/browser so it isn't possible to use only the Fullstory SDK loaded from segment.

I think the issue should be re-opened. This integration would really help my team.

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 a pull request may close this issue.

5 participants