{"componentChunkName":"component---src-templates-platform-tsx","path":"/platforms/python/guides/serverless/enriching-events/identify-user/","result":{"data":{"file":{"id":"d7ecda83-25f4-5a1b-8fac-4a330a38b5fd","relativePath":"common/enriching-events/identify-user.mdx","sourceInstanceName":"platforms","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\": \"Identify Users\",\n  \"sidebar_order\": 2,\n  \"notSupported\": [\"native.breakpad\", \"native.crashpad\", \"native.minidumps\", \"native.ue4\"]\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 PlatformContent = makeShortcode(\"PlatformContent\");\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, \"Users consist of a few critical pieces of information that construct a unique identity in Sentry. Each of these is optional, but one \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"must\"), \" be present for the Sentry SDK to capture the user:\"), mdx(\"p\", null, mdx(\"dl\", {\n    parentName: \"p\"\n  }, mdx(\"dt\", {\n    parentName: \"dl\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"dt\"\n  }, \"id\")), mdx(\"dd\", {\n    parentName: \"dl\"\n  }, \"Your internal identifier for the user.\"))), mdx(\"p\", null, mdx(\"dl\", {\n    parentName: \"p\"\n  }, mdx(\"dt\", {\n    parentName: \"dl\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"dt\"\n  }, \"username\")), mdx(\"dd\", {\n    parentName: \"dl\"\n  }, \"The username. Typically used as a better label than the internal id.\"))), mdx(\"p\", null, mdx(\"dl\", {\n    parentName: \"p\"\n  }, mdx(\"dt\", {\n    parentName: \"dl\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"dt\"\n  }, \"email\")), mdx(\"dd\", {\n    parentName: \"dl\"\n  }, \"An alternative (or addition) to the username. Sentry is aware of email addresses and can display things such as Gravatars and unlock messaging capabilities.\"))), mdx(\"p\", null, mdx(\"dl\", {\n    parentName: \"p\"\n  }, mdx(\"dt\", {\n    parentName: \"dl\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"dt\"\n  }, \"ip_address\")), mdx(\"dd\", {\n    parentName: \"dl\"\n  }, \"The user's IP address. If the user is unauthenticated, Sentry uses the IP address as a unique identifier for the user. Sentry will attempt to pull this from the HTTP request data, if available.\"))), mdx(\"p\", null, \"To identify the user:\"), mdx(PlatformContent, {\n    includePath: \"set-user\",\n    mdxType: \"PlatformContent\"\n  }), mdx(\"p\", null, \"Additional key/value pairs can be specified as metadata and the Sentry SDK will store those with the user.\"), mdx(PlatformContent, {\n    includePath: \"unset-user\",\n    mdxType: \"PlatformContent\"\n  }, mdx(\"markdown\", null, mdx(\"p\", null, \"You can also clear the currently set user:\"))));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{},"internal":{"type":"Mdx"}}}},"pageContext":{"excerpt":"Users consist of a few critical pieces of information that construct a unique identity in Sentry. Each of these is optional, but one  must  be present for the Sentry SDK to capture the user: id : Your internal identifier for the user. username : The username. Typically used as a better label than the internal id. email : An alternative (or addition) to the username. Sentry is aware of email addresses and can display things such as Gravatars and unlock messaging capabilities. ip_address : The user's IP address. If the user is unauthenticated, Sentry uses the IP address as a unique identifier for the user. Sentry will attempt to pull this from the HTTP request data, if available. To identify the user: Additional key/value pairs can be specified as metadata and the Sentry SDK will store those with the user. You can also clear the currently set user:","title":"Identify Users","sidebar_order":2,"notSupported":["native.breakpad","native.crashpad","native.minidumps","native.ue4"],"platform":{"name":"python","title":"Python"},"guide":{"name":"serverless","title":"Serverless"},"noindex":true,"notoc":true,"redirect_from":[],"id":"d7ecda83-25f4-5a1b-8fac-4a330a38b5fd"}},"staticQueryHashes":["1218203755","1222113826","1222113826","1766336459","2158593473","2404336828","2472290386","2764967025","3818502851","4015007367","4192517163","4264099332","518019976"]}