Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vudngo/a5376129f02dafbbb0a1e0ff0a7198d9 to your computer and use it in GitHub Desktop.
Save vudngo/a5376129f02dafbbb0a1e0ff0a7198d9 to your computer and use it in GitHub Desktop.
<!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