You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(aws): Add SENTRY_LAYER_EXTENSION to configure using the lambda layer extension via env variables (#18101)
Our recommended approach for the aws sdk is to use our Lambda layer.
When the Lambda layer is used, it would previously automatically set up
the layer extension. This can be disabled by setting `useLayerExtension:
false` during init, but when using the layer with our auto-wrapping as
per recommendation, it wasn't possible to opt out of using the
extension.
This PR adds `SENTRY_LAYER_EXTENSION` that can be used to opt out of the
extension.
---------
Co-authored-by: Lukas Stracke <[email protected]>
DEBUG_BUILD&&debug.log('Proxying Sentry events through the Sentry Lambda extension');
81
-
opts.tunnel='http://localhost:9000/envelope';
82
-
}else{
90
+
if(sdkSource!=='aws-lambda-layer'){
91
+
DEBUG_BUILD&&debug.warn('The Sentry Lambda extension is only supported when using the AWS Lambda layer.');
92
+
}elseif(opts.tunnel||proxyWouldInterfere){
93
+
if(opts.tunnel){
83
94
DEBUG_BUILD&&
84
95
debug.warn(
85
96
`Using a custom tunnel with the Sentry Lambda extension is not supported. Events will be tunnelled to ${opts.tunnel} and not through the extension.`,
86
97
);
87
98
}
99
+
100
+
if(proxyWouldInterfere){
101
+
DEBUG_BUILD&&
102
+
debug.warn(
103
+
'Sentry Lambda extension is disabled due to proxy environment variables (http_proxy/https_proxy). Consider adding localhost to no_proxy to re-enable.',
104
+
);
105
+
}
88
106
}else{
89
-
DEBUG_BUILD&&debug.warn('The Sentry Lambda extension is only supported when using the AWS Lambda layer.');
107
+
DEBUG_BUILD&&debug.log('Proxying Sentry events through the Sentry Lambda extension');
0 commit comments