Installing AppSignal for JavaScript
Please follow the installation guide first, when adding a new application to AppSignal.
Creating a Push API Key
Before you begin, you'll need to find your Push API key on the "Push and deploy" section of your App settings page. You'll be able to find your API key under the "Front-end error monitoring". Once you have your key, follow the instructions under the Installation section to use it in your application.
Installation
With npm or yarn
First, add the @appsignal/javascript
package to your package.json
. Then, run yarn install
/npm install
. You'll also need a Front-end error monitoring key from the "Push and deploy" section of your App settings page.
You can also add these packages to your package.json
on the command line:
With JSPM.dev
Thanks to the JSPM CDN, it is possible to use the AppSignal for JavaScript integration without a front-end asset build step. Your application can import packages directly from the CDN:
With JSPM.io import maps
Using the JSPM.io import map generator, you can generate an import map for your application's dependencies.
Add @appsignal/javascript
to the dependencies list, then add the generated import map and ES module shims to your application's code.
With rails-importmap
Use the following command to add these packages to your Rails application's import maps:
Usage
Create an appsignal.js
file to require and configure AppSignal. From this file, we export the instance of the Appsignal
object that we will use from our application. For more information about the configuration, see our configuration section.
You can then import and use the Appsignal
object in your app:
Uninstall
Uninstall AppSignal from your app by following the steps below. When these steps are completed your app will no longer send data to the AppSignal servers.
-
In the
package.json
of your app, delete all lines referencing anappsignal
package:"*appsignal/*": "*"
. -
Run
npm install
oryarn install
to update yourpackage.lock
/yarn.lock
with the removed packages state.- Alternatively, run
npm uninstall @appsignal/<package name>
oryarn remove @appsignal/<package name>
to uninstall an AppSignal package.
- Alternatively, run
-
Remove any AppSignal configuration from your app.
-
Commit, deploy and restart your app.
- This will make sure the AppSignal servers won't continue to receive data from your app.
-
Finally, remove the app on AppSignal.com.