browser 3.0.2-alpha.0.10
Install from the command line:
Learn more about npm packages
$ npm install @exceptionless/browser@3.0.2-alpha.0.10
Install via package.json:
"@exceptionless/browser": "3.0.2-alpha.0.10"
About this version
This package provides native JavaScript support for applications that are built in vanilla HTML and JS.
To use this package, your must be using ES6 and support ESM modules.
You can install Exceptionless either in your browser application using a script
tag, or you can use the Node Package Manager (npm) to install the package.
Add the following script tag at the very beginning of your page:
<script type="module">
import { Exceptionless } from "https://unpkg.com/@exceptionless/browser";
await Exceptionless.startup((c) => {
c.apiKey = "API_KEY_HERE";
});
</script>
- Install the package by running
npm install @exceptionless/browser --save
. - Import Exceptionless and call startup during app startup.
import { Exceptionless } from "@exceptionless/browser";
await Exceptionless.startup((c) => {
c.apiKey = "API_KEY_HERE";
});
While your app is starting up, you should call startup
on the Exceptionless
client. This ensures the client is configured and automatic capturing of
unhandled errors occurs.
import { Exceptionless } from "@exceptionless/browser";
await Exceptionless.startup(c => {
c.apiKey = "API_KEY_HERE";
c.setUserIdentity("12345678", "Blake");
c.useSessions();
// set some default data
c.defaultData["mydata"] = {
myGreeting: "Hello World"
};
c.defaultTags.push("Example", "JavaScript", "Browser");
});
Once that's done, you can use the Exceptionless client anywhere in your app by
importing Exceptionless
followed by the method you want to use. For example:
await Exceptionless.submitLog("Hello world!");
Please see the docs for more information on configuring the client.
If you need help, please contact us via in-app support, open an issue or join our chat on Discord. We’re always here to help if you have any questions!
Details
- browser
- exceptionless
- over 1 year ago
- Apache-2.0
- 8 dependencies
Assets
- browser-3.0.2-alpha.0.10.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0