-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(aws): Enable Lambda extension by default when using the Lamba layer #17684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -15,12 +15,10 @@ export function getDefaultIntegrations(_options: Options): Integration[] { | |||
} | ||||
|
||||
export interface AwsServerlessOptions extends NodeOptions { | ||||
_experiments?: NodeOptions['_experiments'] & { | ||||
/** | ||||
* If proxying Sentry events through the Sentry Lambda extension should be enabled. | ||||
*/ | ||||
enableLambdaExtension?: boolean; | ||||
}; | ||||
/** | ||||
* If Sentry events should be proxied through the Lambda extension when using the Lambda layer. Defaults to `true` when using the Lambda layer. | ||||
*/ | ||||
useLayerExtension?: boolean; | ||||
} | ||||
|
||||
/** | ||||
|
@@ -29,14 +27,14 @@ export interface AwsServerlessOptions extends NodeOptions { | |||
* @param options Configuration options for the SDK, @see {@link AWSLambdaOptions}. | ||||
*/ | ||||
export function init(options: AwsServerlessOptions = {}): NodeClient | undefined { | ||||
const sdkSource = getSDKSource(); | ||||
const opts = { | ||||
defaultIntegrations: getDefaultIntegrations(options), | ||||
useLayerExtension: sdkSource === 'aws-lambda-layer', | ||||
...options, | ||||
}; | ||||
|
||||
const sdkSource = getSDKSource(); | ||||
|
||||
if (opts._experiments?.enableLambdaExtension) { | ||||
if (opts.useLayerExtension) { | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Missing Warning for Unsupported Lambda ExtensionThe warning for unsupported There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @msonnb this is good feedback IMHO, it makes sense to warn in this case :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think Cursor is confusing something, this is still here:
|
||||
if (sdkSource === 'aws-lambda-layer') { | ||||
if (!opts.tunnel) { | ||||
DEBUG_BUILD && debug.log('Proxying Sentry events through the Sentry Lambda extension'); | ||||
|
Uh oh!
There was an error while loading. Please reload this page.