Skip to content

Commit 8557c40

Browse files
authored
chore(aws-cdk-lib): Update adot lambda layers to the latest version (#27508)
Reference: aws-otel/aws-otel.github.io#648 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 1fc5dda commit 8557c40

File tree

11 files changed

+637
-280
lines changed

11 files changed

+637
-280
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.assets.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack1.template.json

+115-115
Large diffs are not rendered by default.

packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.assets.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/Stack2.template.json

+115-115
Large diffs are not rendered by default.

packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/manifest.json

+5-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.js.snapshot/tree.json

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda-adot.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class StackUnderTest extends Stack {
3333
code: Code.fromInline(`exports.handler = ${handler.toString()}`),
3434
architecture: props.architecture,
3535
adotInstrumentation: {
36-
layerVersion: AdotLayerVersion.fromJavaScriptSdkLayerVersion(AdotLambdaLayerJavaScriptSdkVersion.V1_15_0_1),
36+
layerVersion: AdotLayerVersion.fromJavaScriptSdkLayerVersion(AdotLambdaLayerJavaScriptSdkVersion.V1_16_0),
3737
execWrapper: AdotLambdaExecWrapper.REGULAR_HANDLER,
3838
},
3939
});
@@ -43,7 +43,7 @@ class StackUnderTest extends Stack {
4343
handler: 'index.handler',
4444
code: Code.fromInline('def handler(event, context): pass'),
4545
adotInstrumentation: {
46-
layerVersion: AdotLayerVersion.fromPythonSdkLayerVersion(AdotLambdaLayerPythonSdkVersion.V1_19_0_1),
46+
layerVersion: AdotLayerVersion.fromPythonSdkLayerVersion(AdotLambdaLayerPythonSdkVersion.V1_20_0),
4747
execWrapper: AdotLambdaExecWrapper.INSTRUMENT_HANDLER,
4848
},
4949
});
@@ -53,7 +53,7 @@ class StackUnderTest extends Stack {
5353
handler: 'index.handler',
5454
code: Code.fromInline('def handler(event, context): pass'),
5555
adotInstrumentation: {
56-
layerVersion: AdotLayerVersion.fromJavaSdkLayerVersion(AdotLambdaLayerJavaSdkVersion.V1_28_1),
56+
layerVersion: AdotLayerVersion.fromJavaSdkLayerVersion(AdotLambdaLayerJavaSdkVersion.V1_30_0),
5757
execWrapper: AdotLambdaExecWrapper.INSTRUMENT_HANDLER,
5858
},
5959
});
@@ -63,7 +63,7 @@ class StackUnderTest extends Stack {
6363
handler: 'index.handler',
6464
code: Code.fromInline('def handler(event, context): pass'),
6565
adotInstrumentation: {
66-
layerVersion: AdotLayerVersion.fromJavaAutoInstrumentationLayerVersion(AdotLambdaLayerJavaAutoInstrumentationVersion.V1_28_1),
66+
layerVersion: AdotLayerVersion.fromJavaAutoInstrumentationLayerVersion(AdotLambdaLayerJavaAutoInstrumentationVersion.V1_30_0),
6767
execWrapper: AdotLambdaExecWrapper.INSTRUMENT_HANDLER,
6868
},
6969
});
@@ -73,7 +73,7 @@ class StackUnderTest extends Stack {
7373
handler: 'index.handler',
7474
code: Code.fromInline('def handler(event, context): pass'),
7575
adotInstrumentation: {
76-
layerVersion: AdotLayerVersion.fromGenericLayerVersion(AdotLambdaLayerGenericVersion.V0_82_0),
76+
layerVersion: AdotLayerVersion.fromGenericLayerVersion(AdotLambdaLayerGenericVersion.V0_84_0),
7777
execWrapper: AdotLambdaExecWrapper.INSTRUMENT_HANDLER,
7878
},
7979
});

packages/aws-cdk-lib/aws-lambda/lib/adot-layers.ts

