Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork22
Configuration
- Install the package by running
bower install exceptionless - Add the script to your html page. We recommend placing this as the very first script.
<scriptsrc="bower_components/exceptionless/dist/exceptionless.min.js"></script>
- Install the package by running
npm install exceptionless --save-dev. - Add the Exceptionless client to your app:
varclient=require('exceptionless').ExceptionlessClient.default;
NOTE: The only required setting that you need to configure is the client'sapiKey.
1 - Configure theapiKey as part of the script tag. This will be applied to all new instances of the ExceptionlessClient
<scriptsrc="bower_components/exceptionless/dist/exceptionless.min.js?apiKey=API_KEY_HERE"></script>
2 - Set theapiKey on the default ExceptionlessClient instance.
exceptionless.ExceptionlessClient.default.config.apiKey='API_KEY_HERE';
3 - Create a new instance of the ExceptionlessClient and specify theapiKey,serverUrl orconfiguration object.
varclient=newexceptionless.ExceptionlessClient('API_KEY_HERE');// or with a api key and server url.varclient=newexceptionless.ExceptionlessClient('API_KEY_HERE','http://localhost:50000');// or with a configuration objectvarclient=newexceptionless.ExceptionlessClient({apiKey:'API_KEY_HERE',serverUrl:'http://localhost:50000',submissionBatchSize:100});
1 - Set theapiKey on the default ExceptionlessClient instance.
varclient=require('exceptionless').ExceptionlessClient.default;client.config.apiKey='API_KEY_HERE';
2 - Create a new instance of the ExceptionlessClient and specify theapiKey,serverUrl orconfiguration object.
varexceptionless=require('exceptionless');varclient=newexceptionless.ExceptionlessClient('API_KEY_HERE');// or with a api key and server url.varclient=newexceptionless.ExceptionlessClient('API_KEY_HERE','http://localhost:50000');// or with a configuration objectvarclient=newexceptionless.ExceptionlessClient({apiKey:'API_KEY_HERE',serverUrl:'http://localhost:50000',submissionBatchSize:100});
NOTE: creating new instances is good for sending custom events.Automatic catching of errors uses default client. Make sure you setup default client as well if you need automatic catching of unhandled errors.
By default the Exceptionless Client will report all available metadata which could include potential PII data. There are various ways to limit the scope of PII data collection. For example, one could useData Exclusions to remove sensitive values but it only applies to specific collection points such asCookie Keys,Form Data Keys,Query String Keys andExtra Exception properties. Additional data may need to be removed for the GDPR like the collection of user names and IP Addresses. Shown below is several examples of how you can configure the client to remove this additional metadata.
You have the option of finely tuning what is collected via individual setting options or you can disable the collection of all PII data by setting theincludePrivateInformation tofalse.
<scriptsrc="bower_components/exceptionless/dist/exceptionless.min.js?apiKey=API_KEY_HERE& includePrivateInformation=false"></script>
exceptionless.ExceptionlessClient.default.config.includePrivateInformation=false;
varexceptionless=require('exceptionless');exceptionless.ExceptionlessClient.default.config.includePrivateInformation=false;
If you wish to have a finer grained approach which allows you to use Data Exclusions while removing specific meta data collection you can do so via code. Please note if the below doesn't meet your needs you can always write a plugin.
// Include the username if available.exceptionless.ExceptionlessClient.default.config.includeUserName=false;// Include the MachineName in MachineInfo.exceptionless.ExceptionlessClient.default.config.includeMachineName=false;// Include Ip Addresses in MachineInfo and RequestInfo.exceptionless.ExceptionlessClient.default.config.includeIpAddress=false;// Include Cookies, please note that DataExclusions are applied to all Cookie keys when enabled.exceptionless.ExceptionlessClient.default.config.includeCookies=false;// Include Form/POST Data, please note that DataExclusions are only applied to Form data keys when enabled.exceptionless.ExceptionlessClient.default.config.includePostData=false;// Include Query String information, please note that DataExclusions are applied to all Query String keys when enabled.exceptionless.ExceptionlessClient.default.config.includeQueryString=false;
varexceptionless=require('exceptionless');// Include the username if available.exceptionless.ExceptionlessClient.default.config.includeUserName=false;// Include the MachineName in MachineInfo.exceptionless.ExceptionlessClient.default.config.includeMachineName=false;// Include Ip Addresses in MachineInfo and RequestInfo.exceptionless.ExceptionlessClient.default.config.includeIpAddress=false;// Include Cookies, please note that DataExclusions are applied to all Cookie keys when enabled.exceptionless.ExceptionlessClient.default.config.includeCookies=false;// Include Form/POST Data, please note that DataExclusions are only applied to Form data keys when enabled.exceptionless.ExceptionlessClient.default.config.includePostData=false;// Include Query String information, please note that DataExclusions are applied to all Query String keys when enabled.exceptionless.ExceptionlessClient.default.config.includeQueryString=false;
By specifying an application version you canenable additional functionality. It's a good practice to specify an application version if possible using the code below.
exceptionless.ExceptionlessClient.default.config.setVersion("1.2.3");
varexceptionless=require('exceptionless');exceptionless.ExceptionlessClient.default.config.setVersion("1.2.3");
Looking forGeneral Exceptionless Documentation,UI Documentation, orDocumentation for another Client?
Visit the Primary Exceptionless Documentation Page and go from there.