René's URL Explorer Experiment


Title: `@sentry/serverless` does not send Error events on crashes (GCP Function) · Issue #3387 · getsentry/sentry-javascript · GitHub

Open Graph Title: `@sentry/serverless` does not send Error events on crashes (GCP Function) · Issue #3387 · getsentry/sentry-javascript

X Title: `@sentry/serverless` does not send Error events on crashes (GCP Function) · Issue #3387 · getsentry/sentry-javascript

Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javascript/releases Provide a link to the aff...

Open Graph Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...

X Description: Review the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...

Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/3387

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`@sentry/serverless` does not send Error events on crashes (GCP Function)","articleBody":"\u003c!-- Requirements: please go through this checklist before opening a new issue -->\r\n\r\n- [x] Review the documentation: https://docs.sentry.io/\r\n- [x] Search for existing issues: https://github.com/getsentry/sentry-javascript/issues\r\n- [x] Use the latest release: https://github.com/getsentry/sentry-javascript/releases\r\n- [x] Provide a link to the affected event from your Sentry account\r\n\r\n## Package + Version\r\n\r\nUsing:\r\n- `@sentry/serverless@6.2.5`\r\n- `@sentry/tracing@6.2.5`\r\n\r\n## Description\r\n\r\nWhen using `@sentry/serverless`, uncaught exception are not sent to Sentry when hosted on GCP Functions (or when executed locally using `@google-cloud/functions-framework` package). Here is the basic code I have for this integration:\r\n\r\n```ts\r\nimport * as Sentry from '@sentry/serverless'\r\nimport * as SentryTracing from '@sentry/tracing'\r\nimport { HttpFunction } from '@google-cloud/functions-framework/build/src/functions'\r\n\r\n// Necessary so Sentry doesn't crash on error (because of Webpack tree-shaking)\r\nSentryTracing.addExtensionMethods()\r\n\r\nSentry.GCPFunction.init({\r\n  dsn: 'SENTRY_DSN_HERE',\r\n  tracesSampleRate: 1.0,\r\n  environment: 'development',\r\n  debug: true,\r\n})\r\n\r\nconst myHandler: HttpFunction = async (req, res) => {\r\n  if (req.method === 'POST') {\r\n    throw new Error('Dummy function error')\r\n  }\r\n\r\n  // Rest of code...\r\n}\r\n\r\nexport const myFunc = Sentry.GCPFunction.wrapHttpFunction(myHandler)\r\n```\r\n\r\nWhen running this locally, here is the output I get when calling this with a manual POST request (it doesn't work either when deployed on GCP Functions):\r\n\r\n```\r\nSentry Logger [Log]: Integration installed: InboundFilters\r\nSentry Logger [Log]: Integration installed: FunctionToString\r\nSentry Logger [Log]: Integration installed: Console\r\nSentry Logger [Log]: Integration installed: Http\r\nSentry Logger [Log]: Integration installed: OnUncaughtException\r\nSentry Logger [Log]: Integration installed: OnUnhandledRejection\r\nSentry Logger [Log]: Integration installed: LinkedErrors\r\nSentry Logger [Log]: Integration installed: GoogleCloudHttp\r\nSentry Logger [Log]: Integration installed: GoogleCloudGrpc\r\nServing function...\r\nFunction: contactUs\r\nURL: http://localhost:8081/\r\nSentry Logger [Log]: [Tracing] starting gcp.function.http transaction - POST /\r\nThis error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:\r\nError: Dummy function error\r\n    at /Users/username/Projects/projectName/packages/functions-contact-us/dist/index.js:2:560827\r\n    at /Users/username/Projects/projectName/packages/functions-contact-us/dist/index.js:2:561650\r\n    at /Users/username/Projects/projectName/packages/functions-contact-us/dist/index.js:2:60124\r\n    at /Users/username/Projects/projectName/packages/functions-contact-us/dist/index.js:2:54696\r\n    at Object.apply (/Users/username/Projects/projectName/packages/functions-contact-us/dist/index.js:2:54787)\r\n    at /Users/username/Projects/projectName/node_modules/@google-cloud/functions-framework/build/src/invoker.js:100:17\r\n    at processTicksAndRejections (internal/process/task_queues.js:79:11)\r\nUnhandled rejection\r\nError: Dummy function error\r\n    at /Users/username/Projects/projectName/packages/functions-contact-us/dist/index.js:2:560827\r\n    at /Users/username/Projects/projectName/packages/functions-contact-us/dist/index.js:2:561650\r\n    at /Users/username/Projects/projectName/packages/functions-contact-us/dist/index.js:2:60124\r\n    at /Users/username/Projects/projectName/packages/functions-contact-us/dist/index.js:2:54696\r\n    at Object.apply (/Users/username/Projects/projectName/packages/functions-contact-us/dist/index.js:2:54787)\r\n    at /Users/username/Projects/projectName/node_modules/@google-cloud/functions-framework/build/src/invoker.js:100:17\r\n    at processTicksAndRejections (internal/process/task_queues.js:79:11)\r\nError: Process exited with code 16\r\n    at process.\u003canonymous> (/Users/username/Projects/projectName/node_modules/@google-cloud/functions-framework/build/src/invoker.js:275:22)\r\n    at process.emit (events.js:314:20)\r\n    at process.EventEmitter.emit (domain.js:483:12)\r\n    at process.exit (internal/process/per_thread.js:168:15)\r\n    at Object.sendCrashResponse (/Users/username/Projects/projectName/node_modules/@google-cloud/functions-framework/build/src/logger.js:37:9)\r\n    at process.\u003canonymous> (/Users/username/Projects/projectName/node_modules/@google-cloud/functions-framework/build/src/invoker.js:271:22)\r\n    at process.emit (events.js:326:22)\r\n    at process.EventEmitter.emit (domain.js:483:12)\r\n    at processPromiseRejections (internal/process/promises.js:209:33)\r\n    at processTicksAndRejections (internal/process/task_queues.js:98:32)\r\n```\r\n\r\nIf I manually use `Sentry.captureException(error)`, errors are sent correctly to Sentry, but just instrumenting the code as in the Sentry GCP documentation just doesn't track the errors at all. Also, I don't know if it is normal that I get the same error twice in the console logs.\r\n\r\nI honestly don't understand what is going on and feel like I will need to manually annotate my code with try/catch and `Sentry.captureException(error)` everywhere in order for the Crash reporting to work... However, this should all be done automatically by `@sentry/serverless`.","author":{"url":"https://github.com/alexbchr","@type":"Person","name":"alexbchr"},"datePublished":"2021-04-12T17:26:00Z","url":"https://github.com/getsentry/sentry-javascript/issues/3387"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ae35d66f-f14d-91be-c89d-aa4cdd73c4b8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD5EC:2843FB:4811CF:62BAEB:6B047051
html-safe-nonce50e4263b98e8a32c27b99972897b569f719b58f812215ad718081d8eec83c45f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUVDOjI4NDNGQjo0ODExQ0Y6NjJCQUVCOjZCMDQ3MDUxIiwidmlzaXRvcl9pZCI6IjEyNzY2NTAzNDg3Mzk4NTAzMjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac525ae5a67ee69924115708e388dae8313f1d74de030dc4613567c9bcae9e9867
hovercard-subject-tagissue:856190030
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/3387/issue_layout
twitter:imagehttps://opengraph.githubassets.com/59a525c5be49e87a631d3dd20c87380c0d5bddb7f11c89bb4ac08312ae1307e2/getsentry/sentry-javascript/issues/3387
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/59a525c5be49e87a631d3dd20c87380c0d5bddb7f11c89bb4ac08312ae1307e2/getsentry/sentry-javascript/issues/3387
og:image:altReview the documentation: https://docs.sentry.io/ Search for existing issues: https://github.com/getsentry/sentry-javascript/issues Use the latest release: https://github.com/getsentry/sentry-javas...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamealexbchr
hostnamegithub.com
expected-hostnamegithub.com
Noneae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id3328572
octolytics-dimension-repository_nwogetsentry/sentry-javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id3328572
octolytics-dimension-repository_network_root_nwogetsentry/sentry-javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecfb5f24c6e01d85f70804652a5107e5cac03a161
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/3387#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F3387
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F3387
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=getsentry%2Fsentry-javascript
Reloadhttps://github.com/getsentry/sentry-javascript/issues/3387
Reloadhttps://github.com/getsentry/sentry-javascript/issues/3387
Reloadhttps://github.com/getsentry/sentry-javascript/issues/3387
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues339 (339)https://github.com/getsentry/sentry-javascript/issues
Pull requests55 (55)https://github.com/getsentry/sentry-javascript/pulls
Discussionshttps://github.com/getsentry/sentry-javascript/discussions
Actionshttps://github.com/getsentry/sentry-javascript/actions
Security and quality7 (7)https://github.com/getsentry/sentry-javascript/security
Insightshttps://github.com/getsentry/sentry-javascript/insights
https://github.com/getsentry/sentry-javascript
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/3387
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/3387
@sentry/serverless does not send Error events on crashes (GCP Function)https://github.com/getsentry/sentry-javascript/issues/3387#top
https://github.com/alexbchr
alexbchrhttps://github.com/alexbchr
on Apr 12, 2021https://github.com/getsentry/sentry-javascript/issues/3387#issue-856190030
https://docs.sentry.io/https://docs.sentry.io/
https://github.com/getsentry/sentry-javascript/issueshttps://github.com/getsentry/sentry-javascript/issues
https://github.com/getsentry/sentry-javascript/releaseshttps://github.com/getsentry/sentry-javascript/releases
alexbchrhttps://github.com/alexbchr
Status: Needs Triagehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Needs%20Triage%22
on Apr 12, 2021https://github.com/getsentry/sentry-javascript/issues/3387#event-4583634509
https://github.com/pravinba9495
pravinba9495https://github.com/pravinba9495
on Apr 16, 2021https://github.com/getsentry/sentry-javascript/issues/3387#issuecomment-821517521
@alexbchrhttps://github.com/alexbchr
https://github.com/alexbchr
alexbchrhttps://github.com/alexbchr
on Apr 16, 2021https://github.com/getsentry/sentry-javascript/issues/3387#issuecomment-821575984
@pravinba9495https://github.com/pravinba9495
GoogleCloudPlatform/functions-framework-nodejs#215https://github.com/GoogleCloudPlatform/functions-framework-nodejs/issues/215
https://github.com/pravinba9495
pravinba9495https://github.com/pravinba9495
on Apr 17, 2021https://github.com/getsentry/sentry-javascript/issues/3387#issuecomment-821740962
@alexbchrhttps://github.com/alexbchr
https://user-images.githubusercontent.com/25143158/115097271-20d6f080-9ef7-11eb-8988-6a57c15d3e4a.png
https://user-images.githubusercontent.com/25143158/115097269-1f0d2d00-9ef7-11eb-9e24-909242c4ae58.png
herehttps://github.com/getsentry/sentry-javascript/blob/master/packages/serverless/src/awslambda.ts
https://github.com/alexbchr
alexbchrhttps://github.com/alexbchr
on Apr 20, 2021https://github.com/getsentry/sentry-javascript/issues/3387#issuecomment-823248482
@pravinba9495https://github.com/pravinba9495
AbhiPrasadhttps://github.com/AbhiPrasad
Package: serverlesshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Package%3A%20serverless%22
Platform: Google Cloud Functionshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Platform%3A%20Google%20Cloud%20Functions%22
Type: Bughttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Type%3A%20Bug%22
on Oct 4, 2021https://github.com/getsentry/sentry-javascript/issues/3387#event-5404456417
getsantryhttps://github.com/apps/getsantry
Status: Untriagedhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Untriaged%22
on Oct 4, 2021https://github.com/getsentry/sentry-javascript/issues/3387#event-5404456563
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Oct 25, 2021https://github.com/getsentry/sentry-javascript/issues/3387#issuecomment-951023303
github-actionshttps://github.com/apps/github-actions
Status: Stalehttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Status%3A%20Stale%22
on Oct 25, 2021https://github.com/getsentry/sentry-javascript/issues/3387#event-5514338955
github-actionshttps://github.com/apps/github-actions
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 1, 2021https://github.com/getsentry/sentry-javascript/issues/3387#event-5549602238
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/3387
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/3387
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.