René's URL Explorer Experiment


Title: Create ESM Lambda Layer · Issue #12856 · getsentry/sentry-javascript · GitHub

Open Graph Title: Create ESM Lambda Layer · Issue #12856 · getsentry/sentry-javascript

X Title: Create ESM Lambda Layer · Issue #12856 · getsentry/sentry-javascript

Description: (extracted from #12409) Since using the Sentry AWS Serverless SDK is far from easy in ESM-based Lambda functions, we should look into creating a layer for ESM or making our current layer compatible with both, CJS and ESM. I outlined some...

Open Graph Description: (extracted from #12409) Since using the Sentry AWS Serverless SDK is far from easy in ESM-based Lambda functions, we should look into creating a layer for ESM or making our current layer compatible...

X Description: (extracted from #12409) Since using the Sentry AWS Serverless SDK is far from easy in ESM-based Lambda functions, we should look into creating a layer for ESM or making our current layer compatible...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Create ESM Lambda Layer","articleBody":"(extracted from [#12409](https://github.com/getsentry/sentry-javascript/issues/12409))\n\nSince using the Sentry AWS Serverless SDK is far from easy in ESM-based Lambda functions, we should look into creating a layer for ESM or making our current layer compatible with both, CJS and ESM.\n\nI outlined some of the prior investigation to this in [#12322](https://github.com/getsentry/sentry-javascript/issues/12322) and [#12409](https://github.com/getsentry/sentry-javascript/issues/12409).\n\nOne major blocker for a code-less Sentry SDK usage like in CJS is that our `tryPatchHandler` function we use to auto-wrap CJS lambda functions can't be applied to ESM Lambda functions (it uses `require` 😢). However, we can create a layer and tell people to manually init the SDK in code. Having the layer is still a huge improvement because users don't have to deploy their node_modules like when installing the SDK via NPM. h/t @andreiborza for pointing this out today!\n\n### ESM Layer v0 (no auto-wrapping)\n\n- [x] [JS-675](https://linear.app/getsentry/issue/4305869f-6c53-4e67-a244-4b8de6c04b85)\n- [x] [JS-670](https://linear.app/getsentry/issue/b5b732f1-5a4b-42d4-bfb5-3230fdc80aa4)\n- [x] [JS-671](https://linear.app/getsentry/issue/c2b8a29d-d849-4d32-83cf-edfde5236e1c)\n- [x] [JS-672](https://linear.app/getsentry/issue/6743c8e2-d534-4fdf-bd55-2e747e31222b)\n- [x] [JS-673](https://linear.app/getsentry/issue/5c47b677-fd1a-4fa9-b963-88c13574c08f)\n- [x] [JS-674](https://linear.app/getsentry/issue/bac90b91-5045-46da-8d65-7b083d4696c9)\n\n### ESM layer v1 (auto-wrapping)\n\n- [x] Investigate why AWS Lambda Otel instrumentation doesn't work in ESM (+ possibly fix it)\n- [x] Find way to auto-wrap handler to permit code-less SDK setup\n- [x] Document code-less SDK setup via environment variables\n\n### Stretch Goals\n\n- [x] Adapt Sentry integration to use ESM version of layer\n- [x] Document how to use Sentry integration for automatic adding of Sentry to (multiple) ESM lambda functions\n- [ ] Look into Supporting SENTRY_DEBUG\n- [ ] Look into the AWS Lambda Extensions API ([https://github.com/getsentry/sentry-javascript/issues/3051#issuecomment-2012577228](https://github.com/getsentry/sentry-javascript/issues/3051#issuecomment-2012577228))","author":{"url":"https://github.com/Lms24","@type":"Person","name":"Lms24"},"datePublished":"2024-07-10T16:37:05Z","url":"https://github.com/getsentry/sentry-javascript/issues/12856"}

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:d2617f17-73df-75b4-2849-27d304f05739
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8A3C:17238D:1857781:1F90F12:6B03FA07
html-safe-nonce5c6019d442c4fcfa42023a6ebd2f792b6cff0e7f1029a1f4cdb2d7434bc71242
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTNDOjE3MjM4RDoxODU3NzgxOjFGOTBGMTI6NkIwM0ZBMDciLCJ2aXNpdG9yX2lkIjoiMjQ4ODM3MjY5MTUyMzA3NDU2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace64bea132dd37d69da6f676bd40294f1624f671feb6746ed12c6c07a0c703060
hovercard-subject-tagissue:2401218728
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/12856/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bb48f43bfdab37c770c483da7444913a944a774949165990359e00cecf3b51e6/getsentry/sentry-javascript/issues/12856
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bb48f43bfdab37c770c483da7444913a944a774949165990359e00cecf3b51e6/getsentry/sentry-javascript/issues/12856
og:image:alt(extracted from #12409) Since using the Sentry AWS Serverless SDK is far from easy in ESM-based Lambda functions, we should look into creating a layer for ESM or making our current layer compatible...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameLms24
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-javascript/issues/12856#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-javascript%2Fissues%2F12856
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%2F12856
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/12856
Reloadhttps://github.com/getsentry/sentry-javascript/issues/12856
Reloadhttps://github.com/getsentry/sentry-javascript/issues/12856
getsentryhttps://github.com/getsentry
sentry-javascripthttps://github.com/getsentry/sentry-javascript
Codehttps://github.com/getsentry/sentry-javascript
Issues345 (345)https://github.com/getsentry/sentry-javascript/issues
Pull requests65 (65)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/12856
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/12856
#17525https://github.com/getsentry/sentry-javascript/pull/17525
Create ESM Lambda Layerhttps://github.com/getsentry/sentry-javascript/issues/12856#top
#17525https://github.com/getsentry/sentry-javascript/pull/17525
https://github.com/andreiborza
AWS Lambdahttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22AWS%20Lambda%22
Feature: Serverlesshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Feature%3A%20Serverless%22
Improvementhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Improvement%22
https://github.com/Lms24
Lms24https://github.com/Lms24
on Jul 10, 2024https://github.com/getsentry/sentry-javascript/issues/12856#issue-2401218728
#12409https://github.com/getsentry/sentry-javascript/issues/12409
#12322https://github.com/getsentry/sentry-javascript/issues/12322
#12409https://github.com/getsentry/sentry-javascript/issues/12409
@andreiborzahttps://github.com/andreiborza
JS-675https://linear.app/getsentry/issue/4305869f-6c53-4e67-a244-4b8de6c04b85
JS-670https://linear.app/getsentry/issue/b5b732f1-5a4b-42d4-bfb5-3230fdc80aa4
JS-671https://linear.app/getsentry/issue/c2b8a29d-d849-4d32-83cf-edfde5236e1c
JS-672https://linear.app/getsentry/issue/6743c8e2-d534-4fdf-bd55-2e747e31222b
JS-673https://linear.app/getsentry/issue/5c47b677-fd1a-4fa9-b963-88c13574c08f
JS-674https://linear.app/getsentry/issue/bac90b91-5045-46da-8d65-7b083d4696c9
@sentry/serverless adds ~300ms to function duration #3051 (comment)https://github.com/getsentry/sentry-javascript/issues/3051#issuecomment-2012577228
Nexthttps://github.com/getsentry/sentry-javascript/issues/12856?timeline_page=1
https://github.com/Lms24
Lms24https://github.com/Lms24
on Jul 10, 2024https://github.com/getsentry/sentry-javascript/issues/12856#issuecomment-2221002370
Lms24https://github.com/Lms24
Package: aws-serverlesshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Package%3A%20aws-serverless%22
Feature: Serverlesshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Feature%3A%20Serverless%22
on Jul 10, 2024https://github.com/getsentry/sentry-javascript/issues/12856#event-13459260532
Lms24https://github.com/Lms24
andreiborzahttps://github.com/andreiborza
on Jul 11, 2024https://github.com/getsentry/sentry-javascript/issues/12856#event-13469897001
https://github.com/paolostyle
paolostylehttps://github.com/paolostyle
on Sep 3, 2024https://github.com/getsentry/sentry-javascript/issues/12856#issuecomment-2326608898
AWS Lambda Extensionshttps://aws.amazon.com/blogs/compute/introducing-aws-lambda-extensions-in-preview/
#3051https://github.com/getsentry/sentry-javascript/issues/3051
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Sep 3, 2024https://github.com/getsentry/sentry-javascript/issues/12856#event-14115877394
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Sep 3, 2024https://github.com/getsentry/sentry-javascript/issues/12856#event-14787114875
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Sep 3, 2024https://github.com/getsentry/sentry-javascript/issues/12856
https://github.com/Lms24
Lms24https://github.com/Lms24
on Sep 3, 2024https://github.com/getsentry/sentry-javascript/issues/12856#issuecomment-2326685349
@andreiborzahttps://github.com/andreiborza
#3051https://github.com/getsentry/sentry-javascript/issues/3051
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Sep 3, 2024https://github.com/getsentry/sentry-javascript/issues/12856#event-14116420182
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Sep 3, 2024https://github.com/getsentry/sentry-javascript/issues/12856
https://github.com/microadam
microadamhttps://github.com/microadam
on Sep 3, 2024https://github.com/getsentry/sentry-javascript/issues/12856#issuecomment-2326955030
@Lms24https://github.com/Lms24
#3051 (comment)https://github.com/getsentry/sentry-javascript/issues/3051#issuecomment-2012577228
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Sep 3, 2024https://github.com/getsentry/sentry-javascript/issues/12856#event-14118133927
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Sep 3, 2024https://github.com/getsentry/sentry-javascript/issues/12856
https://github.com/andreiborza
andreiborzahttps://github.com/andreiborza
on Sep 3, 2024https://github.com/getsentry/sentry-javascript/issues/12856#issuecomment-2327573293
@microadamhttps://github.com/microadam
https://github.com/apetta
apettahttps://github.com/apetta
on Apr 24, 2025https://github.com/getsentry/sentry-javascript/issues/12856#issuecomment-2828028029
docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options#environmenthttps://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#environment
@apettahttps://github.com/apetta
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Apr 24, 2025https://github.com/getsentry/sentry-javascript/issues/12856#event-17392726063
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Apr 24, 2025https://github.com/getsentry/sentry-javascript/issues/12856
s1gr1dhttps://github.com/s1gr1d
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Apr 25, 2025https://github.com/getsentry/sentry-javascript/issues/12856#event-17402001547
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Apr 25, 2025https://github.com/getsentry/sentry-javascript/issues/12856
msonnbhttps://github.com/msonnb
on Jul 10, 2025https://github.com/getsentry/sentry-javascript/issues/12856#event-18560975754
Create ESM layer that provides the SDK dependencies #16876https://github.com/getsentry/sentry-javascript/issues/16876
Document how to use layer with code changes #16877https://github.com/getsentry/sentry-javascript/issues/16877
Add flag in event payload indicating if event was sent from lambda layer or from NPM-installed package #16878https://github.com/getsentry/sentry-javascript/issues/16878
Review usage of awslambda-auto.ts in non-layer NPM package #16879https://github.com/getsentry/sentry-javascript/issues/16879
Investigate if we still need aws-serverless-lambda-layer-fix plugin #16883https://github.com/getsentry/sentry-javascript/issues/16883
Investigate if we need to bundle the whole layer #16886https://github.com/getsentry/sentry-javascript/issues/16886
stephanie-andersonhttps://github.com/stephanie-anderson
Improvementhttps://github.com/getsentry/sentry-javascript/issues?q=type:"Improvement"
on Aug 12, 2025https://github.com/getsentry/sentry-javascript/issues/12856#event-19106485148
msonnbhttps://github.com/msonnb
on Sep 8, 2025https://github.com/getsentry/sentry-javascript/issues/12856#event-19558119750
feat(aws): Add experimental AWS Lambda extension for tunnelling events (https://github.com/getsentry/sentry-javascript/commit/e7beae66473c2972438c999c8f1f77aad1d100e3
https://docs.github.com/articles/closing-issues-via-commit-messages
e7beae6https://github.com/getsentry/sentry-javascript/commit/e7beae66473c2972438c999c8f1f77aad1d100e3
msonnbhttps://github.com/msonnb
completedhttps://github.com/getsentry/sentry-javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#17525https://github.com/getsentry/sentry-javascript/pull/17525
on Sep 8, 2025https://github.com/getsentry/sentry-javascript/issues/12856#event-19558119755
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Sep 9, 2025https://github.com/getsentry/sentry-javascript/issues/12856#issuecomment-3270694074
GitHub Actionshttps://help.github.com/en/actions
#17525https://github.com/getsentry/sentry-javascript/pull/17525
10.11.0 releasehttps://github.com/getsentry/sentry-javascript/releases/tag/10.11.0
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-javascript/issues/12856
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-javascript/issues/12856
andreiborzahttps://github.com/andreiborza
AWS Lambdahttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22AWS%20Lambda%22
Feature: Serverlesshttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Feature%3A%20Serverless%22
Improvementhttps://github.com/getsentry/sentry-javascript/issues?q=state%3Aopen%20label%3A%22Improvement%22
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
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.