+39-15
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,9 @@ abstract class AdotLambdaLayerVersion {
210210
*/
211211
export class AdotLambdaLayerJavaSdkVersion extends AdotLambdaLayerVersion {
212212
/**
213-
* The latest layer version available in this CDK version. New versions could
214-
* introduce incompatible changes. Make sure to test them before deploying to production.
213+
* Version 1.30.0
215214
*/
216-
public static readonly LATEST = new AdotLambdaLayerJavaSdkVersion('1.28.1');
215+
public static readonly V1_30_0 = new AdotLambdaLayerJavaSdkVersion('1.30.0');
217216

218217
/**
219218
* Version 1.28.1
@@ -225,6 +224,12 @@ export class AdotLambdaLayerJavaSdkVersion extends AdotLambdaLayerVersion {
225224
*/
226225
public static readonly V1_19_0 = new AdotLambdaLayerJavaSdkVersion('1.19.0');
227226

227+
/**
228+
* The latest layer version available in this CDK version. New versions could
229+
* introduce incompatible changes. Make sure to test them before deploying to production.
230+
*/
231+
public static readonly LATEST = this.V1_30_0;
232+
228233
private constructor(protected readonly layerVersion: string) {
229234
super(AdotLambdaLayerType.JAVA_SDK, layerVersion);
230235
}
@@ -235,10 +240,9 @@ export class AdotLambdaLayerJavaSdkVersion extends AdotLambdaLayerVersion {
235240
*/
236241
export class AdotLambdaLayerJavaAutoInstrumentationVersion extends AdotLambdaLayerVersion {
237242
/**
238-
* The latest layer version available in this CDK version. New versions could
239-
* introduce incompatible changes. Make sure to test them before deploying to production.
243+
* Version 1.30.0
240244
*/
241-
public static readonly LATEST = new AdotLambdaLayerJavaAutoInstrumentationVersion('1.28.1');
245+
public static readonly V1_30_0 = new AdotLambdaLayerJavaAutoInstrumentationVersion('1.30.0');
242246

243247
/**
244248
* Version 1.28.1
@@ -250,6 +254,12 @@ export class AdotLambdaLayerJavaAutoInstrumentationVersion extends AdotLambdaLay
250254
*/
251255
public static readonly V1_19_2 = new AdotLambdaLayerJavaAutoInstrumentationVersion('1.19.2');
252256

257+
/**
258+
* The latest layer version available in this CDK version. New versions could
259+
* introduce incompatible changes. Make sure to test them before deploying to production.
260+
*/
261+
public static readonly LATEST = this.V1_30_0;
262+
253263
private constructor(protected readonly layerVersion: string) {
254264
super(AdotLambdaLayerType.JAVA_AUTO_INSTRUMENTATION, layerVersion);
255265
}
@@ -260,10 +270,9 @@ export class AdotLambdaLayerJavaAutoInstrumentationVersion extends AdotLambdaLay
260270
*/
261271
export class AdotLambdaLayerPythonSdkVersion extends AdotLambdaLayerVersion {
262272
/**
263-
* The latest layer version available in this CDK version. New versions could
264-
* introduce incompatible changes. Make sure to test them before deploying to production.
273+
* Version 1.20.0
265274
*/
266-
public static readonly LATEST = new AdotLambdaLayerPythonSdkVersion('1.19.0-1');
275+
public static readonly V1_20_0 = new AdotLambdaLayerPythonSdkVersion('1.20.0');
267276

268277
/**
269278
* Version 1.19.0
@@ -300,6 +309,12 @@ export class AdotLambdaLayerPythonSdkVersion extends AdotLambdaLayerVersion {
300309
*/
301310
public static readonly V1_13_0 = new AdotLambdaLayerPythonSdkVersion('1.13.0');
302311

312+
/**
313+
* The latest layer version available in this CDK version. New versions could
314+
* introduce incompatible changes. Make sure to test them before deploying to production.
315+
*/
316+
public static readonly LATEST = this.V1_20_0;
317+
303318
private constructor(protected readonly layerVersion: string) {
304319
super(AdotLambdaLayerType.PYTHON_SDK, layerVersion);
305320
}
@@ -310,10 +325,9 @@ export class AdotLambdaLayerPythonSdkVersion extends AdotLambdaLayerVersion {
310325
*/
311326
export class AdotLambdaLayerJavaScriptSdkVersion extends AdotLambdaLayerVersion {
312327
/**
313-
* The latest layer version available in this CDK version. New versions could
314-
* introduce incompatible changes. Make sure to test them before deploying to production.
328+
* Version 1.16.0
315329
*/
316-
public static readonly LATEST = new AdotLambdaLayerJavaScriptSdkVersion('1.15.0-1');
330+
public static readonly V1_16_0 = new AdotLambdaLayerJavaScriptSdkVersion('1.16.0');
317331

318332
/**
319333
* Version 1.15.0
@@ -325,6 +339,12 @@ export class AdotLambdaLayerJavaScriptSdkVersion extends AdotLambdaLayerVersion
325339
*/
326340
public static readonly V1_7_0 = new AdotLambdaLayerJavaScriptSdkVersion('1.7.0');
327341

342+
/**
343+
* The latest layer version available in this CDK version. New versions could
344+
* introduce incompatible changes. Make sure to test them before deploying to production.
345+
*/
346+
public static readonly LATEST = this.V1_16_0;
347+
328348
private constructor(protected readonly layerVersion: string) {
329349
super(AdotLambdaLayerType.JAVASCRIPT_SDK, layerVersion);
330350
}
@@ -335,10 +355,9 @@ export class AdotLambdaLayerJavaScriptSdkVersion extends AdotLambdaLayerVersion
335355
*/
336356
export class AdotLambdaLayerGenericVersion extends AdotLambdaLayerVersion {
337357
/**
338-
* The latest layer version available in this CDK version. New versions could
339-
* introduce incompatible changes. Make sure to test them before deploying to production.
358+
* Version 0.84.0
340359
*/
341-
public static readonly LATEST = new AdotLambdaLayerGenericVersion('0.82.0');
360+
public static readonly V0_84_0 = new AdotLambdaLayerGenericVersion('0.84.0');
342361

343362
/**
344363
* Version 0.82.0
@@ -350,6 +369,11 @@ export class AdotLambdaLayerGenericVersion extends AdotLambdaLayerVersion {
350369
*/
351370
public static readonly V0_62_1 = new AdotLambdaLayerGenericVersion('0.62.1');
352371

372+
/**
373+
* The latest layer version available in this CDK version. New versions could
374+
* introduce incompatible changes. Make sure to test them before deploying to production.
375+
*/
376+
public static readonly LATEST = this.V0_84_0;
353377
private constructor(protected readonly layerVersion: string) {
354378
super(AdotLambdaLayerType.GENERIC, layerVersion);
355379
}

packages/aws-cdk-lib/aws-lambda/test/adot.test.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ describe('ADOT Lambda Layer', () => {
2121
});
2222

2323
test('is added properly when the region information is available at synthesis time', () => {
24-
const layerArn = lambda.AdotLambdaLayerJavaSdkVersion.V1_28_1.layerArn(fn.stack, fn.architecture);
24+
const layerArn = lambda.AdotLambdaLayerJavaSdkVersion.V1_30_0.layerArn(fn.stack, fn.architecture);
2525

2626
expect(layerArn).toEqual(
27-
'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-28-1:1',
27+
'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-30-0:1',
2828
);
2929
});
3030

3131
test('is added properly when using "LATEST" version', () => {
3232
const layerArn = lambda.AdotLambdaLayerJavaSdkVersion.LATEST.layerArn(fn.stack, fn.architecture);
3333

3434
expect(layerArn).toEqual(
35-
'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-28-1:1',
35+
'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-java-wrapper-amd64-ver-1-30-0:1',
3636
);
3737
});
3838
});
@@ -53,18 +53,18 @@ describe('ADOT Lambda Layer', () => {
5353
});
5454

5555
test('is added properly when the region information is available at synthesis time', () => {
56-
const layerArn = lambda.AdotLambdaLayerPythonSdkVersion.V1_19_0_1.layerArn(fn.stack, fn.architecture);
56+
const layerArn = lambda.AdotLambdaLayerPythonSdkVersion.V1_20_0.layerArn(fn.stack, fn.architecture);
5757

5858
expect(layerArn).toEqual(
59-
'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-19-0:2',
59+
'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-20-0:2',
6060
);
6161
});
6262

6363
test('is added properly when using "LATEST" version', () => {
6464
const layerArn = lambda.AdotLambdaLayerPythonSdkVersion.LATEST.layerArn(fn.stack, fn.architecture);
6565

6666
expect(layerArn).toEqual(
67-
'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-19-0:2',
67+
'arn:aws:lambda:us-west-2:901920570463:layer:aws-otel-python-amd64-ver-1-20-0:2',
6868
);
6969
});
7070
});
@@ -112,7 +112,7 @@ describe('ADOT Lambda Layer', () => {
112112
{
113113
Ref: 'AWS::Region',
114114
},
115-
'JAVAxSDKx1x28x1xarm64',
115+
'JAVAxSDKx1x30x0xarm64',
116116
],
117117
},
118118
});

0 commit comments

Comments
 (0)