How to use the rollbar/dist/rollbar.umd function in rollbar

To help you get started, we’ve selected a few rollbar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tidepool-org / uploader / app / utils / rollbar.js View on Github external
/* global  __VERSION_SHA__ */
import Rollbar from 'rollbar/dist/rollbar.umd';

let rollbar;

if (process.env.NODE_ENV === 'production') {

  rollbar = new Rollbar({
      accessToken: '1843589282464f4facd43f794c8201a8',
      captureUncaught: true,
      enabled: process.env.NODE_ENV === 'production',
      payload: {
          environment: 'electron_renderer',
          client: {
            javascript: {
              code_version: __VERSION_SHA__,
              guess_uncaught_frames: true
            }
          },
          server: {
            root: 'webpack:///./'
          }
      },
      // to deal with URI's as local filesystem paths, we use the "many domain" transform:
github dsifford / academic-bloggers-toolkit / src / js / _legacy / utils / logger.ts View on Github external
if (trace && trace.frames) {
            for (const [i, frame] of trace.frames.entries()) {
                const filename = frame.filename;
                if (filename) {
                    const name = filename.replace(
                        window.location.hostname,
                        'dynamichost',
                    );
                    trace.frames[i].filename = name;
                }
            }
        }
    },
};

export default new rollbar(config);