> **Experimental**
>
> `@aws-cdk/aws-applicationsignals-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# DotNetLinuxInjector

Linux-specific implementation of the .NET SDK injector. Handles CoreCLR profiler setup and paths for Linux environments.

Extends: [Injector](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-applicationsignals-alpha.Injector.html) › [DotNetInjector](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-applicationsignals-alpha.DotNetInjector.html) › DotNetLinuxInjector

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/enablement/ecs-sdk-instrumentation.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-applicationsignals-alpha/lib/enablement/ecs-sdk-instrumentation.ts#L249)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as applicationsignals_alpha from '@aws-cdk/aws-applicationsignals-alpha';
import { aws_ecs as ecs } from 'aws-cdk-lib';

declare const cpuArchitecture: ecs.CpuArchitecture;
declare const instrumentationVersion: applicationsignals_alpha.InstrumentationVersion;
const dotNetLinuxInjector = new applicationsignals_alpha.DotNetLinuxInjector('sharedVolumeName', instrumentationVersion, cpuArchitecture, /* all optional props */ [{
  name: 'name',
  value: 'value',
}]);
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_applicationsignals_alpha as applicationsignals_alpha
from aws_cdk import aws_ecs as ecs

# cpu_architecture: ecs.CpuArchitecture
# instrumentation_version: applicationsignals_alpha.InstrumentationVersion

dot_net_linux_injector = applicationsignals_alpha.DotNetLinuxInjector("sharedVolumeName", instrumentation_version, cpu_architecture, [applicationsignals_alpha.EnvironmentExtension(
    name="name",
    value="value"
)])
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.applicationsignals.alpha.*;
import software.amazon.awscdk.services.ecs.*;

CpuArchitecture cpuArchitecture;
InstrumentationVersion instrumentationVersion;

DotNetLinuxInjector dotNetLinuxInjector = new DotNetLinuxInjector("sharedVolumeName", instrumentationVersion, cpuArchitecture, List.of(EnvironmentExtension.builder()
        .name("name")
        .value("value")
        .build()));
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.ApplicationSignals.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ApplicationSignals.Alpha;
using Amazon.CDK.AWS.ECS;

CpuArchitecture cpuArchitecture;
InstrumentationVersion instrumentationVersion;

var dotNetLinuxInjector = new DotNetLinuxInjector("sharedVolumeName", instrumentationVersion, cpuArchitecture, new [] { new EnvironmentExtension {
    Name = "name",
    Value = "value"
} });
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkapplicationsignalsalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import applicationsignals_alpha "github.com/aws/aws-cdk-go/awscdkapplicationsignalsalpha"
import "github.com/aws/aws-cdk-go/awscdk"

var cpuArchitecture CpuArchitecture
var instrumentationVersion InstrumentationVersion

dotNetLinuxInjector := applicationsignals_alpha.NewDotNetLinuxInjector(jsii.String("sharedVolumeName"), instrumentationVersion, cpuArchitecture, []EnvironmentExtension{
	&EnvironmentExtension{
		Name: jsii.String("name"),
		Value: jsii.String("value"),
	},
})
```

## Initializer

TypeScript:

```ts
new DotNetLinuxInjector(sharedVolumeName: string, instrumentationVersion: InstrumentationVersion, cpuArch: CpuArchitecture, overrideEnvironments?: EnvironmentExtension[])
```

Python:

```python
DotNetLinuxInjector(shared_volume_name: str, instrumentation_version: InstrumentationVersion, cpu_arch: CpuArchitecture, override_environments: typing.Optional[typing.List[EnvironmentExtension]] = None)
```

Java:

```java
new DotNetLinuxInjector(String sharedVolumeName, InstrumentationVersion instrumentationVersion, CpuArchitecture cpuArch, List<EnvironmentExtension> overrideEnvironments)
```

C# / .NET:

```csharp
new DotNetLinuxInjector(string sharedVolumeName, InstrumentationVersion instrumentationVersion, CpuArchitecture cpuArch, EnvironmentExtension[]? overrideEnvironments = null)
```

Golang:

```go
NewDotNetLinuxInjector(SharedVolumeName *string, InstrumentationVersion InstrumentationVersion, CpuArch CpuArchitecture, OverrideEnvironments *[]EnvironmentExtension)
```

## Properties

- `command`: string[] — The command to run the init container.

- `containerPath`: string — The path to ADOT SDK agent in the init container.

## Methods

- `injectInitContainer(taskDefinition: TaskDefinition): ContainerDefinition` — Inject ADOT SDK agent init container.

  **Parameters**

  - `taskDefinition` — The TaskDefinition to render.

  **Returns:** The created ContainerDefinition

- `renderDefaultContainer(taskDefinition: TaskDefinition): void` — Render the application container for SDK instrumentation.

  **Parameters**

  - `taskDefinition` — The TaskDefinition to render.
