How to use the honeybadger-js.configure function in honeybadger-js

To help you get started, we’ve selected a few honeybadger-js 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 ello / webapp / src / main.js View on Github external
// only use fastclick if we are on iOS
if (isIOS()) {
  require('react-fastclick')
}
/* eslint-enable global-require */

function shouldScroll(prevRouterProps, currentRouterProps) {
  const { location } = currentRouterProps
  if (location.action === 'PUSH' && location.query.submissionType) {
    return false
  }
  return location.action !== 'REPLACE'
}

if (ENV.HONEYBADGER_API_KEY && ENV.HONEYBADGER_ENVIRONMENT) {
  Honeybadger.configure({
    api_key: ENV.HONEYBADGER_API_KEY,
    environment: ENV.HONEYBADGER_ENVIRONMENT,
  })
}

updateTimeAgoStrings({ about: '' })

const APP_VERSION = '4.0.0'

const createSelectLocationState = () => {
  let prevRoutingState
  let prevRoutingStateJS
  return (state) => {
    const routingState = state.routing
    if (typeof prevRoutingState === 'undefined' || prevRoutingState !== routingState) {
      prevRoutingState = routingState
github influxdata / influxdb / ui / src / shared / utils / errors.ts View on Github external
import {ErrorInfo} from 'react'
import HoneyBadger from 'honeybadger-js'
import {CLOUD, GIT_SHA} from 'src/shared/constants'

import {getUserFlags} from 'src/shared/utils/featureFlag'
import {event} from 'src/cloud/utils/reporting'

if (CLOUD) {
  HoneyBadger.configure({
    apiKey: process.env.HONEYBADGER_KEY,
    revision: GIT_SHA,
    environment: process.env.HONEYBADGER_ENV,
  })
}

// See https://docs.honeybadger.io/lib/javascript/guides/reporting-errors.html#additional-options
interface HoneyBadgerAdditionalOptions {
  component?: string
  context?: {[key: string]: any}
  cookies?: {[key: string]: any}
  name?: string
  params?: {[key: string]: any}
}

export const reportError = (
github honeybadger-io / honeybadger-vue / src / index.js View on Github external
install (Vue, options) {
    if (Vue.config.debug) {
      console.log(`Honeybadger configured with ${options.apiKey}`)
    }
    const honeybadger = Honeybadger.configure(options)
    Vue.$honeybadger = honeybadger
    Vue.prototype.$honeybadger = Vue.$honeybadger
    const chainedErrorHandler = Vue.config.errorHandler
    let extractContext = function (vm) {
      var options = typeof vm === 'function' && vm.cid != null ? vm.options : vm._isVue ? vm.$options ||
        vm.constructor.options : vm || {}
      var name = options.name || options._componentTag
      var file = options.__file
      return {
        isRoot: vm.$root === vm,
        name: name,
        props: options.propsData,
        parentVnodeTag: options._parentVnode ? options._parentVnode.tag : undefined,
        file: file
      }
    }

honeybadger-js

A JavaScript library for integrating apps with the Honeybadger Rails Error Notifier.

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis

Similar packages