{"componentChunkName":"component---src-templates-doc-tsx","path":"/product/sentry-basics/environments/","result":{"data":{"file":{"id":"ffb37c05-1c3e-5c94-8cef-9ee84d8b4fbe","relativePath":"product/sentry-basics/environments/index.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\": \"Environments\",\n  \"sidebar_order\": 1,\n  \"redirect_from\": [\"/enriching-error-data/environments/\", \"/learn/environments/\"],\n  \"description\": \"Learn more about how environments can help you better filter issues, releases, and user feedback in the Issue Details page on sentry.io.\"\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 PlatformLink = makeShortcode(\"PlatformLink\");\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, \"Environments help you better filter issues, releases, and user feedback in the Issue Details page of sentry.io. On that page, you can view information about a specific environment, focusing on the most recent release. If you\\u2019re using a multi-staged release process, you can also select a different default environment and set conditions that match the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"environment\"), \" attribute to restrict alerts to only specific release stages. Sentry environments are available for most features \\u2014 excluding Dashboards.\"), mdx(\"p\", null, \"Use projects to separate different services or applications, and environments to separate different environments or release stages within each. If you've selected one or more projects in the global header of Sentry's web UI, the environment selector shows only environments associated with events from the selected projects.\"), 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\": \"1200px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/4f1f959712aee07f50588448e19db633/e04e6/env_dropdown.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,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAIAAADKYVtkAAAACXBIWXMAAAsSAAALEgHS3X78AAAAwklEQVQY02WQ2Y6CQBBF+/9/0Aw40QkiooC91tKbU4IxJt6cp0rfqpNWKeZa6mNNrTXnXEqx1nnnrXHMvM0lj6+otv1tmn3z0x4Pf8t8v46T90DIEIA5yipZLaSU9N0ikLUAQAIjq+7Y9f1w6s79aRgv1/FyW2btHTAlkYqcNoKHaVpCoEUjUTLGnoeb0toRRqMdBLJGVIN3wWjz9PwgRbmdt5RSrTa75qDmyTGJJOJTFcMKAkpZHr1hiuIsxVd9/aZ/epUgXeICas0AAAAASUVORK5CYII=')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"A project's All Environments dropdown expanded to show production and staging as options.\",\n    \"title\": \"A project's All Environments dropdown expanded to show production and staging as options.\",\n    \"src\": \"/static/4f1f959712aee07f50588448e19db633/c1b63/env_dropdown.png\",\n    \"srcSet\": [\"/static/4f1f959712aee07f50588448e19db633/5a46d/env_dropdown.png 300w\", \"/static/4f1f959712aee07f50588448e19db633/0a47e/env_dropdown.png 600w\", \"/static/4f1f959712aee07f50588448e19db633/c1b63/env_dropdown.png 1200w\", \"/static/4f1f959712aee07f50588448e19db633/d61c2/env_dropdown.png 1800w\", \"/static/4f1f959712aee07f50588448e19db633/e04e6/env_dropdown.png 2152w\"],\n    \"sizes\": \"(max-width: 1200px) 100vw, 1200px\",\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, \"Environments are unique to each organization. Environment settings, however, are defined per project since you can hide environments per project.\"), mdx(\"h2\", {\n    \"id\": \"creating-environments\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#creating-environments\",\n    \"aria-label\": \"creating environments 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  })))), \"Creating Environments\"), mdx(\"p\", null, \"Sentry automatically creates environments when it receives an event with the environment tag. Environments are case sensitive. You can also create an environment when you first \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"init\"), \" your SDK, \", mdx(PlatformLink, {\n    to: \"/configuration/environments/\",\n    mdxType: \"PlatformLink\"\n  }, \"as documented for each SDK\"), \".\"), mdx(\"h2\", {\n    \"id\": \"environment-filter\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#environment-filter\",\n    \"aria-label\": \"environment filter 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  })))), \"Environment Filter\"), mdx(\"h3\", {\n    \"id\": \"issues\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#issues\",\n    \"aria-label\": \"issues 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  })))), \"Issues\"), mdx(\"p\", null, \"If an issue has events from multiple environments, the issue will appear when you select any of those environments. Sentry defines an issue as a grouping of similar events. If you tag one or more events within an issue with a specific environment, that issue will appear in your view when filtered by that environment. For example, if an issue is composed of one event tagged with\\xA0\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Production\"), \"\\xA0and one event tagged with\\xA0\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Staging\"), \", the issue will appear in your view when filtering by\\xA0\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Production\"), \",\\xA0as well as by\\xA0\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Staging\"), \".\"), mdx(\"p\", null, \"Also, the environment filter affects all issue-related metrics, such as the count of users affected, times series graphs, and event count.\"), mdx(\"h3\", {\n    \"id\": \"releases\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h3\"\n  }, {\n    \"href\": \"#releases\",\n    \"aria-label\": \"releases 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  })))), \"Releases\"), mdx(\"p\", null, \"A release by itself is not associated with an environment but can be deployed to different environments. When you select an environment on the releases page, it shows releases that were deployed to that environment. For example, a release deployed to the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"QA\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Prod\"), \" environment will appear in your view when filtering by \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"QA\"), \", as well as \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"Prod\"), \". All issue-related metrics within a given release will be affected by the environment filter. A deploy must have an environment.\"), mdx(\"p\", null, \"For more details about configuring releases and deploys, see the \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"/product/releases/\"\n  }), \"full documentation on Releases\"), \".\"), mdx(\"h2\", {\n    \"id\": \"hidden-environments\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#hidden-environments\",\n    \"aria-label\": \"hidden environments 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  })))), \"Hidden Environments\"), mdx(\"p\", null, \"Since you can't delete environments, Sentry has an option to hide it from the UI. Hiding environments can be useful when you're no longer sending events from an environment, or you've accidentally created an environment you no longer want. You can hide environments from your environments dropdown by navigating to \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"Project Settings > Environments\"), \", and selecting \\\"Hide\\\", but events sent to that environment \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"will still count against your quota\"), \".\"), mdx(\"p\", null, \"If a project is hidden, you won't see that environment in the environment selector, unless another project with events from the same environment is also selected (and doesn't have it hidden in its project settings).\"), 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\": \"1114px\"\n    }\n  }), \"\\n      \", mdx(\"a\", _extends({\n    parentName: \"span\"\n  }, {\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/static/da66cea36e790bea2e15028a14a152ba/cd536/env_hidden.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\": \"66.33333333333333%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAIAAAAmMtkJAAAACXBIWXMAAAsSAAALEgHS3X78AAABXUlEQVQoz42S627jIBCF/f4PuNq0aRMb3zHEwGBgBscdsn+qSptm/Gl0hDgcNKZSiz6fPy8fdSu6phYtf017+bgO/bjvd8JM9D+ostZKOY/joLVirRZljAEH3nv6rSo5r6c/4u1v937qvA83vW5bKJmUEekJvKFKcQveRw8pQCY49m0nFi4jPMQ3EB6LntcJLSaoKBmCN7PyxZt5FEN7VXM/T62c2qFvOnFhPQ1i6GvuvKFvr6L+BKsymQqTyUHoZRTNdR678/uJe9fWXVePg4jBEvoHnOY5DZNjvedAuLKZlc/oKNmMBYwmhVsKK1Pu9RPLnfdgtFVKqNWNWaSSM7M4C2UkCZn0hIjFvK6GYb/iIxbtHPAsn4+aSTFViCVZykVrDl+cc8dx3F8o9rOZQowb/9wQATz3+35/3Yy3kimncQKA44XKec+5vNBi3vzmwbMzxpgp/1r/3iYbvwCXR+zK+k3e4QAAAABJRU5ErkJggg==')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  })), \"\\n  \", mdx(\"img\", _extends({\n    parentName: \"a\"\n  }, {\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"The Manage Environments page has two tabs for Environments and Hidden.\",\n    \"title\": \"The Manage Environments page has two tabs for Environments and Hidden.\",\n    \"src\": \"/static/da66cea36e790bea2e15028a14a152ba/cd536/env_hidden.png\",\n    \"srcSet\": [\"/static/da66cea36e790bea2e15028a14a152ba/5a46d/env_hidden.png 300w\", \"/static/da66cea36e790bea2e15028a14a152ba/0a47e/env_hidden.png 600w\", \"/static/da66cea36e790bea2e15028a14a152ba/cd536/env_hidden.png 1114w\"],\n    \"sizes\": \"(max-width: 1114px) 100vw, 1114px\",\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    \")));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#creating-environments","title":"Creating Environments"},{"url":"#environment-filter","title":"Environment Filter","items":[{"url":"#issues","title":"Issues"},{"url":"#releases","title":"Releases"}]},{"url":"#hidden-environments","title":"Hidden Environments"}]},"internal":{"type":"Mdx"}}}},"pageContext":{"excerpt":"Environments help you better filter issues, releases, and user feedback in the Issue Details page of sentry.io. On that page, you can view information about a specific environment, focusing on the most recent release. If you’re using a multi-staged release process, you can also select a different default environment and set conditions that match the  environment  attribute to restrict alerts to only specific release stages. Sentry environments are available for most features — excluding Dashboards. Use projects to separate different services or applications, and environments to separate different environments or release stages within each. If you've selected one or more projects in the global header of Sentry's web UI, the environment selector shows only environments associated with events from the selected projects. Environments are unique to each organization. Environment settings, however, are defined per project since you can hide environments per project. Creating Environments Sentry automatically creates environments when it receives an event with the environment tag. Environments are case sensitive. You can also create an environment when you first  init  your SDK,  as documented for each SDK . Environment Filter Issues If an issue has events from multiple environments, the issue will appear when you select any of those environments. Sentry defines an issue as a grouping of similar events. If you tag one or more events within an issue with a specific environment, that issue will appear in your view when filtered by that environment. For example, if an issue is composed of one event tagged with  Production  and one event tagged with  Staging , the issue will appear in your view when filtering by  Production , as well as by  Staging . Also, the environment filter affects all issue-related metrics, such as the count of users affected, times series graphs, and event count. Releases A release by itself is not associated with an environment but can be deployed to different environments. When you select an environment on the releases page, it shows releases that were deployed to that environment. For example, a release deployed to the  QA  and  Prod  environment will appear in your view when filtering by  QA , as well as  Prod . All issue-related metrics within a given release will be affected by the environment filter. A deploy must have an environment. For more details about configuring releases and deploys, see the  full documentation on Releases . Hidden Environments Since you can't delete environments, Sentry has an option to hide it from the UI. Hiding environments can be useful when you're no longer sending events from an environment, or you've accidentally created an environment you no longer want. You can hide environments from your environments dropdown by navigating to  Project Settings > Environments , and selecting \"Hide\", but events sent to that environment  will still count against your quota . If a project is hidden, you won't see that environment in the environment selector, unless another project with events from the same environment is also selected (and doesn't have it hidden in its project settings).","title":"Environments","description":"Learn more about how environments can help you better filter issues, releases, and user feedback in the Issue Details page on sentry.io.","draft":null,"noindex":null,"notoc":null,"sidebar_order":1,"redirect_from":["/enriching-error-data/environments/","/learn/environments/"],"keywords":null,"id":"ffb37c05-1c3e-5c94-8cef-9ee84d8b4fbe","legacy":false}},"staticQueryHashes":["1218203755","1222113826","1222113826","1766336459","2158593473","2764967025","3345802723","3818502851","3990806462","4015007367","4192517163","4264099332","518019976"]}