{"componentChunkName":"component---src-templates-platform-tsx","path":"/platforms/ruby/guides/rack/data-management/event-grouping/sdk-fingerprinting/","result":{"data":{"file":{"id":"b7947981-029e-55f2-9a4a-81347edd40e8","relativePath":"common/data-management/event-grouping/sdk-fingerprinting.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\": \"SDK Fingerprinting\",\n  \"sidebar_order\": 0,\n  \"redirect_from\": [\"../../../enriching-events/context/fingerprint-override/\"]\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, \"In supported SDKs, you can override the Sentry default grouping passing the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"fingerprint\"), \" attribute an array of strings. This works similar to the \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"../server-side-fingerprinting/\"\n  }), \"server side functionality\"), \" which is always available and\\ncan achieve similar results.\"), mdx(PlatformContent, {\n    includePath: \"set-fingerprint/basic\",\n    mdxType: \"PlatformContent\"\n  }, mdx(\"h2\", {\n    \"id\": \"basic-example\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#basic-example\",\n    \"aria-label\": \"basic example 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  })))), \"Basic Example\"), mdx(\"p\", null, \"In the most basic of cases, values are passed directly:\")), mdx(\"p\", null, \"You can use variable substitution to fill dynamic values into the fingerprint that are normally computed on the server. For instance, the value \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"{{ default }}\"), \" can be added to add the entire normally generated grouping hash into the fingerprint. These values are the same as for server side fingerprinting. See \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"../server-side-fingerprinting/#variables\"\n  }), \"Variables\"), \" for more information.\"), mdx(PlatformContent, {\n    includePath: \"set-fingerprint/rpc\",\n    mdxType: \"PlatformContent\"\n  }, mdx(\"h2\", {\n    \"id\": \"group-errors-with-greater-granularity\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#group-errors-with-greater-granularity\",\n    \"aria-label\": \"group errors with greater granularity 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  })))), \"Group Errors With Greater Granularity\"), mdx(\"p\", null, \"Your application queries an RPC interface or external API service, so the stack trace is generally the same (even if the outgoing request is very different).\"), mdx(\"p\", null, \"The following example will split up the default group Sentry would create (represented by \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"{{ default }}\"), \") further, taking some attributes on the error object into account:\")), mdx(PlatformContent, {\n    includePath: \"set-fingerprint/database-connection\",\n    mdxType: \"PlatformContent\"\n  }, mdx(\"h2\", {\n    \"id\": \"group-errors-more-aggressively\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", _extends({\n    parentName: \"h2\"\n  }, {\n    \"href\": \"#group-errors-more-aggressively\",\n    \"aria-label\": \"group errors more aggressively 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  })))), \"Group Errors More Aggressively\"), mdx(\"p\", null, \"A generic error, such as a database connection error, has many different stack traces and never groups together.\"), mdx(\"p\", null, \"The following example will just completely overwrite Sentry's grouping by omitting \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"{{ default }}\"), \" from the array:\")));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#basic-example","title":"Basic Example"},{"url":"#group-errors-with-greater-granularity","title":"Group Errors With Greater Granularity"},{"url":"#group-errors-more-aggressively","title":"Group Errors More Aggressively"}]},"internal":{"type":"Mdx"}}}},"pageContext":{"excerpt":"In supported SDKs, you can override the Sentry default grouping passing the  fingerprint  attribute an array of strings. This works similar to the  server side functionality  which is always available and\ncan achieve similar results. Basic Example In the most basic of cases, values are passed directly: You can use variable substitution to fill dynamic values into the fingerprint that are normally computed on the server. For instance, the value  {{ default }}  can be added to add the entire normally generated grouping hash into the fingerprint. These values are the same as for server side fingerprinting. See  Variables  for more information. Group Errors With Greater Granularity Your application queries an RPC interface or external API service, so the stack trace is generally the same (even if the outgoing request is very different). The following example will split up the default group Sentry would create (represented by  {{ default }} ) further, taking some attributes on the error object into account: Group Errors More Aggressively A generic error, such as a database connection error, has many different stack traces and never groups together. The following example will just completely overwrite Sentry's grouping by omitting  {{ default }}  from the array:","title":"SDK Fingerprinting","redirect_from":[],"platform":{"name":"ruby","title":"Ruby"},"guide":{"name":"rack","title":"Rack Middleware"},"noindex":true,"notoc":true,"id":"b7947981-029e-55f2-9a4a-81347edd40e8"}},"staticQueryHashes":["1218203755","1222113826","1222113826","1766336459","2158593473","2404336828","2472290386","2764967025","3818502851","4015007367","4192517163","4264099332","518019976"]}