{"componentChunkName":"component---src-templates-doc-tsx","path":"/product/sentry-basics/guides/alert-notifications/creating-custom-rules/","result":{"data":{"file":{"id":"5b4dadda-c3b4-5a80-951c-9c667d322460","relativePath":"product/sentry-basics/guides/alert-notifications/creating-custom-rules.mdx","sourceInstanceName":"docs","childMarkdownRemark":null,"childMdx":{"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Creating Custom Rules\",\n  \"sidebar_order\": 6\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar CodeTabs = makeShortcode(\"CodeTabs\");\nvar CodeBlock = makeShortcode(\"CodeBlock\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"When it comes to being notified on your errors, there's a wide range of options between notifying all your project team members on each and every error instance and notifying them only once when an \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Issue\"), \" is first seen. Ideally, when an error happens, you want the right people to know about it in real time. For that, create custom \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Alert Rules\"), \" in your project settings and define \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"who\"), \" to notify, about \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"what\"), \" error, \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"when\"), \" and \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"how\"), \", making sure that errors are getting the right attention by the relevant team members.\"), mdx(\"h2\", {\n    \"id\": \"alert-rules\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#alert-rules\",\n    \"aria-label\": \"alert rules permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Alert Rules\"), mdx(\"p\", null, \"Alert Rules enable powerful rule creation to notify developers of inbound errors through any channel or tool your team may be using. Alert rules are configured per project under \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"[Project Settings] > Alerts > Rules\"), \" tab where you\\u2019ll see a list of all active rules and can add new rules or modify existing ones.\"), mdx(\"p\", null, \"Alert rules consist of:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"A set of self-explanatory \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"Conditions\"), \" connected in an \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"ALL\"), \", \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"ANY\"), \", or \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"NONE\"), \" relation.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"The \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"Environment\"), \" where your code is deployed and running in which you'd like the alert rule applied.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"The \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"Actions\"), \" that should be taken when the associated conditions are met. Mainly -- where you'd like to channel this alert.\")), mdx(\"h4\", {\n    \"id\": \"creating-a-good-set-of-alert-rules-means\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h4\"\n  }, {\n    \"href\": \"#creating-a-good-set-of-alert-rules-means\",\n    \"aria-label\": \"creating a good set of alert rules means permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), mdx(\"strong\", {\n    parentName: \"h4\"\n  }, \"Creating a good set of alert rules means:\")), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Identifying the critical show-stopping errors and routing them appropriately (to PagerDuty for instance) so they can be resolved by the right people as soon as possible.\")), mdx(\"li\", {\n    parentName: \"ol\"\n  }, mdx(\"p\", {\n    parentName: \"li\"\n  }, \"Maintaining awareness and visibility to all other errors, in terms of where the alerts are routed to (mail, specific Slack channels) and at what frequency.\"))), mdx(\"p\", null, \"Generally, we recommend you configure these rules and fine-tune them as you go, adapting to your teams workflows and preferences. With that said, there are some common best practices that you should consider.\"), mdx(\"h2\", {\n    \"id\": \"selecting-conditions\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#selecting-conditions\",\n    \"aria-label\": \"selecting conditions permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Selecting Conditions\"), mdx(\"p\", null, \"The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"New Alert Rule\"), \" wizard allows you to compose alert rules combining multiple conditions. These conditions are pretty self explanatory and rely on event \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Tags\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Attributes\"), \" values, event \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Frequency\"), \", and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Issue State\"), \" changes. Essentially, allowing you to combine the conditions bellow to fit your specific use-case.\"), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"800px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/ff6dd07be0600a6b635c340eca4cca2f/5a190/alerts_notifications_09.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"61.66666666666666%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAAAsSAAALEgHS3X78AAABRUlEQVQoz6WTTUsDQQyG9///BqEFRQsexJM/wYunHkV7ELRlu1uZz8zXzmsyBfVktzjwkGzIhHeTTKeUxmE8IOeCWsHUf9EFCtVaV1NMdZompv4c9luszIDzSim1izGBiyKG2FS2b/aFGI8xTp5N552HMYYLEAcKnLNQSjWM0Ugp4ZzDBQOcFUUF5DOrZZXhSItR5ng6QYZn611E9/S4w/XiGXerDVbLV9wsxW5+WY4tTsA5VxcveLh/Q6eUrdvtgI/3vu7Yfh4sT92wNRgHDa2oqRYV5Mvf8N90MYTJeyd95GkbCNI7sdJP6ev8w2sjUxyHcRqGEcJ+PzTElx2VSbfUkzuI45SJaC1FjbGTtVYstNYN8S0jF2bpk8Xmi5cpZVa1z6Ks73uM/HKkeM75/JdCFG6lOvmQGR4/tUVPMX8veIPm8QXYLZyShWYyOgAAAABJRU5ErkJggg==')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"Alert Rule Conditions\",\n    \"title\": \"Alert Rule Conditions\",\n    \"src\": \"/static/ff6dd07be0600a6b635c340eca4cca2f/5a190/alerts_notifications_09.png\",\n    \"srcSet\": [\"/static/ff6dd07be0600a6b635c340eca4cca2f/5a46d/alerts_notifications_09.png 300w\", \"/static/ff6dd07be0600a6b635c340eca4cca2f/0a47e/alerts_notifications_09.png 600w\", \"/static/ff6dd07be0600a6b635c340eca4cca2f/5a190/alerts_notifications_09.png 800w\"],\n    \"sizes\": \"(max-width: 800px) 100vw, 800px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\"\n  })), \"\\n  \"), \"\\n    \")), mdx(\"h3\", {\n    \"id\": \"event-tags\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#event-tags\",\n    \"aria-label\": \"event tags permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), mdx(\"strong\", {\n    parentName: \"h3\"\n  }, \"Event Tags\")), mdx(\"p\", null, \"Tags are key-value pairs that Sentry assigns to each event. Some of the tags are added by default depending on the platform and type of SDK. Developers can also add \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Custom Tags\"), \" through the SDK. You can find the list of tags available in your project under \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"[Project Settings] > Tags\"), \". The list is an aggregation of all of the tag keys (default and custom) that have been encountered in events in this project.\"), mdx(\"p\", null, \"Event tags are useful for various reasons. First, tags are indexed and this allows you to query your errors in the Sentry \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Event Stream\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Issue Stream\"), \" based on specific tag values. In addition, adding the right tags in your code will allow you tell Sentry to notify you only when events with specific details occur.\"), mdx(\"p\", null, \"To create a rule based on a tag's value, select the condition\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"text\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-text\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-text\"\n  }), \"An event's tags match {key} {match} {value}\")))))), mdx(\"p\", null, \"A tag-based condition can be used as the sole condition for an alert rule or in conjunction with additional conditions to fine tune the rule:\"), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"800px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/d51d5ce59266f0ec07affd7861846ac3/5a190/alerts_notifications_11.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"22.666666666666664%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAIAAADKYVtkAAAACXBIWXMAAAsSAAALEgHS3X78AAAAw0lEQVQY0y1PW5LDIAzL/c/Yj3aSli5gnpsYTEhWJMtoNEZYlpkcBeeiv+Aokg1QjHEhZKOdNX7j2loX2YHWgL63HkMKIU1kvffweGPIGgdn4VqLiDQAuv6xd2uM+YoJRN6O6WlKKUON8fd+BuA5zxMJ4JyHXkplLuBt44GVccUWE8YYjczBWhOYKKS0StthXld+PF7P56I++r18l1l93nqelVJmY5laG+v9n6uQOnbuvR/HUavg8xhRqjAjv95FGT37HzBpHOoVjjERAAAAAElFTkSuQmCC')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"Alert Rule Event Tags\",\n    \"title\": \"Alert Rule Event Tags\",\n    \"src\": \"/static/d51d5ce59266f0ec07affd7861846ac3/5a190/alerts_notifications_11.png\",\n    \"srcSet\": [\"/static/d51d5ce59266f0ec07affd7861846ac3/5a46d/alerts_notifications_11.png 300w\", \"/static/d51d5ce59266f0ec07affd7861846ac3/0a47e/alerts_notifications_11.png 600w\", \"/static/d51d5ce59266f0ec07affd7861846ac3/5a190/alerts_notifications_11.png 800w\"],\n    \"sizes\": \"(max-width: 800px) 100vw, 800px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\"\n  })), \"\\n  \"), \"\\n    \")), mdx(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, \"In this rule we're leveraging custom tags that our developers added through the Sentry SDK, telling Sentry to notify us via our \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"#sentry-urgent\"), \" \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Slack\"), \" channel when \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Enterprise\"), \" customers are experiencing errors in critical parts of our application.\")), mdx(\"h3\", {\n    \"id\": \"event-attributes\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#event-attributes\",\n    \"aria-label\": \"event attributes permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), mdx(\"strong\", {\n    parentName: \"h3\"\n  }, \"Event Attributes\")), mdx(\"p\", null, \"The alert rule system in Sentry is capable of picking out attributes from an event's payload. There are 15 different kinds of attributes that a rule can target. Those include attributes like: \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Error Message\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Error Type\"), \", the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Platform\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"user.id\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"http.method\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"stacktrace.filename\"), \", and others.\"), mdx(\"p\", null, \"To set an attribute-based condition in your rule, select the condition:\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"text\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-text\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-text\"\n  }), \"An event's {attribute} value {match} {value}\")))))), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"800px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/ce7228bbcd173b68ba022135df83e6fe/5a190/alerts_notifications_12.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"20%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAIAAAABPYjBAAAACXBIWXMAAAsSAAALEgHS3X78AAAAmUlEQVQI1yWOBw4DMQgE/f+X5lwAG1dcEpxDK9qCNIaQnYPgCSCKrDm3aoz5qndpbdQ6bm43tzq8B8LEqZjMhVNmzpwYAAljinzO+f7D+wABrstFLyMlBCKKmfNe25RcrQ3Ohefj7OOdDdZ6AAoea+ulVO0R433D2IeITNWcl9FoeWeFvNiy5AKLAqu99hky9efdrHU3a73aPzo15iRbfBqMAAAAAElFTkSuQmCC')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"Alert Rule Event Attributes 1\",\n    \"title\": \"Alert Rule Event Attributes 1\",\n    \"src\": \"/static/ce7228bbcd173b68ba022135df83e6fe/5a190/alerts_notifications_12.png\",\n    \"srcSet\": [\"/static/ce7228bbcd173b68ba022135df83e6fe/5a46d/alerts_notifications_12.png 300w\", \"/static/ce7228bbcd173b68ba022135df83e6fe/0a47e/alerts_notifications_12.png 600w\", \"/static/ce7228bbcd173b68ba022135df83e6fe/5a190/alerts_notifications_12.png 800w\"],\n    \"sizes\": \"(max-width: 800px) 100vw, 800px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\"\n  })), \"\\n  \"), \"\\n    \")), mdx(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, \"In this example, any event with type \\u201CSubscriptionError\\u201D indicating an error the billing flow will be routed directly to PagerDuty for our on-call engineer to handle.\")), mdx(\"p\", null, \"In addition, you can also set up rules that account for multiple different attributes at once, and chain that logic together.\"), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"800px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/e5b3a9a3058890787c80661f0df74fff/5a190/alerts_notifications_13.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"24%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAIAAADKYVtkAAAACXBIWXMAAAsSAAALEgHS3X78AAAAsElEQVQY032PWQ7DIAwFc/97lgTMZpawJ7UT9bdoZI2QzTObNY7RzjyQg4Qcz1Y7McbsffT2o49SqjU2xZzTuaEPznpnvNGWpJZ63/d1XVSp7xAyYGRCfDvfsBTTWmujNK0tgGEBmkfnMIQ05my9K6n5aQYtTZI4JsZEARsoA0oD8Dx5zqXW1lqfc8216HIXct/lU5UQB7n4HMZ6TsZnK8TgPXqHOZ+USV8dY/Dqf88XTucdQNtUf20AAAAASUVORK5CYII=')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"Alert Rule Event Attributes 2\",\n    \"title\": \"Alert Rule Event Attributes 2\",\n    \"src\": \"/static/e5b3a9a3058890787c80661f0df74fff/5a190/alerts_notifications_13.png\",\n    \"srcSet\": [\"/static/e5b3a9a3058890787c80661f0df74fff/5a46d/alerts_notifications_13.png 300w\", \"/static/e5b3a9a3058890787c80661f0df74fff/0a47e/alerts_notifications_13.png 600w\", \"/static/e5b3a9a3058890787c80661f0df74fff/5a190/alerts_notifications_13.png 800w\"],\n    \"sizes\": \"(max-width: 800px) 100vw, 800px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\"\n  })), \"\\n  \"), \"\\n    \")), mdx(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, \"In this more advanced example, a notification containing the message, platform, and type attribute values gets routed to the \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Android Dev\"), \" team in \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Slack\"), \" if a \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"RunTimeError\"), \" with the message \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Failed to Reload Index\"), \" comes in from our \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Java platform\"), \".\")), mdx(\"h3\", {\n    \"id\": \"event-thresholds\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#event-thresholds\",\n    \"aria-label\": \"event thresholds permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), mdx(\"strong\", {\n    parentName: \"h3\"\n  }, \"Event Thresholds\")), mdx(\"p\", null, \"Often, it\\u2019s necessary to create a rule based on a frequency threshold to help determine the significance of an error\\u2019s impact and escalation priority. Among other use-cases, threshold conditions can be set in conjunction with tag and attribute based conditions to indicate a spike in errors in a certain environment, release, or page in your app or package in your code.\"), mdx(\"p\", null, \"Sentry provides two threshold conditions based either on the event occurrence or number of affected users:\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"text\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-text\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-text\"\n  }), \"An issue is seen more than {value} times in {frequency}\\nAn issue is seen by more than {value} users in {frequency}\")))))), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"800px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/f0abd555daf94d29ddb5b7d7c4b3266a/5a190/alerts_notifications_10.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"79.66666666666667%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAIAAACZeshMAAAACXBIWXMAAAsSAAALEgHS3X78AAABfUlEQVQoz5VSW27cMAzU/Q/TjwIFeps0H0m6Xq+tJ0m9O7KxblJvAnQ8EGhKJIeUlF7NuuiYcs7lf6mCI/LcSu21f8H6CMqJv7nFiA2FfA4gDKr8D3MttbaPrOqJnqcwL1lPNL/Yt1f7dglX251pO61rfm6L67733vC9g5rlxlrIMlspXHrqYPRRXCTDVRp+pYjOppW2dTqACYlE9SKvF3O9uOm3uVzDbJKxxS28Tn6GZ4mrK25t2lU/6t4BzSJJuehtcr6G8Dmp0tbx34Zho77CqK12QnG08znbIyhmMVBa7xnrGOuZZ4zKIdC6aiKumxLk6x/R7q5j62h7VMYjWxattb3dVgqEMR5kjjEmEMeGsTnTeI4ZGyP4Os3OemGBCu8DPMEHEOegqOSCMPj3LHDuApFCbTnSWe2hc1vboXaXXEodwUMJC8jv1pQSVlQ4z6lt97QnV7tayAOZGHbwlNBkwAhrf6BnSKCQQdW/wPnCe88JYeHn918/vj39AWZTqF0nK9DRAAAAAElFTkSuQmCC')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"Alert Rule Thresholds\",\n    \"title\": \"Alert Rule Thresholds\",\n    \"src\": \"/static/f0abd555daf94d29ddb5b7d7c4b3266a/5a190/alerts_notifications_10.png\",\n    \"srcSet\": [\"/static/f0abd555daf94d29ddb5b7d7c4b3266a/5a46d/alerts_notifications_10.png 300w\", \"/static/f0abd555daf94d29ddb5b7d7c4b3266a/0a47e/alerts_notifications_10.png 600w\", \"/static/f0abd555daf94d29ddb5b7d7c4b3266a/5a190/alerts_notifications_10.png 800w\"],\n    \"sizes\": \"(max-width: 800px) 100vw, 800px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\"\n  })), \"\\n  \"), \"\\n    \")), mdx(\"h3\", {\n    \"id\": \"issue-state-changes\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#issue-state-changes\",\n    \"aria-label\": \"issue state changes permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), mdx(\"strong\", {\n    parentName: \"h3\"\n  }, \"Issue State Changes\")), mdx(\"p\", null, \"Every Issue in Sentry has a defined state - \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Unresolved\"), \", \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Resolved\"), \" or \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Ignored\"), \". Read about \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"/workflow/notifications/#issue-states\"\n  }), \"Issue States\"), \" for more information.\"), mdx(\"h4\", {\n    \"id\": \"1-regression-alert\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h4\"\n  }, {\n    \"href\": \"#1-regression-alert\",\n    \"aria-label\": \"1 regression alert permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), mdx(\"strong\", {\n    parentName: \"h4\"\n  }, \"1. Regression Alert\")), mdx(\"p\", null, \"When Sentry captures new event instances of an Issue that was previously marked as \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Resolved\"), \", it will change the issue state back to \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Unresolved\"), \". By default, Sentry will apply the regression workflow and notify all project team members about the \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Regression\"), \" through mail. However, when it comes to regressions, you may want to put specific notifications in-place. To set up a regression rule, use the condition\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"text\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-text\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-text\"\n  }), \"An issue changes state from resolved to unresolved\")))))), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"800px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/d4374eea7e8b5637092ca6ac853a40d2/5a190/alerts_notifications_06.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"43.66666666666667%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAIAAAC9o5sfAAAACXBIWXMAAAsSAAALEgHS3X78AAABJklEQVQoz4VRy07EMAzM//8FN7jxIRy4cgAh0d0utHkndl5tmZCK60qj1rVn7LErrPWltFq3uwDtOI7PD/v48Pb89P76sgjviSi1uo/yXeTciCrFmlMTWlmjnbNeKxcDl4xyLQOljab/6J+lWetiJKYstNRyYFVose/7tu2t4X0kTloZY5wFrFfKKKm1tgggRhdhTc8iBVKHdsx5XAEvuZ6twSHKKAHdWqldHDwBFBOesA0zCd4TVjrN/8U9A3Yt/S4xMs4EmlgWha4YiADz4ba1bQDKxDkloABMCRqKrKQJISIjoFxXtS4KDnE8IoYlKLE0qNPXfJnm6+U2X7+nab7NP5iBLZi41U2AEUP/WwPBx5yxUIMegZTmXHvVmOF8CIEAlODrF2DrBPXWGuHOAAAAAElFTkSuQmCC')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"Regression Alert Rules\",\n    \"title\": \"Regression Alert Rules\",\n    \"src\": \"/static/d4374eea7e8b5637092ca6ac853a40d2/5a190/alerts_notifications_06.png\",\n    \"srcSet\": [\"/static/d4374eea7e8b5637092ca6ac853a40d2/5a46d/alerts_notifications_06.png 300w\", \"/static/d4374eea7e8b5637092ca6ac853a40d2/0a47e/alerts_notifications_06.png 600w\", \"/static/d4374eea7e8b5637092ca6ac853a40d2/5a190/alerts_notifications_06.png 800w\"],\n    \"sizes\": \"(max-width: 800px) 100vw, 800px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\"\n  })), \"\\n  \"), \"\\n    \")), mdx(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, \"For instance, set-up two regression alert rules to\"), mdx(\"ul\", {\n    parentName: \"blockquote\"\n  }, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Notify your on-call personal via \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"PagerDuty\"), \" when a regression is identified in your \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"production environment\"), \".\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Notify your engineering team via \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"Slack\"), \" channel when a regression is identified in \", mdx(\"strong\", {\n    parentName: \"li\"\n  }, \"any environment.\")))), mdx(\"h4\", {\n    \"id\": \"2-unresolved-issue-reminder\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h4\"\n  }, {\n    \"href\": \"#2-unresolved-issue-reminder\",\n    \"aria-label\": \"2 unresolved issue reminder permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), mdx(\"strong\", {\n    parentName: \"h4\"\n  }, \"2. Unresolved Issue Reminder\")), mdx(\"p\", null, \"Sentry users can choose to ignore specific Issues in their issue stream for a defined threshold of time, occurrences, or number of affected users.\\n\", mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"600px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/a5862805d48fb29e95074bb4c9a38b01/0a47e/alerts_notifications_07.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"34.333333333333336%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAHCAIAAACHqfpvAAAACXBIWXMAAAsSAAALEgHS3X78AAABIUlEQVQY001Qy24CMQzk/7+qUnvosUIFQUVBsCzknc3m4SSbsHWWHrAsy1E8M/asOGXf681+f9hudj/bw3a9uxyvShrBlOCKUcGZJHdOiZBcaTVQKsiNaWWmqayAUXq99T3lUnai71h/1yQAQIjPjJC8h/B8Qgxh6SE1cE6Zc2m1Z1m8je9fev0RPs+qs8ohxgwW1XKean1gllr/m1Ib2FpH7szboM1wEMdfcbqGG+T4KG0IJ1LKzgXvgjHW+zAObhx9jIuyGUJ3UR4mgCn6Ar5Y7SLEnDPWUso8z7gdiiMAK3Kl9olYVB7t5dwTZgl3PbVEWMYlJYxRjm6hZ855XGF+CWTEmwdtVsiAlqQlsYmh0WKgAgrG2Exqh77GcnMt9Q/CXI4cEX9pSQAAAABJRU5ErkJggg==')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"Ignore Issues\",\n    \"title\": \"Ignore Issues\",\n    \"src\": \"/static/a5862805d48fb29e95074bb4c9a38b01/0a47e/alerts_notifications_07.png\",\n    \"srcSet\": [\"/static/a5862805d48fb29e95074bb4c9a38b01/5a46d/alerts_notifications_07.png 300w\", \"/static/a5862805d48fb29e95074bb4c9a38b01/0a47e/alerts_notifications_07.png 600w\"],\n    \"sizes\": \"(max-width: 600px) 100vw, 600px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\"\n  })), \"\\n  \"), \"\\n    \")), mdx(\"p\", null, \"To set-up a reminder that a previously \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Ignored\"), \" issue has become \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Unresolved\"), \" again, use the condition\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"text\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-text\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-text\"\n  }), \"An issue changes state from ignored to unresolved\")))))), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"800px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/f690e3c174f1845cbf2a0edf8b2369ef/5a190/alerts_notifications_08.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"28.333333333333332%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAIAAABM9SnKAAAACXBIWXMAAAsSAAALEgHS3X78AAAA4UlEQVQY032PzWrEMAyE/f5P0luhp75GD2WhS0s2iROSrv9jW7bleMWGLj2UDh+DLjOSmHO+lEog7sfwDzlja+39TTw/fb6+dMyYzYeYUgHI5Clj/sWfFQDFuRhjZmJVSlr5ra+rhJBraY8k1Xkfgwfyg22LIUBw4G0IIbJe8UHwXoyDmpZtFVlSe70LEbW2WllDrq2SWkqttVvsVSRZENkAnId5jDOHmYdphClhrrgjUrhO09J1Q99z4nLhFFbKnOT5Q37Rl6wd2ttD+49oubXOGGuNvbuDmCKAi1vNdFi9AU+mV9A4zirGAAAAAElFTkSuQmCC')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"Ignore Issues\",\n    \"title\": \"Ignore Issues\",\n    \"src\": \"/static/f690e3c174f1845cbf2a0edf8b2369ef/5a190/alerts_notifications_08.png\",\n    \"srcSet\": [\"/static/f690e3c174f1845cbf2a0edf8b2369ef/5a46d/alerts_notifications_08.png 300w\", \"/static/f690e3c174f1845cbf2a0edf8b2369ef/0a47e/alerts_notifications_08.png 600w\", \"/static/f690e3c174f1845cbf2a0edf8b2369ef/5a190/alerts_notifications_08.png 800w\"],\n    \"sizes\": \"(max-width: 800px) 100vw, 800px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\"\n  })), \"\\n  \"), \"\\n    \")), mdx(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, \"In this rule we're sending a \\\"reminder\\\" alert via \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Slack\"), \" to a \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"#sentry-backlog\"), \" channel and a direct message to the project manager \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"@neil\"), \".\")), mdx(\"h2\", {\n    \"id\": \"selecting-an-environment\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#selecting-an-environment\",\n    \"aria-label\": \"selecting an environment permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Selecting an Environment\"), mdx(\"p\", null, mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Environment\"), \" is a Sentry supported tag that you can (and should) add to your SDK. Generally, the tag accepts any value but is targeted to refer to the naming convention of your code deployments such as -- \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Development\"), \", \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Testing\"), \", \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Staging\"), \", \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Production\"), \", etc. This enables various features and filtering capabilities within your Sentry account.\"), mdx(\"p\", null, \"When creating a new alert rule, select the environment in which you want the rule applied. The environment drop-down list is populated with the 'environment' tag values available in your Event Stream.\"), mdx(\"p\", null, mdx(\"span\", _extends({\n    parentName: \"p\"\n  }, {\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"800px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/4ad5935dc5f6fa9d9c240af169d8cac1/5a190/alerts_notifications_22.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }), \"\\n    \", mdx(\"span\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"18.333333333333336%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAIAAAABPYjBAAAACXBIWXMAAAsSAAALEgHS3X78AAAANElEQVQI12P48uX99x+f/5MFGPZsv39gz6MDu5+RgRiuXnx76/rHa5ffk4EYvn77+J9cAACL/9qOmJPAXAAAAABJRU5ErkJggg==')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"Ignore Issues\",\n    \"title\": \"Ignore Issues\",\n    \"src\": \"/static/4ad5935dc5f6fa9d9c240af169d8cac1/5a190/alerts_notifications_22.png\",\n    \"srcSet\": [\"/static/4ad5935dc5f6fa9d9c240af169d8cac1/5a46d/alerts_notifications_22.png 300w\", \"/static/4ad5935dc5f6fa9d9c240af169d8cac1/0a47e/alerts_notifications_22.png 600w\", \"/static/4ad5935dc5f6fa9d9c240af169d8cac1/5a190/alerts_notifications_22.png 800w\"],\n    \"sizes\": \"(max-width: 800px) 100vw, 800px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\"\n  })), \"\\n  \"), \"\\n    \")), mdx(\"p\", null, \"This will allow you to refine your rules based on the environment where your project errors originated. This is quite useful, as the urgency and workflows you apply to \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Production\"), \" alerts might differ from the ones you apply to alerts originating from your \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"QA\"), \" environment.\"), mdx(\"h2\", {\n    \"id\": \"next\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#next\",\n    \"aria-label\": \"next permalink\",\n    \"className\": \"anchor before\"\n  }), mdx(\"svg\", _extends({\n    parentName: \"a\"\n  }, {\n    \"viewBox\": \"0 0 24 24\",\n    \"xmlns\": \"http://www.w3.org/2000/svg\"\n  }), mdx(\"path\", _extends({\n    parentName: \"svg\"\n  }, {\n    \"d\": \"M10.879 6.05L15 1.93A5.001 5.001 0 0 1 22.071 9l-4.121 4.121a1 1 0 0 1-1.414-1.414l4.12-4.121a3 3 0 1 0-4.242-4.243l-4.121 4.121a1 1 0 1 1-1.414-1.414zm2.242 11.9L9 22.07A5 5 0 1 1 1.929 15l4.121-4.121a1 1 0 0 1 1.414 1.414l-4.12 4.121a3 3 0 1 0 4.242 4.243l4.121-4.121a1 1 0 1 1 1.414 1.414zm-8.364-.122l13.071-13.07a1 1 0 0 1 1.415 1.414L6.172 19.242a1 1 0 1 1-1.415-1.414z\",\n    \"fill\": \"currentColor\"\n  })))), \"Next\"), mdx(\"p\", null, mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"/product/sentry-basics/guides/alert-notifications/routing-alerts/\"\n  }), \"Routing Alert Notifications\")));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#alert-rules","title":"Alert Rules","items":[{"items":[{"url":"#creating-a-good-set-of-alert-rules-means","title":"Creating a good set of alert rules means:"}]}]},{"url":"#selecting-conditions","title":"Selecting Conditions","items":[{"url":"#event-tags","title":"Event Tags"},{"url":"#event-attributes","title":"Event Attributes"},{"url":"#event-thresholds","title":"Event Thresholds"},{"url":"#issue-state-changes","title":"Issue State Changes","items":[{"url":"#1-regression-alert","title":"1. Regression Alert"},{"url":"#2-unresolved-issue-reminder","title":"2. Unresolved Issue Reminder"}]}]},{"url":"#selecting-an-environment","title":"Selecting an Environment"},{"url":"#next","title":"Next"}]},"internal":{"type":"Mdx"}}}},"pageContext":{"excerpt":"When it comes to being notified on your errors, there's a wide range of options between notifying all your project team members on each and every error instance and notifying them only once when an  Issue  is first seen. Ideally, when an error happens, you want the right people to know about it in real time. For that, create custom  Alert Rules  in your project settings and define  who  to notify, about  what  error,  when  and  how , making sure that errors are getting the right attention by the relevant team members. Alert Rules Alert Rules enable powerful rule creation to notify developers of inbound errors through any channel or tool your team may be using. Alert rules are configured per project under  [Project Settings] > Alerts > Rules  tab where you’ll see a list of all active rules and can add new rules or modify existing ones. Alert rules consist of: A set of self-explanatory  Conditions  connected in an  ALL ,  ANY , or  NONE  relation. The  Environment  where your code is deployed and running in which you'd like the alert rule applied. The  Actions  that should be taken when the associated conditions are met. Mainly -- where you'd like to channel this alert. Creating a good set of alert rules means: Identifying the critical show-stopping errors and routing them appropriately (to PagerDuty for instance) so they can be resolved by the right people as soon as possible. Maintaining awareness and visibility to all other errors, in terms of where the alerts are routed to (mail, specific Slack channels) and at what frequency. Generally, we recommend you configure these rules and fine-tune them as you go, adapting to your teams workflows and preferences. With that said, there are some common best practices that you should consider. Selecting Conditions The  New Alert Rule  wizard allows you to compose alert rules combining multiple conditions. These conditions are pretty self explanatory and rely on event  Tags  and  Attributes  values, event  Frequency , and  Issue State  changes. Essentially, allowing you to combine the conditions bellow to fit your specific use-case. Event Tags Tags are key-value pairs that Sentry assigns to each event. Some of the tags are added by default depending on the platform and type of SDK. Developers can also add  Custom Tags  through the SDK. You can find the list of tags available in your project under  [Project Settings] > Tags . The list is an aggregation of all of the tag keys (default and custom) that have been encountered in events in this project. Event tags are useful for various reasons. First, tags are indexed and this allows you to query your errors in the Sentry  Event Stream  and  Issue Stream  based on specific tag values. In addition, adding the right tags in your code will allow you tell Sentry to notify you only when events with specific details occur. To create a rule based on a tag's value, select the condition A tag-based condition can be used as the sole condition for an alert rule or in conjunction with additional conditions to fine tune the rule: In this rule we're leveraging custom tags that our developers added through the Sentry SDK, telling Sentry to notify us via our  #sentry-urgent   Slack  channel when  Enterprise  customers are experiencing errors in critical parts of our application. Event Attributes The alert rule system in Sentry is capable of picking out attributes from an event's payload. There are 15 different kinds of attributes that a rule can target. Those include attributes like:  Error Message ,  Error Type , the  Platform ,  user.id ,  http.method ,  stacktrace.filename , and others. To set an attribute-based condition in your rule, select the condition: In this example, any event with type “SubscriptionError” indicating an error the billing flow will be routed directly to PagerDuty for our on-call engineer to handle. In addition, you can also set up rules that account for multiple different attributes at once, and chain that logic together. In this more advanced example, a notification containing the message, platform, and type attribute values gets routed to the  Android Dev  team in  Slack  if a  RunTimeError  with the message  Failed to Reload Index  comes in from our  Java platform . Event Thresholds Often, it’s necessary to create a rule based on a frequency threshold to help determine the significance of an error’s impact and escalation priority. Among other use-cases, threshold conditions can be set in conjunction with tag and attribute based conditions to indicate a spike in errors in a certain environment, release, or page in your app or package in your code. Sentry provides two threshold conditions based either on the event occurrence or number of affected users: Issue State Changes Every Issue in Sentry has a defined state -  Unresolved ,  Resolved  or  Ignored . Read about  Issue States  for more information. 1. Regression Alert When Sentry captures new event instances of an Issue that was previously marked as…","title":"Creating Custom Rules","description":null,"draft":null,"noindex":null,"notoc":null,"sidebar_order":6,"redirect_from":null,"keywords":null,"id":"5b4dadda-c3b4-5a80-951c-9c667d322460","legacy":false}},"staticQueryHashes":["1218203755","1222113826","1222113826","1766336459","2158593473","2764967025","3345802723","3818502851","3990806462","4015007367","4192517163","4264099332","518019976"]}