Git Product home page Git Product logo

sentry-utils's Introduction

Exponent Sentry Utilities

This package performs two main functions:

  • Provides ExponentSentryClient, which allows an application to easily set itself up to send any uncaught errors to Sentry (https://getsentry.com).
  • Provides a script -- publish-sentry-release -- that will fetch the current JavaScript bundle and source map for an Exponent experience from XDE or exp, and upload those artifacts to Sentry to allow for symbolication of crash reports.

Sentry Client

Set up the client as follows during the initialization of your app:

ExponentSentryClient.setupSentry([SENTRY DSN], [RELEASE], [EXPERIENCE ENTRY FILE])

A good place to do this is in the constructor of your root component. RELEASE should be a version number or Git commit SHA that identifies a new Sentry release.

Example usage:

const packageJSON = require('./package.json');
ExponentSentryClient.setupSentry(
  `https://[api key here]@app.getsentry.com/[project id]`,
  packageJSON.version,
  packageJSON.main,
);

Before using this for the first time you will need to publish at least one release as shown below.

"Publish Sentry Release" Script

To upload a new release:

publish-sentry-release \
  --platform [ios|android] \
  --team [SENTRY TEAM] \
  --project [SENTRY PROJECT] \
  --auth-token [SENTRY AUTH TOKEN]

Find out about your Sentry auth token on this page.

You'll be prompted for your XDE port -- this can be found in XDE in the project URL display.

In addition, the script will ask you if you want to bump the version of your project (the version specified in your package.json). This is optional - but if you don't bump the version and there is an existing Sentry release with the same version number, the artifacts associated with that version will be overridden.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.