Skip to content

Conversation

andreiborza
Copy link
Member

@andreiborza andreiborza commented Sep 29, 2025

The default setting for useLayerExtension now considers the http_proxy environment variable. When http_proxy is set, useLayerExtension will be off by default. If you use a http_proxy but would still like to make use of the Sentry Lambda extension, exempt localhost in a no_proxy environment variable.

Fixes: #17804


Note

Disable useLayerExtension by default when http_proxy is set (unless no_proxy exempts localhost), add debug warnings, tests, and changelog entry.

  • aws-serverless:
    • Consider proxy env vars when defaulting useLayerExtension in packages/aws-serverless/src/init.ts.
      • New shouldDisableLayerExtensionForProxy() checks http_proxy and no_proxy (localhost exemptions).
      • Update default: enable only if using Lambda layer, no custom tunnel, and no proxy interference.
      • Add debug warnings when disabling due to proxy and when tunneling via extension.
  • Tests:
    • Expand packages/aws-serverless/test/init.test.ts to cover proxy/no_proxy scenarios, explicit overrides, and env cleanup.
  • Docs/Changelog:
    • Add Important Changes note explaining new default behavior and how to re-enable with no_proxy exemptions.

Written by Cursor Bugbot for commit 53e333f. This will update automatically on new commits. Configure here.

@andreiborza andreiborza force-pushed the ab/aws-handle-http-proxy branch from fabe4f6 to 0caed0c Compare September 29, 2025 15:45
Copy link
Contributor

github-actions bot commented Sep 29, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.23 kB - -
@sentry/browser - with treeshaking flags 22.75 kB - -
@sentry/browser (incl. Tracing) 40.42 kB - -
@sentry/browser (incl. Tracing, Replay) 78.8 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 68.45 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 83.47 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 95.67 kB - -
@sentry/browser (incl. Feedback) 40.95 kB - -
@sentry/browser (incl. sendFeedback) 28.89 kB - -
@sentry/browser (incl. FeedbackAsync) 33.82 kB - -
@sentry/react 25.96 kB - -
@sentry/react (incl. Tracing) 42.39 kB - -
@sentry/vue 28.75 kB - -
@sentry/vue (incl. Tracing) 42.23 kB - -
@sentry/svelte 24.26 kB - -
CDN Bundle 25.75 kB - -
CDN Bundle (incl. Tracing) 40.31 kB - -
CDN Bundle (incl. Tracing, Replay) 76.55 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 82.06 kB - -
CDN Bundle - uncompressed 75.3 kB - -
CDN Bundle (incl. Tracing) - uncompressed 119.31 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 234.47 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 247.23 kB - -
@sentry/nextjs (client) 44.4 kB - -
@sentry/sveltekit (client) 40.84 kB - -
@sentry/node-core 50.33 kB - -
@sentry/node 153.41 kB - -
@sentry/node - without tracing 92.18 kB - -
@sentry/aws-serverless 105.9 kB +0.15% +157 B 🔺

View base workflow run

Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one!

`useLayerExtension` default

The default setting for `useLayerExtension` now considers the `http_proxy` environment variable. When `http_proxy` is set, `useLayerExtension` will be off by default. If you use a `http_proxy` but would still like to make use of the Sentry Lambda extension, exempt `localhost` in a `no_proxy` environment variable.

Fixes: #17804
@andreiborza andreiborza force-pushed the ab/aws-handle-http-proxy branch from 0caed0c to 53e333f Compare September 30, 2025 07:33
@andreiborza andreiborza merged commit 11ea830 into develop Sep 30, 2025
41 checks passed
@andreiborza andreiborza deleted the ab/aws-handle-http-proxy branch September 30, 2025 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors not sent when using an AWS lambda with a http proxy and the sentry lambda layer
2 participants