Skip to content
v2.274.0

Experimental

@aws-cdk/aws-applicationsignals-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

NodeInjector Class ​

Node.js-specific implementation of the SDK injector. Handles Node.js auto-instrumentation setup and NODE_OPTIONS configuration.

Example ​

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';

declare const instrumentationVersion: applicationsignals_alpha.InstrumentationVersion;
const nodeInjector = new applicationsignals_alpha.NodeInjector('sharedVolumeName', instrumentationVersion, /* all optional props */ [{
  name: 'name',
  value: 'value',
}]);
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

# instrumentation_version: applicationsignals_alpha.InstrumentationVersion

node_injector = applicationsignals_alpha.NodeInjector("sharedVolumeName", instrumentation_version, [
    name="name",
    value="value"
])
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.*;

InstrumentationVersion instrumentationVersion;

NodeInjector nodeInjector = new NodeInjector("sharedVolumeName", instrumentationVersion, List.of(EnvironmentExtension.builder()
        .name("name")
        .value("value")
        .build()));
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;

InstrumentationVersion instrumentationVersion;

var nodeInjector = new NodeInjector("sharedVolumeName", instrumentationVersion, new [] { new EnvironmentExtension {
    Name = "name",
    Value = "value"
} });
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"

var instrumentationVersion InstrumentationVersion

nodeInjector := applicationsignals_alpha.NewNodeInjector(jsii.String("sharedVolumeName"), instrumentationVersion, []EnvironmentExtension{
	&EnvironmentExtension{
		Name: jsii.String("name"),
		Value: jsii.String("value"),
	},
})

Initializer ​

ts
new NodeInjector(sharedVolumeName: string, instrumentationVersion: InstrumentationVersion, overrideEnvironments?: EnvironmentExtension[])
python
NodeInjector(shared_volume_name: str, instrumentation_version: InstrumentationVersion, override_environments: typing.Optional[typing.List[EnvironmentExtension]] = None)
java
new NodeInjector(String sharedVolumeName, InstrumentationVersion instrumentationVersion, List<EnvironmentExtension> overrideEnvironments)
csharp
new NodeInjector(string sharedVolumeName, InstrumentationVersion instrumentationVersion, EnvironmentExtension[]? overrideEnvironments = null)
go
NewNodeInjector(SharedVolumeName *string, InstrumentationVersion InstrumentationVersion, OverrideEnvironments *[]EnvironmentExtension)

Properties ​

commandstring[]commandtyping.List[str]commandList<String>Commandstring[]Command*[]*stringrequired#
The command to run the init container.
containerPathstringcontainer_pathstrcontainerPathStringContainerPathstringContainerPath*stringrequired#
The path to ADOT SDK agent in the init container.

Methods ​

injectInitContainer(taskDefinition: TaskDefinition): ContainerDefinitiondef inject_init_container(self, task_definition: TaskDefinition) -> ContainerDefinitionpublic ContainerDefinition injectInitContainer(TaskDefinition taskDefinition)public ContainerDefinition InjectInitContainer(TaskDefinition taskDefinition)func InjectInitContainer(TaskDefinition TaskDefinition) ContainerDefinition#
Inject ADOT SDK agent init container.
1 parameter · returns

Parameters

  • taskDefinitiontask_definitiontaskDefinitiontaskDefinitionTaskDefinition — The TaskDefinition to render.

Returns: The created ContainerDefinition

renderDefaultContainer(taskDefinition: TaskDefinition): voiddef render_default_container(self, task_definition: TaskDefinition) -> Nonepublic void renderDefaultContainer(TaskDefinition taskDefinition)public void RenderDefaultContainer(TaskDefinition taskDefinition)func RenderDefaultContainer(TaskDefinition TaskDefinition)#
Render the application container for SDK instrumentation.
1 parameter

Parameters

  • taskDefinitiontask_definitiontaskDefinitiontaskDefinitionTaskDefinition — The TaskDefinition to render.