{"componentChunkName":"component---src-templates-doc-tsx","path":"/product/relay/modes/","result":{"data":{"file":{"id":"927af0b3-4d8e-5ef9-8122-5bcdaeb5ae94","relativePath":"product/relay/modes.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\": \"Relay Modes\",\n  \"description\": \"Relay can operate in different modes depending on your organization's needs.\",\n  \"sidebar_order\": 2,\n  \"redirect_from\": [\"/meta/relay/modes/\"]\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 Alert = makeShortcode(\"Alert\");\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, \"Relay can operate in one of several major modes, and it is critical to understand the modes prior if you are configuring the Relay server rather than using the default settings.\"), mdx(\"p\", null, \"The mode is stored in the configuration file, which contains the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"relay.mode\"), \" field. This field specifies the mode in which Relay will run: \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"managed\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"static\"), \", or \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"proxy\"), \". The Relay mode controls the way Relay obtains project settings for events.\"), mdx(\"p\", null, \"In Sentry, event processing is configured according to both project and organization settings. Some settings, such as privacy controls, are set at the organization level, then inherited by all projects in that organization; other settings are specified per project. For Relay, events are processed according to the inherited project settings to which the event is sent.\"), mdx(\"p\", null, \"Configuration for Relay is refreshed in regular intervals by polling Sentry. Sentry does not need line-of-sight to your Relays. See \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"/product/relay/options/\"\n  }), \"Configuration Options\"), \" regarding configuration of intervals, timeouts, and retries.\"), mdx(\"h2\", {\n    \"id\": \"managed-mode\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#managed-mode\",\n    \"aria-label\": \"managed mode 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  })))), \"Managed Mode\"), mdx(\"p\", null, \"Managed is Relay's default mode. Because settings are obtained from Sentry, authentication is required in this mode. If authentication fails, no events will be accepted by Relay.\"), mdx(\"p\", null, \"As Relay receives events from your applications, it will request project\\nsettings from Sentry to process the events. If Sentry is unable to provide\\nthe settings for a particular project, all data for that project will\\nbe discarded.\"), mdx(\"p\", null, \"To activate managed mode, set this configuration:\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"yaml\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"yaml\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-yaml\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-yaml\"\n  }), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"relay\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \"\\n  \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"mode\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \" managed\")))))), mdx(\"h2\", {\n    \"id\": \"static-mode\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#static-mode\",\n    \"aria-label\": \"static mode 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  })))), \"Static Mode\"), mdx(\"p\", null, \"In static mode, projects must be configured manually. In this mode, Relay will process events for only statically configured projects, and reject events for all other projects.\"), mdx(\"p\", null, \"This mode is useful when you know the projects sending events and you need to explicitly control the projects allowed to send events through this Relay.\"), mdx(Alert, {\n    level: \"info\",\n    title: \"Note\",\n    mdxType: \"Alert\"\n  }, mdx(\"p\", null, \"In \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"static\"), \" mode, Relay does not register with upstream since it does not query\\ninformation from it. After processing events for configured projects, it\\nforwards them upstream with the authentication information (DSN) set by\\nthe client that sent the original request.\")), mdx(\"p\", null, \"To activate static mode, set this configuration:\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"yaml\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"yaml\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-yaml\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-yaml\"\n  }), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"relay\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \"\\n  \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"mode\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \" static\")))))), mdx(\"p\", null, \"To configure projects, add files using the format \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"projects/<PROJECT_ID>.json\"), \" to your Relay configuration folder. For a description of the contents of this file,\\nrefer to \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"/product/relay/projects/\"\n  }), \"Project Configuration\"), \".\"), mdx(\"h2\", {\n    \"id\": \"proxy-mode\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#proxy-mode\",\n    \"aria-label\": \"proxy mode 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  })))), \"Proxy Mode\"), mdx(\"p\", null, \"Proxy mode is similar to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"static\"), \" mode, but it forwards events from unknown\\nprojects. In this mode, events for statically configured projects are handled\\nidentically to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"static\"), \" mode. Events for unknown projects -- projects for which\\nthere are no statically configured settings -- are forwarded (proxied) with\\nminimal processing.\"), mdx(Alert, {\n    level: \"info\",\n    title: \"Rate Limiting\",\n    mdxType: \"Alert\"\n  }, mdx(\"p\", null, \"Rate limiting is still applied in \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"proxy\"), \" mode for all projects,\\nregardless of whether they are statically configured or proxied.\")), mdx(\"p\", null, \"To activate proxy mode, set this configuration:\"), mdx(\"div\", {\n    \"className\": \"code-tabs-wrapper\"\n  }, mdx(CodeTabs, {\n    mdxType: \"CodeTabs\"\n  }, mdx(CodeBlock, {\n    language: \"yaml\",\n    title: \"\",\n    filename: \"\",\n    mdxType: \"CodeBlock\"\n  }, mdx(\"div\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"gatsby-highlight\",\n    \"data-language\": \"yaml\"\n  }), mdx(\"pre\", _extends({\n    parentName: \"div\"\n  }, {\n    \"className\": \"language-yaml\"\n  }), mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-yaml\"\n  }), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"relay\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \"\\n  \", mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token key atrule\"\n  }), \"mode\"), mdx(\"span\", _extends({\n    parentName: \"code\"\n  }, {\n    \"className\": \"token punctuation\"\n  }), \":\"), \" proxy\")))))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#managed-mode","title":"Managed Mode"},{"url":"#static-mode","title":"Static Mode"},{"url":"#proxy-mode","title":"Proxy Mode"}]},"internal":{"type":"Mdx"}}}},"pageContext":{"excerpt":"Relay can operate in one of several major modes, and it is critical to understand the modes prior if you are configuring the Relay server rather than using the default settings. The mode is stored in the configuration file, which contains the  relay.mode  field. This field specifies the mode in which Relay will run:  managed ,  static , or  proxy . The Relay mode controls the way Relay obtains project settings for events. In Sentry, event processing is configured according to both project and organization settings. Some settings, such as privacy controls, are set at the organization level, then inherited by all projects in that organization; other settings are specified per project. For Relay, events are processed according to the inherited project settings to which the event is sent. Configuration for Relay is refreshed in regular intervals by polling Sentry. Sentry does not need line-of-sight to your Relays. See  Configuration Options  regarding configuration of intervals, timeouts, and retries. Managed Mode Managed is Relay's default mode. Because settings are obtained from Sentry, authentication is required in this mode. If authentication fails, no events will be accepted by Relay. As Relay receives events from your applications, it will request project\nsettings from Sentry to process the events. If Sentry is unable to provide\nthe settings for a particular project, all data for that project will\nbe discarded. To activate managed mode, set this configuration: Static Mode In static mode, projects must be configured manually. In this mode, Relay will process events for only statically configured projects, and reject events for all other projects. This mode is useful when you know the projects sending events and you need to explicitly control the projects allowed to send events through this Relay. In  static  mode, Relay does not register with upstream since it does not query\ninformation from it. After processing events for configured projects, it\nforwards them upstream with the authentication information (DSN) set by\nthe client that sent the original request. To activate static mode, set this configuration: To configure projects, add files using the format  projects/<PROJECT_ID>.json  to your Relay configuration folder. For a description of the contents of this file,\nrefer to  Project Configuration . Proxy Mode Proxy mode is similar to  static  mode, but it forwards events from unknown\nprojects. In this mode, events for statically configured projects are handled\nidentically to  static  mode. Events for unknown projects -- projects for which\nthere are no statically configured settings -- are forwarded (proxied) with\nminimal processing. Rate limiting is still applied in  proxy  mode for all projects,\nregardless of whether they are statically configured or proxied. To activate proxy mode, set this configuration:","title":"Relay Modes","description":"Relay can operate in different modes depending on your organization's needs.","draft":null,"noindex":null,"notoc":null,"sidebar_order":2,"redirect_from":["/meta/relay/modes/"],"keywords":null,"id":"927af0b3-4d8e-5ef9-8122-5bcdaeb5ae94","legacy":false}},"staticQueryHashes":["1218203755","1222113826","1222113826","1766336459","2158593473","2764967025","3345802723","3818502851","3990806462","4015007367","4192517163","4264099332","518019976"]}