Created
March 30, 2018 20:22
-
-
Save vudngo/a5376129f02dafbbb0a1e0ff0a7198d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Vanilla JS</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!-- Sentry JS SDK 2.1.+ required --> | |
<script src="https://cdn.ravenjs.com/3.20.0/raven.min.js"></script> | |
<script> | |
Raven.config('https://297b7c5c0e6d4f85b366439cdb42a11d@sentry.io/252393').install(); | |
//Tagging values | |
Raven.setTagsContext({ key1: 'value1', key2: 'value2' }) | |
//Filtering errors by error message | |
Raven.setShouldSendCallback(function (data) { | |
var exception = data.exception; | |
var errorMessage = exception.values[0].value; | |
if (errorMessage == "undefinedMethod is not defined" ){ | |
return true; | |
} | |
return false; | |
}) | |
//Error | |
undefinedMethod(); | |
</script> | |
</head> | |
<body> | |
<h1>Simple Web Page</h1> | |
<style type="text/css"> | |
body { | |
margin-left: auto; | |
margin-right: auto; | |
max-width: 20em; | |
width: 88%; | |
} | |
</style> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment