{"componentChunkName":"component---src-templates-platform-tsx","path":"/platforms/go/guides/gin/usage/","result":{"data":{"file":{"id":"1c23a9ca-32e8-58e6-9cb8-598fe6c06d81","relativePath":"common/usage/index.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\": \"Usage\",\n  \"sidebar_order\": 10,\n  \"excerpt\": \"\",\n  \"description\": \"Use the SDK to manually capture errors and other events.\",\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 Note = makeShortcode(\"Note\");\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, \"Sentry's SDK hooks into your runtime environment and automatically reports errors, exceptions, and rejections.\"), mdx(Note, {\n    mdxType: \"Note\"\n  }, mdx(\"markdown\", null, mdx(\"p\", null, \"Key terms:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"An \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"event\"), \" is one instance of sending data to Sentry. Generally, this data is an error or exception.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"An \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"issue\"), \" is a grouping of similar events.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"The reporting of an event is called \", mdx(\"em\", {\n    parentName: \"li\"\n  }, \"capturing\"), \".\\nWhen an event is captured, it\\u2019s sent to Sentry.\")))), mdx(\"p\", null, \"The most common form of capturing is to capture errors. What can be captured as an error varies by platform. In general, if you have something that looks like an exception it can be captured. For some SDKs you can also omit the argument to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"capture_exception\"), \" and Sentry will attempt to capture the current exception. It can also be useful to manually report errors or messages to Sentry.\"), mdx(\"p\", null, \"Separately to capturing you can also record the breadcrumbs that lead up to an event. Breadcrumbs are different from events: they will not create an event in Sentry, but will be buffered until the next event is sent. Learn more about breadcrumbs in our \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"/platforms/javascript/enriching-events/breadcrumbs/\"\n  }), \"Breadcrumbs documentation\"), \".\"), mdx(\"h2\", {\n    \"id\": \"capturing-errors\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#capturing-errors\",\n    \"aria-label\": \"capturing errors 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  })))), \"Capturing Errors\"), mdx(PlatformContent, {\n    includePath: \"capture-error\",\n    mdxType: \"PlatformContent\"\n  }), mdx(\"h2\", {\n    \"id\": \"capturing-messages\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#capturing-messages\",\n    \"aria-label\": \"capturing messages 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  })))), \"Capturing Messages\"), mdx(\"p\", null, \"Another common operation is to capture a bare message. A message is textual information that should be sent to Sentry. Typically messages are not emitted, but they can be useful for some teams.\"), mdx(PlatformContent, {\n    includePath: \"capture-message\",\n    mdxType: \"PlatformContent\"\n  }));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#capturing-errors","title":"Capturing Errors"},{"url":"#capturing-messages","title":"Capturing Messages"}]},"internal":{"type":"Mdx"}}}},"pageContext":{"excerpt":"Sentry's SDK hooks into your runtime environment and automatically reports errors, exceptions, and rejections. Key terms: An  event  is one instance of sending data to Sentry. Generally, this data is an error or exception. An  issue  is a grouping of similar events. The reporting of an event is called  capturing .\nWhen an event is captured, it’s sent to Sentry. The most common form of capturing is to capture errors. What can be captured as an error varies by platform. In general, if you have something that looks like an exception it can be captured. For some SDKs you can also omit the argument to  capture_exception  and Sentry will attempt to capture the current exception. It can also be useful to manually report errors or messages to Sentry. Separately to capturing you can also record the breadcrumbs that lead up to an event. Breadcrumbs are different from events: they will not create an event in Sentry, but will be buffered until the next event is sent. Learn more about breadcrumbs in our  Breadcrumbs documentation . Capturing Errors Capturing Messages Another common operation is to capture a bare message. A message is textual information that should be sent to Sentry. Typically messages are not emitted, but they can be useful for some teams.","title":"Usage","description":"Use the SDK to manually capture errors and other events.","sidebar_order":10,"notSupported":["native.breakpad","native.crashpad","native.minidumps","native.ue4"],"platform":{"name":"go","title":"Go"},"guide":{"name":"gin","title":"Gin"},"noindex":true,"notoc":true,"redirect_from":[],"id":"1c23a9ca-32e8-58e6-9cb8-598fe6c06d81"}},"staticQueryHashes":["1218203755","1222113826","1222113826","1766336459","2158593473","2404336828","2472290386","2764967025","3818502851","4015007367","4192517163","4264099332","518019976"]}