aws / aws/aws-cdk

aws-lambda: Cannot use AdotInstrumentation for dotnet lambdas

Open
#31,182 3 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-lambda bug effort/medium p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

Accodring to the [Getting Started](https://aws-otel.github.io/docs/getting-started/lambda/lambda-dotnet) page, you don't need to set ExecWrapper for dotnet lambdas.
However, `ExecWrapper` is required with CDK.

### Regression Issue

- [ ] Select this option if this issue appears to be a regression.

### Expected Behavior

AdotInstrumentation should allow to omit ExecWrapper property.

### Current Behavior

ExecWrapper property is mandatory.

### Reproduction Steps

```csharp
new Function(this, "func-id", new FunctionProps
{
Handler = "My::Handler::Method",
Code = Code.FromAsset("publish/MyCode.zip"),
Runtime = Runtime.DOTNET_8,
AdotInstrumentation = new AdotInstrumentationConfig
{
LayerVersion = AdotLayerVersion.FromGenericLayerVersion(AdotLambdaLayerGenericVersion.LATEST)
}
});

// SII001 The property ExecWrapper is required and cannot be null.
```

### Language

.NET

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by reproducing the provided CDK FunctionProps example with a .NET 8 Lambda and trace the AdotInstrumentation validation; done means the configuration succeeds without setting ExecWrapper, with coverage for this case.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, csharp, typescript
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.