Title: Custom Instrumentation is Not working with New APIs in V8 · Issue #13470 · getsentry/sentry-javascript · GitHub
Open Graph Title: Custom Instrumentation is Not working with New APIs in V8 · Issue #13470 · getsentry/sentry-javascript
X Title: Custom Instrumentation is Not working with New APIs in V8 · Issue #13470 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/13470
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Custom Instrumentation is Not working with New APIs in V8","articleBody":"### Is there an existing issue for this?\n\n- [x] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\n- [x] I have reviewed the documentation https://docs.sentry.io/\n- [x] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\n\n### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Which SDK are you using?\n\n@sentry/browser\n\n### SDK Version\n\n8.116.0\n\n### Framework Version\n\nReact SadK 8.116.0\n\n### Link to Sentry event\n\nhttps://hrc-t3.sentry.io/performance/?project=4507842173861888&query=&referrer=performance-transaction-summary&showTransactions=recent&source=performance_transaction_summary&statsPeriod=14d&unselectedSeries=p100%28%29&unselectedSeries=avg%28%29\n\n### Reproduction Example/SDK Setup\n\nSentry Instrument.js file - we have added the sentry Intialization\n\n```\nSentry.init({\n dsn: \"https://c556b54f@o3312.ingest.us.sentry.io/450888\",\n debug:true,\n integrations: [\n // See docs for support of different versions of variation of react router\n // https://docs.sentry.io/platforms/javascript/guides/react/configuration/integrations/react-router/\n Sentry.reactRouterV6BrowserTracingIntegration({\n useEffect,\n useLocation,\n useNavigationType,\n createRoutesFromChildren,\n matchRoutes,\n }),\n Sentry.replayIntegration(),\n ],\n\n // Set tracesSampleRate to 1.0 to capture 100%\n // of transactions for tracing.\n tracesSampleRate: 1.0,\n\n // Set tracePropagationTargets to control for which URLs trace propagation should be enabled\n tracePropagationTargets: [/^\\//, /^https:\\/\\/localhost\\/api/],\n\n // Capture Replay for 10% of all sessions,\n // plus for 100% of sessions with an error\n replaysSessionSampleRate: 0.1,\n replaysOnErrorSampleRate: 1.0,\n});\n```\n\n### Steps to Reproduce\n\n1. Custom Instrumentation: We are looking for custom instrumentation to determine the htp request, UI thread and others request in a single group of spans/transaction\nIn Version7.XX> this feature was available using startTransaction and end the transaction anywhere after custom logic of code\n\n2. In Newer version. - With startSpan, startSpanManual, or startInActiveSpan() - all these are starting the span correctly, and ending in callback - working fine,\n\nRequirment:\nWe dont want to close the span immediately after callback end. To be precise, we want to have any callback as well. \nExample: start the user journey span at one component \nlets says Component 1 - startSpan()\n\nBut performing few actives - like filling a form of 4-5 components\n\nWant to close this span and need to have the entire user journey - HTTP request, UI, component timing, loading images resources script ,etc loading\nClosing can be at component 5 .\n\nThis we are not able to achieve as callback cannot be single-line. startIdelSpan() - this is also not working.\nStartInActiveSpa ()- this works fine but do not capture any http request, resources script etc.\n\nComponet1: \n\n```\nconst handleAddLabelClick = () => {\n console.log(\"handleAddLabelClick, start sentry transaction\");\n captureSentryObservabilityStart();\n };\n```\n\n\nComponent 5:\n\n```\n const handleSave = async () => {\n // Handle Save sentry closed\n captureSentryObservabilityEnd();\n };\n\n\ncaptureSentryObservabilityStart = () => {\n Sentry.continueTrace({ sentryTrace: '', baggage: '' }, function (){\n return Sentry.withActiveSpan(null,function(){\n parentMenuClicked = Sentry.startInactiveSpan({\n op: \"menuclicked\",\n name: entityName,\n attributes: {\n entityName: entityName\n },\n forceTransaction: true,\n });\n });\n}\n\n\ncaptureSentryObservabilityEnd = () => {\n Sentry.withActiveSpan(parentMenuClicked, function(){\n childSpanOnParent = Sentry.startInactiveSpan({\n name: \"gridload\",\n description: entityPropertyName,\n parentSpan: parentMenuClicked,\n parentSpanId: parentMenuClicked.spanId,\n op: \"gridload\"\n });\n });\n\n}\n```\nReference link: https://github.com/getsentry/sentry-javascript/issues/12222\n\n### Expected Result\n\nIn my Transaction - it should able to track all the HTTP request , reasoucrs, script, etc\n\n### Actual Result\n\nIn my Transaction - it should able to track all the HTTP request , reasoucrs, script, etc","author":{"url":"https://github.com/an-and10","@type":"Person","name":"an-and10"},"datePublished":"2024-08-27T08:04:45Z","url":"https://github.com/getsentry/sentry-javascript/issues/13470"}
| 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:11da2821-a53d-9572-dac7-7b1a0e1c790b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B844:5B106:3A73DD:4E9779:6B051B48 |
| html-safe-nonce | b705a0f0f7d65d9e266f392bb246a767cfd676dc287b222240989a99dd07bb01 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODQ0OjVCMTA2OjNBNzNERDo0RTk3Nzk6NkIwNTFCNDgiLCJ2aXNpdG9yX2lkIjoiODQyMTg5Nzg1MDkyNTE2MTI4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d2720ac61aa33d2936de4b2dd5e6b9818a872cde7e73bf5b8f439cf4a8559593 |
| hovercard-subject-tag | issue:2488595827 |
| 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/13470/issue_layout |
| twitter:image | https://opengraph.githubassets.com/42e2add38fbd65847855fe2f79afbbea5af26b3074eb050e349388e2fa073c1d/getsentry/sentry-javascript/issues/13470 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/42e2add38fbd65847855fe2f79afbbea5af26b3074eb050e349388e2fa073c1d/getsentry/sentry-javascript/issues/13470 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | an-and10 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b |
| 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 | 220e980097d94ce616d5d11fbd5316d208e3fc93 |
| 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