![Coverage Status](https://camo.githubusercontent.com/5036abec4a6f5a7c533b6ae72ce2fd0dd9a137b44c9bc648087ad8114637b196/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f76616e6472696573682f657272747261636b65722d6c69622f62616467652e7376673f6272616e63683d6d6173746572)
- Report to slack every error. Might create some slack distractions.
- Report
first of its kind
error only. Per device.
Since the info about errors are kept in device's localstorage (if supported).
- Report every error and store it in AWS. Working on it.
Parameter name |
type (default value) |
mandatory |
description |
webHookUrl |
string |
true |
slack webhook generated by slack |
useConsoleLogger |
boolean (false) |
false |
false |
details |
object |
false |
details you might need to provide |
Parameter name |
type |
mandatory |
description |
apiKey |
string |
true |
header api key - granting access to api (generated on request, for now) |
token |
string |
true |
id to store error |
useConsoleLogger |
boolean |
false |
report about server side response, can provide custom logger |
url |
string |
false |
where error was thrown |
details |
object |
false |
details you might need to provide |
<script src="/path/to/errtracker-slack-lib.es5.js"></script>
<script>
(function(et, d, n) {
if (!et) {
return
}
et({
webHookUrl: 'https://hooks.slack.com/services/some_unique_id',
details: {
platform: n.platform,
userAgent: n.userAgent,
url: d.location
}
});
})(window['slackErrTracker'], window.document, window.navigator);
</script>
Slack unique error report only example
<script src="/path/to/errtracker-unique-slack-lib.es5.js"></script>
<script>
(function(et, d, n) {
if (!et) {
return
}
et({
webHookUrl: 'https://hooks.slack.com/services/some_unique_id',
details: {
platform: n.platform,
userAgent: n.userAgent,
url: d.location
}
});
})(window['uniqueSlackErrTracker'], window.document, window.navigator);
</script>
<script src="/path/to/errtracker-lib.es5.js"></script>
<script>
(function(et, d, n) {
if (!et) {
return
}
et({
// mandatory
apiKey: 'xxxx-xxxx-xxxx',
token: 'xxxxxx-xxxx-xx-xxx-xxxxxxxxx',
// below are optional
useConsoleLogger: true,
url: d.location,
details: {
platform: n.platform,
userAgent: n.userAgent
}
});
})(window['errtracker'], window.document, window.navigator);
</script>