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

Add LogRocket integration #52

Closed
peterjaap opened this issue Jun 5, 2020 · 5 comments
Closed

Add LogRocket integration #52

peterjaap opened this issue Jun 5, 2020 · 5 comments

Comments

@peterjaap
Copy link
Contributor

It would be great to have LogRocket integration in the extension, see https://blog.logrocket.com/extending-sentry-with-logrocket-52e2f5b67d5a/

Two bits of code should be added;

Right after :

<script src="https://cdn.lr-ingest.io/LogRocket.min.js" crossorigin="anonymous"></script>
<script>window.LogRocket && window.LogRocket.init('INITKEY_HERE');</script>

Before :

LogRocket.getSessionURL(sessionURL => {
  Sentry.configureScope(scope => {
    scope.setExtra("sessionURL", sessionURL);
  });
});

We'll need to add two configuration opties; Enable/disable LogRocket integration, and an input field for the LogRocket init key (which you'll get when you create a project in LogRocket).

@peterjaap
Copy link
Contributor Author

Extra bonus feature; identify logged-in users;

Use LogRocket.identify to distinguish and describe your users. This will allow you to search for specific user sessions by name, email and id. It will make a major difference in your happiness!

// This is an example script - don't forget to change it!
LogRocket.identify('THE_USER_ID_IN_YOUR_APP', {
  name: 'James Morrison',
  email: 'jamesmorrison@example.com',

  // Add your own custom user variables here, ie:
  subscriptionType: 'pro'
});

Reference

@pimruiter
Copy link
Member

Hi Peter Jaap,

Thanks for the requested feature! Looks like a nice addition to the Sentry extension. This will be part of the next update, which will be within the next few weeks.

indykoning added a commit that referenced this issue Jun 29, 2020
#52 Add LogRocket and #53 improve error message
@indykoning
Copy link
Member

Hi Peter Jaap,

This feature is now available in the latest (2.3.0) release!
Thank you for the suggestion! 😄

@peterjaap
Copy link
Contributor Author

@indykoning that is seriously fast, thanks!!

@oneserv-heuser
Copy link
Contributor

oneserv-heuser commented Jan 6, 2021

@indykoning Just stumbled upon this nice feature and tried to make it work in the adminhtml scope, but it doesn't seem to work. After going through the code in the PR it looks like as it is not supported. Would it be possible to add support for js error tracking with sentry and logrocket in the adminhtml scope (with user tracking)? That would be really nice!

Opened an issue: #67

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

No branches or pull requests

4 participants