If FullStory is enabled for the current session, this integration will
associate the FullStory session URL with any errors sent to Sentry.
Additionally, it will add an event to the FullStory session indicating
there was a Sentry error, and providing a URL for easy access. If
FullStory is not enabled for the current session, this integration is not
enabled.
closes DE-996
flag=none
test plan:
- ensure that the appropriate values are provided in config/sentry.yml
- enable FullStory for a session by overriding methods in FullStoryHelper
- cause an unhandled exception to occur on the frontend
- verify that the event in Sentry contains FullStory context with a link
to the session URL
- verify that the FullStory session contains the Sentry Error event, with
a link to the Sentry event
- disable FullStory, and verify that frontend exception monitoring with
Sentry works as normal
Change-Id: I782930ecbea6f3e4afb23045d4087fe4c252875d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/283151
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
This commit adds Sentry support to the frontend, so that exceptions on
the browser side will be reported to Sentry. It requires that
`frontend_dsn` be defined in `config/sentry.yml` and that the
`sentry_disabled` Setting be `false` or unset.
Future commits may add support for frontend APM, Fullstory linking, and
source map uploading.
Settings included in this commit:
- `sentry_frontend_errors_sample_rate`, which controls the sample rate of
error collection (defaults to 0.0, meaning no errors are collected)
flag=none
closes DE-967
test plan:
- confirm that there are no issues when `frontend_dsn` is not set
- confirm that setting `frontend_dsn` results in frontend exceptions
being caught
- check unhandled exceptions
- check exceptions caught by Canvas's React `ErrorBoundary`
- confirm that Sentry is not enabled on the frontend if the
`sentry_disabled` setting is `true`
- confirm that user context is associated with frontend exceptions
reported to Sentry
- confirm that adjusting `sentry_frontend_errors_sample_rate` correctly
adjusts the quantity of errors delivered to Sentry, and that leaving it
unset or set to 0.0 results in no errors being sent
Change-Id: I47af7006a7f12b54dcb3f0121331af6ca2509124
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/282879
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Ahmad Amireh <ahmad@instructure.com>
This commit replaces `sentry-raven` with the more modern Sentry SDKs.
Settings related to this change:
- `sentry_disabled`: completely disables Sentry, in case anything goes
sideways (defaults to `false`)
refs DE-922
flag=none
test plan:
- make sure to check out the correct patchset in the
`gems/plugins/uuid_provisioner` directory (see the tag below for ref)
- create a new project in Sentry (it may be easiest to set up Sentry to
run locally; check out `getsentry/onpremise` on GitHub for setup
details; it's not too onerous. note that you will need to add
`VIRTUAL_HOST` and `VIRTUAL_PORT` to the `nginx` container in that
`docker-compose.yml` in order to have your Sentry accessible via Dory
at `sentry.docker`)
- configure `config/sentry.rb` with your DSN
- restart rails and job servers
- confirm that, by default:
- any errors raised in controllers appear in the "Issues" section
- any errors raised in jobs appear in the "Issues" section
- user context associated with issues includes user IP and global ID
- job issues contain context from the job under the "INST-JOBS" section
- set `sentry_disabled` setting to true and restart rails/jobs servers
- confirm that the app/jobs start fine and there are no issues
- also confirm that Sentry is disabled (no errors received)
- remove `config/sentry.yml` and restart rails and jobs servers
- confirm that the app/jobs start fine and there are no issues
[pin-commit-uuid_provisioner=735c2102fb0020ac5aa80734a323bf08322d002d]
Change-Id: Id0fa4b4ee57ab812cd75d21d2e8ab5e21177af1a
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279454
Reviewed-by: Ben Rinaca <brinaca@instructure.com>
QA-Review: Isaac Moore <isaac.moore@instructure.com>
Product-Review: Isaac Moore <isaac.moore@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>