plugin-breadcrumbs-network

The @appsignal/javascript plugin for automatically adding a breadcrumb on every network request. Works with both XMLHttpRequest and fetch.

Installation

Add the @appsignal/plugin-breadcrumbs-network and @appsignal/javascript packages to your package.json. Then, run yarn install/npm install.

You can also add these packages to your package.json on the command line:

yarn add @appsignal/javascript @appsignal/plugin-breadcrumbs-network
npm install --save @appsignal/javascript @appsignal/plugin-breadcrumbs-network

Usage

import Appsignal from "@appsignal/javascript"
import { plugin } from "@appsignal/plugin-breadcrumbs-network"
 
const appsignal = new Appsignal({ 
  key: "YOUR FRONTEND API KEY"
})
 
appsignal.use(plugin(options))

plugin options

The plugin can be initialized with the following options:

ParamTypeDescription
xhrEnabledBoolean(optional) A boolean value representing whether the plugin should bind to XMLHttpRequest. Defaults to true.
fetchEnabledBoolean(optional) A boolean value representing whether the plugin should bind to fetch. Defaults to true.

Want to help us improve this documentation page?

Create a pull request

Need more help?

Contact us and speak directly with the engineers working on AppSignal. They will help you get set up, tweak your code and make sure you get the most out of using AppSignal.

Contact us

Start a trial - 30 days free

AppSignal is a great way to monitor your Ruby, Elixir & Node.js applications. Works great with Rails, Phoenix, Express and other frameworks, with support for background jobs too. Let's improve your apps together.

Start a trial