Title: [Feature] Change new serializeAttribute option in breadcrumbs to an array · Issue #3738 · getsentry/sentry-javascript · GitHub
Open Graph Title: [Feature] Change new serializeAttribute option in breadcrumbs to an array · Issue #3738 · getsentry/sentry-javascript
X Title: [Feature] Change new serializeAttribute option in breadcrumbs to an array · Issue #3738 · getsentry/sentry-javascript
Description: This amazing property added in #3620 for #3604 is extremely helpful and we could not be more appreciative of this feature! I think it could be taken to the next level in our use cases by changing it to an array. In large, evolving code b...
Open Graph Description: This amazing property added in #3620 for #3604 is extremely helpful and we could not be more appreciative of this feature! I think it could be taken to the next level in our use cases by changing i...
X Description: This amazing property added in #3620 for #3604 is extremely helpful and we could not be more appreciative of this feature! I think it could be taken to the next level in our use cases by changing i...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/3738
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Feature] Change new serializeAttribute option in breadcrumbs to an array","articleBody":"This amazing property added in https://github.com/getsentry/sentry-javascript/pull/3620 for https://github.com/getsentry/sentry-javascript/issues/3604 is extremely helpful and we could not be more appreciative of this feature!\r\n\r\nI think it could be taken to the next level in our use cases by changing it to an array. In large, evolving code bases, elements might not have one single, consistent attribute to choose from and therefore it could be helpful to have a list.\r\n \r\nFor example,\r\n\r\n```js\r\ndom: { \r\n serializeAttribute: [\r\n 'data-testid', // all our good devs using react-testing library\r\n 'aria-label', // attempt to fallback on something recognizable\r\n ],\r\n}\r\n...\r\n```\r\nthen something like,\r\n```js\r\n// packages/utils/src/browser.ts\r\n- const keyAttrValue = keyAttr ? elem.getAttribute(keyAttr) : null;\r\n+ const keyAttrValue = Array.isArray(keyAttr) && keyAttr.length \r\n+ ? elem.getAttribute(keyAttr.find(attr => elem.hasAttribute(attr)))\r\n+ : null;\r\n```\r\n\r\nThanks!\r\n","author":{"url":"https://github.com/CopyJosh","@type":"Person","name":"CopyJosh"},"datePublished":"2021-06-23T12:52:37Z","url":"https://github.com/getsentry/sentry-javascript/issues/3738"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:de465f32-6dd2-97e4-4c8e-be70e77b2a22 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F6C:1C5C1D:2542D05:3201DAD:6B0451D9 |
| html-safe-nonce | d2eb0f955146cbb618917d56c5a5d5f29b32f6fcb4329850f42f2a7f66e1c3cf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjZDOjFDNUMxRDoyNTQyRDA1OjMyMDFEQUQ6NkIwNDUxRDkiLCJ2aXNpdG9yX2lkIjoiODQyNTc0NjAyOTk1MzE3NjAyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7bea5575a14e2d627e80753c50ab0aac83032e3956bdb2caa06c0adaa606a63f |
| hovercard-subject-tag | issue:928224432 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/3738/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aed2bee94bff7881c48bc0883d0b54a50bc27eec56c676161e3cf6fbab540673/getsentry/sentry-javascript/issues/3738 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aed2bee94bff7881c48bc0883d0b54a50bc27eec56c676161e3cf6fbab540673/getsentry/sentry-javascript/issues/3738 |
| og:image:alt | This amazing property added in #3620 for #3604 is extremely helpful and we could not be more appreciative of this feature! I think it could be taken to the next level in our use cases by changing i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | CopyJosh |
| hostname | github.com |
| expected-hostname | github.com |
| None | 910ca0e260cfec6aff11407d8dc6a0d3a4cd381a2ec9ada56627b063426892a0 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e086f9b7e88322eb2b41885a6ad425b215737fa5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width