@honeybadger-io/gatsby-plugin-honeybadger

6.0.24 • Public • Published

@honeybadger-io/gatsby-plugin-honeybadger

Node CI npm version npm dm npm dt

Gatsby plugin to add Honeybadger error tracking to your site.

Install

npm install --save @honeybadger-io/gatsby-plugin-honeybadger

How to use

Add your API key in the plugin options in gatsby-config.js:

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `@honeybadger-io/gatsby-plugin-honeybadger`,
      options: {
        apiKey: 'YOUR_API_KEY',
        revision: `${Date.now()}`,
        assetsUrl: 'https://foobar.com/assets',
        environment: process.env.NODE_ENV
      }
    }
  ]
}

Options

  • [apiKey] (String): the API key of your Honeybadger project.
  • [revision] (String): gatsby-plugin-honeybadger uses honeybadger-webpack to upload source maps to Honeybadger. options.revision needs to be unique as it is the identifier that connects your errors to your source maps.
  • [assetsURL] (String): The base URL to production assets (scheme://host/path). Used to grab source maps.
  • [environment] (String): Current environment. Used to indicate the environment where the error occurred. Optional, defaults to process.env.NODE_ENV.

License

This package is MIT licensed. See the MIT-LICENSE file in this folder for details.

Package Sidebar

Install

npm i @honeybadger-io/gatsby-plugin-honeybadger

Weekly Downloads

68

Version

6.0.24

License

MIT

Unpacked Size

17.2 kB

Total Files

7

Last publish

Collaborators

  • subzero10
  • rabidpraxis
  • stympy
  • honeybadger-tech
  • mikemondragon
  • joshuap
  • jasontrue
  • andreybutov