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

Sentry integration package #3

Merged
merged 7 commits into from Jan 8, 2020

Conversation

@scefali
Copy link
Collaborator

scefali commented Jan 8, 2020

This PR does the following:

  1. Leverages Create-React-App environment variables through a .env file so the user does not have to modify Javascript to put in their Sentry and FullStory information.
  2. Switches to using the new Sentry-FullStory integration package to connect Sentry errors to FullStory and vice-versa.
scefali added 5 commits Nov 4, 2019
@scefali scefali marked this pull request as ready for review Jan 8, 2020
@@ -13,16 +13,22 @@ The Search Hacker News React + Redux app example in this repo is based on [Robin
You can try out the Search Hacker News app [here](http://fs-redux-sentry.s3-website-us-east-1.amazonaws.com/) or you can clone this repo and `npm install` then `npm run start`. The code is built with [Create React App](https://github.com/facebook/create-react-app).

### Setup
First, copy the file `.env_sample` to `.env`. You will need to fill in those values to set up Sentry and FullStory correctly.

You’ll need a [FullStory account](https://www.fullstory.com/pricing/) and a [Sentry account](https://sentry.io/signup/). Sentry and FullStory should be initialized as soon as possible during your application load up. In Search Hacker News, `initSentry` and `FullStory.init` are called before the [`App`](https://github.com/patrick-fs/fs-react-redux-sentry/blob/master/src/components/App.js) component is loaded in [src/index.js](https://github.com/patrick-fs/fs-react-redux-sentry/blob/master/src/index.js).

This comment has been minimized.

Copy link
@patrick-fs

patrick-fs Jan 8, 2020

Owner

Would it be a good idea to mention the required settings changes in Sentry? https://github.com/getsentry/sentry-fullstory#sentry-settings-change

This comment has been minimized.

Copy link
@scefali

scefali Jan 8, 2020

Author Collaborator

@patrick-fs Good catch, yes


## How FullStory links with Sentry
FullStory’s [`FS.getCurrentSessionURL`](https://developer.fullstory.com/current-session-url) API function generates a session replay URL for a particular moment in time. These URLs are deep links that can be shared with other tools and services. Session URLs are embedded into Sentry events when [extra context](https://docs.sentry.io/enriching-error-data/context/?platform=javascript#extra-context) is configured by providing a value for `event.extra.fullstory` in the [beforeSend](https://docs.sentry.io/error-reporting/configuration/filtering/?platform=javascript#before-send) hook. The [`src/api/error.js`](https://github.com/patrick-fs/fs-react-redux-sentry/blob/master/src/api/error.js) module puts it all together.
FullStory’s [`FS.getCurrentSessionURL`](https://developer.fullstory.com/current-session-url) API function generates a session replay URL for a particular moment in time. These URLs are deep links that can be shared with other tools and services. Session URLs are embedded into Sentry events when [extra context](https://docs.sentry.io/enriching-error-data/context/?platform=javascript#extra-context) is configured by providing a value for `event.contexts.fullstory` in the [beforeSend](https://docs.sentry.io/error-reporting/configuration/filtering/?platform=javascript#before-send) hook. The [Sentry-FullStory](https://github.com/getsentry/sentry-fullstory) integration package puts it all together.

This comment has been minimized.

Copy link
@patrick-fs

patrick-fs Jan 8, 2020

Owner

How about adding in a mention of FS.event integration?

Original copy for reference:

We’re also using the FullStory custom events API to send error data into FullStory. This lets us search for all users that experienced errors on the Search Hacker News app.

This comment has been minimized.

Copy link
@scefali

scefali Jan 8, 2020

Author Collaborator

@patrick-fs I removed that because that part is now hidden from the developer since it's contained in the package. But I will happily add it back.

This comment has been minimized.

Copy link
@patrick-fs

patrick-fs Jan 8, 2020

Owner

That's fine. The Integration actually abstracts all the things so maybe we update the sentry-fullstory README with integration details and simply have a statement like "if you want to know more about how the integration works, go to sentry-fullstory"

scefali added 2 commits Jan 8, 2020
@patrick-fs patrick-fs merged commit 07755b2 into patrick-fs:master Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.