How to use the honeybadger-js.setContext 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 influxdata / influxdb / ui / src / shared / actions / me.ts View on Github external
export const getMe = () => async dispatch => {
  try {
    dispatch(setMe(RemoteDataState.Loading))
    const user = await client.users.me()
    updateReportingContext({userID: user.id, userEmail: user.name})

    gaEvent('cloudAppUserDataReady', {
      identity: {
        id: user.id,
        email: user.name,
      },
    })

    HoneyBadger.setContext({
      user_id: user.id,
    })

    dispatch(setMe(RemoteDataState.Done, user as MeState))
  } catch (error) {
    console.error(error)
    dispatch(setMe(RemoteDataState.Error))
  }
}
github influxdata / influxdb / ui / src / shared / actions / me.ts View on Github external
export const getMe = () => async dispatch => {
  try {
    const user = await client.users.me()
    updateReportingContext({userID: user.id, userEmail: user.name})

    gaEvent('cloudAppUserDataReady', {
      identity: {
        id: user.id,
        email: user.name,
      },
    })

    updateReportingContext({
      userID: user.id,
    })
    HoneyBadger.setContext({
      user_id: user.id,
    })

    dispatch(setMe(user as MeState))
  } catch (error) {
    console.error(error)
  }
}
github influxdata / influxdb / ui / src / organizations / actions / creators.ts View on Github external
export const setOrg = (org: Organization) => {
  HoneyBadger.setContext({
    orgID: org.id,
  })
  return {
    type: SET_ORG,
    org,
  } as const
}

honeybadger-js

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

MIT
Latest version published 4 years ago

Package Health Score

56 / 100
Full package analysis

Similar packages