Experimental
@aws-cdk/aws-applicationsignals-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
PythonInjector Class
Python-specific implementation of the SDK injector.
Handles Python auto-instrumentation setup and PYTHONPATH 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 pythonInjector = new applicationsignals_alpha.PythonInjector('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
python_injector = applicationsignals_alpha.PythonInjector("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;
PythonInjector pythonInjector = new PythonInjector("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 pythonInjector = new PythonInjector("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
pythonInjector := applicationsignals_alpha.NewPythonInjector(jsii.String("sharedVolumeName"), instrumentationVersion, []EnvironmentExtension{
&EnvironmentExtension{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
})
Initializer
ts
new PythonInjector(sharedVolumeName: string, instrumentationVersion: InstrumentationVersion, overrideEnvironments?: EnvironmentExtension[])
python
PythonInjector(shared_volume_name: str, instrumentation_version: InstrumentationVersion, override_environments: typing.Optional[typing.List[EnvironmentExtension]] = None)
java
new PythonInjector(String sharedVolumeName, InstrumentationVersion instrumentationVersion, List<EnvironmentExtension> overrideEnvironments)
csharp
new PythonInjector(string sharedVolumeName, InstrumentationVersion instrumentationVersion, EnvironmentExtension[]? overrideEnvironments = null)
go
NewPythonInjector(SharedVolumeName *string, InstrumentationVersion InstrumentationVersion, OverrideEnvironments *[]EnvironmentExtension)
Properties
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.