Title: Improve SDK API · Issue #4272 · getsentry/sentry-javascript · GitHub
Open Graph Title: Improve SDK API · Issue #4272 · getsentry/sentry-javascript
X Title: Improve SDK API · Issue #4272 · getsentry/sentry-javascript
Description: Following the request from @AbhiPrasad getsentry/sentry-fullstory#60 (comment) Related to: getsentry/sentry-fullstory#60 Context What would be the easiest way we can extract most of the code from this package that would allow people to c...
Open Graph Description: Following the request from @AbhiPrasad getsentry/sentry-fullstory#60 (comment) Related to: getsentry/sentry-fullstory#60 Context What would be the easiest way we can extract most of the code from t...
X Description: Following the request from @AbhiPrasad getsentry/sentry-fullstory#60 (comment) Related to: getsentry/sentry-fullstory#60 Context What would be the easiest way we can extract most of the code from t...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/4272
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve SDK API","articleBody":"Following the request from @AbhiPrasad https://github.com/getsentry/sentry-fullstory/pull/60#discussion_r767213486\r\n\r\nRelated to: https://github.com/getsentry/sentry-fullstory/pull/60\r\n\r\n\r\n## Context\r\n\r\nWhat would be the easiest way we can extract most of the code from this package that would allow people to create `sentry-segment` or `sentry-fullstory` from scratch?\r\n\r\nRight now they are multiple things happening around the Fullstory itself (if you think about it), that some people (like me) feel the need to extend this one because of fear of maintaining the other code and things could break and requires them to be on top of Sentry SDK (except that Sentry owns these stuff right now).\r\n\r\nSo the simpler we make it for others to take advantage of such boilerplate code, the easier is to justify to them that they can put a tiny JS in their codebase and own it.\r\n\r\n## Observation\r\n\r\nAlthough once you read the codebase it makes sense the following https://github.com/getsentry/sentry-fullstory having files like `utils` or some part of the plugin feels like a sign that the SDK is lacking some helper functions to accomplish common things.\r\n\r\nFor example,\r\n\r\nGet the project ID from a Sentry DSN: https://github.com/getsentry/sentry-fullstory/blob/a5c11c837e3b1a7fe1be244598b227b542eec567/src/util.ts#L3-L9 \r\n\r\nWhich is used in another function: https://github.com/getsentry/sentry-fullstory/blob/a5c11c837e3b1a7fe1be244598b227b542eec567/src/SentryFullStory.ts#L36-L56\r\n\r\nThat would even remove the need for such a function since \"getting the Sentry URL\" feels like a common thing to do if you are interested in sending data to other places that correlate to Sentry errors somehow such as analytics events.\r\n\r\nOr doing things like https://github.com/getsentry/sentry-fullstory/blob/a5c11c837e3b1a7fe1be244598b227b542eec567/src/SentryFullStory.ts#L59-L60\r\n\r\n> \"// Run the integration ONLY when it was installed on the current Hub AND isn't a transaction\"\r\n\r\nI still don't know what that means precisely but it seems something important, so a combination of documentation and SDK API should help with this use case (it possible exists, so take it with a grain of salt)\r\n\r\n\r\nFinally,\r\n\r\nGet the message and name properties from the original exception:\r\nhttps://github.com/getsentry/sentry-fullstory/blob/a5c11c837e3b1a7fe1be244598b227b542eec567/src/util.ts#L15-L27\r\n\r\nThat sounds like something that people would be interested in if they want to send some information about the error to another system, so definitely really handy for systems that are trying to integrate with Sentry.","author":{"url":"https://github.com/yordis","@type":"Person","name":"yordis"},"datePublished":"2021-12-12T03:22:09Z","url":"https://github.com/getsentry/sentry-javascript/issues/4272"}
| 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:96139129-a72b-d90c-a92c-655014d2841a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C754:21169F:3669C:47318:6B042FAE |
| html-safe-nonce | 976d7526d95fca66db87f46aeb993576a2849ba25627bc30f95dc5099289e57b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzU0OjIxMTY5RjozNjY5Qzo0NzMxODo2QjA0MkZBRSIsInZpc2l0b3JfaWQiOiIzMzE0NDE3MzgyMTI2MjY4MzM0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b57122c45503ef0d4512821b15ea757e7a35dec4a244c01a8fdd53f20a769b7a |
| hovercard-subject-tag | issue:1077706664 |
| 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/4272/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c16e57ab8f800ddac4dfe8f6ea40d5eb5b84505455bbab6a809a58cbf87a0e88/getsentry/sentry-javascript/issues/4272 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c16e57ab8f800ddac4dfe8f6ea40d5eb5b84505455bbab6a809a58cbf87a0e88/getsentry/sentry-javascript/issues/4272 |
| og:image:alt | Following the request from @AbhiPrasad getsentry/sentry-fullstory#60 (comment) Related to: getsentry/sentry-fullstory#60 Context What would be the easiest way we can extract most of the code from t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yordis |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| 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 | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| 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