Skip to content

Commit f56e882

Browse files
committed
switch to aws-lambda-layer prefix
1 parent 2ab5f59 commit f56e882

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

dev-packages/e2e-tests/test-applications/aws-lambda-layer-cjs/tests/basic.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ test('Lambda layer SDK bundle sends events', async ({ request }) => {
7272

7373
// shows that the SDK source is correctly detected
7474
expect(transactionEvent.sdk?.packages).toContainEqual(
75-
expect.objectContaining({ name: 'aws:@sentry/aws-serverless' }),
75+
expect.objectContaining({ name: 'aws-lambda-layer:@sentry/aws-serverless' }),
7676
);
7777
});

dev-packages/e2e-tests/test-applications/aws-lambda-layer-esm/tests/basic.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ test('Lambda layer SDK bundle sends events', async ({ request }) => {
7272

7373
// shows that the SDK source is correctly detected
7474
expect(transactionEvent.sdk?.packages).toContainEqual(
75-
expect.objectContaining({ name: 'aws:@sentry/aws-serverless' }),
75+
expect.objectContaining({ name: 'aws-lambda-layer:@sentry/aws-serverless' }),
7676
);
7777
});

packages/aws-serverless/scripts/buildLambdaLayer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ function replaceSDKSource(): void {
194194
let content = fs.readFileSync(envFile, 'utf-8');
195195

196196
// Replace the line marked with __SENTRY_SDK_SOURCE__ comment
197-
// Change from 'npm' to 'aws' to identify that this is the AWS Lambda layer
197+
// Change from 'npm' to 'aws-lambda-layer' to identify that this is the AWS Lambda layer
198198
content = content.replace(
199199
"/* __SENTRY_SDK_SOURCE__ */ return 'npm';",
200-
"/* __SENTRY_SDK_SOURCE__ */ return 'aws';",
200+
"/* __SENTRY_SDK_SOURCE__ */ return 'aws-lambda-layer';",
201201
);
202202

203203
fs.writeFileSync(envFile, content);

packages/core/src/utils/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
declare const __SENTRY_BROWSER_BUNDLE__: boolean | undefined;
1717

18-
export type SdkSource = 'npm' | 'cdn' | 'loader' | 'aws';
18+
export type SdkSource = 'npm' | 'cdn' | 'loader' | 'aws-lambda-layer';
1919

2020
/**
2121
* Figures out if we're building a browser bundle.

0 commit comments

Comments
 (0)