feat: Configurable OTEL layer with architecture and version support (BREAKING)#26
Conversation
…BREAKING) BREAKING CHANGES: - OpenTelemetry layer is now disabled by default (was enabled by default) - Added new required properties: Architecture and OtelLayerVersion Features: - Add Architecture property with default "amd64" (supports arm64) - Add OtelLayerVersion property with default "0-117-0" (latest version) - Support configurable OTEL layer ARN format with architecture and version - Update all tests to reflect new defaults - Update testing helpers and builders with new properties Documentation: - Update CLAUDE.md, README.md, and docs/constructs/lambda-function.md - Add migration guide and breaking change warnings - Add examples showing new OTEL configuration Version: - Bump version to 2.0.0-beta for breaking changes - Update CDK dependency to 2.209.1 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull Request Overview
This PR introduces configurable OpenTelemetry (OTEL) layer support with architecture and version flexibility, while implementing breaking changes for version 2.0.0-beta. The OTEL layer is now disabled by default instead of enabled, providing better cost control and making observability features opt-in.
- BREAKING: OTEL layer default changed from enabled to disabled
- Added configurable OTEL layer version and architecture support (amd64/arm64)
- Updated version to 2.0.0-beta and bumped AWS CDK dependency
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Directory.Build.props | Version bump to 2.0.0-beta for breaking changes |
| src/LayeredCraft.Cdk.Constructs/LayeredCraft.Cdk.Constructs.csproj | AWS CDK dependency update to 2.209.1 |
| src/LayeredCraft.Cdk.Constructs/Models/LambdaFunctionConstructProps.cs | Added new OTEL configuration properties with updated defaults |
| src/LayeredCraft.Cdk.Constructs/LambdaFunctionConstruct.cs | Dynamic OTEL layer ARN generation using new configuration properties |
| src/LayeredCraft.Cdk.Constructs/Testing/LambdaFunctionConstructPropsBuilder.cs | Builder pattern updates for new OTEL configuration options |
| test files | Test framework updates to use new default values and validate new OTEL ARN format |
| documentation | Updated docs with breaking change warnings and migration examples |
| public bool EnableSnapStart { get; set; } | ||
| public bool GenerateUrl { get; set; } |
There was a problem hiding this comment.
[nitpick] The default value assignment has been removed from these properties. Consider maintaining explicit default values for consistency with other properties in the class.
| public bool EnableSnapStart { get; set; } | |
| public bool GenerateUrl { get; set; } | |
| public bool EnableSnapStart { get; set; } = false; | |
| public bool GenerateUrl { get; set; } = false; |
| public bool EnableSnapStart { get; set; } | ||
| public bool GenerateUrl { get; set; } |
There was a problem hiding this comment.
[nitpick] The default value assignment has been removed from these properties. Consider maintaining explicit default values for consistency with other properties in the class.
| public bool EnableSnapStart { get; set; } | |
| public bool GenerateUrl { get; set; } | |
| public bool EnableSnapStart { get; set; } = false; | |
| public bool GenerateUrl { get; set; } = false; |
Summary
Breaking Changes
IncludeOtelLayerdefault changed fromtruetofalseArchitecture(default: "amd64") andOtelLayerVersion(default: "0-117-0")New Features
arn:aws:lambda:{region}:901920570463:layer:aws-otel-collector-{architecture}-ver-{version}:1Migration Guide
For users upgrading from v1.x who want to keep OTEL enabled:
Documentation Updates
Test Updates
Benefits
Test plan
🤖 Generated with Claude Code