AWS::ApplicationSignals Construct Library
Version 2.273.0-alpha.0
Separate package
@aws-cdk/aws-applicationsignals-alpha is not part of aws-cdk-lib — install it separately:
npm install @aws-cdk/aws-applicationsignals-alpha
pip install aws-cdk.aws-applicationsignals-alpha
This module is experimental (alpha): its API may change in any release, without a major version bump.
The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
CloudWatch Application Signals is an auto-instrumentation solution built on OpenTelemetry that enables zero-code collection of monitoring data, such as traces and metrics, from applications running across multiple platforms. It also supports topology auto-discovery based on collected monitoring data and includes a new feature for managing service-level objectives (SLOs).
It supports Java, Python, .NET, and Node.js on platforms including EKS (and native Kubernetes), Lambda, ECS, and EC2. For more details, visit Application Signals on the AWS public website.
Application Signals Enablement L2 Constructs
A collection of L2 constructs which leverages native L1 CFN resources, simplifying the enablement steps and the creation of Application Signals resources.
ApplicationSignalsIntegration
ApplicationSignalsIntegration aims to address key challenges in the current CDK enablement process, which requires complex manual configurations for ECS customers. Application Signals is designed to be flexible and is supported for other platforms as well. However, the initial focus is on supporting ECS, with plans to potentially extend support to other platforms in the future.
Enable Application Signals on ECS with sidecar mode
- Configure
instrumentationto instrument the application with the ADOT SDK Agent. - Specify
cloudWatchAgentSidecarto configure the CloudWatch Agent as a sidecar container.
import { Construct } from 'constructs';
import * as appsignals from '@aws-cdk/aws-applicationsignals-alpha';
import * as cdk from 'aws-cdk-lib';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as ecs from 'aws-cdk-lib/aws-ecs';
class MyStack extends cdk.Stack {
public constructor(scope?: Construct, id?: string, props: cdk.StackProps = {}) {
super();
const vpc = new ec2.Vpc(this, 'TestVpc', {});
const cluster = new ecs.Cluster(this, 'TestCluster', { vpc });
const fargateTaskDefinition = new ecs.FargateTaskDefinition(this, 'SampleAppTaskDefinition', {
cpu: 2048,
memoryLimitMiB: 4096,
});
fargateTaskDefinition.addContainer('app', {
image: ecs.ContainerImage.fromRegistry('test/sample-app'),
});
new appsignals.ApplicationSignalsIntegration(this, 'ApplicationSignalsIntegration', {
taskDefinition: fargateTaskDefinition,
instrumentation: {
sdkVersion: appsignals.JavaInstrumentationVersion.V2_10_0,
},
serviceName: 'sample-app',
cloudWatchAgentSidecar: {
containerName: 'cloudwatch-agent',
enableLogging: true,
cpu: 256,
memoryLimitMiB: 512,
}
});
new ecs.FargateService(this, 'MySampleApp', {
cluster: cluster,
taskDefinition: fargateTaskDefinition,
desiredCount: 1,
});
}
}
from constructs import Construct
import aws_cdk.aws_applicationsignals_alpha as appsignals
import aws_cdk as cdk
import aws_cdk.aws_ec2 as ec2
import aws_cdk.aws_ecs as ecs
class MyStack(cdk.Stack):
def __init__(self, scope=None, id=None, *, description=None, env=None, stackName=None, tags=None, notificationArns=None, synthesizer=None, terminationProtection=None, analyticsReporting=None, crossRegionReferences=None, permissionsBoundary=None, suppressTemplateIndentation=None, propertyInjectors=None):
super().__init__()
vpc = ec2.Vpc(self, "TestVpc")
cluster = ecs.Cluster(self, "TestCluster", vpc=vpc)
fargate_task_definition = ecs.FargateTaskDefinition(self, "SampleAppTaskDefinition",
cpu=2048,
memory_limit_mi_b=4096
)
fargate_task_definition.add_container("app",
image=ecs.ContainerImage.from_registry("test/sample-app")
)
appsignals.ApplicationSignalsIntegration(self, "ApplicationSignalsIntegration",
task_definition=fargate_task_definition,
instrumentation=appsignals.InstrumentationProps(
sdk_version=appsignals.JavaInstrumentationVersion.V2_10_0
),
service_name="sample-app",
cloud_watch_agent_sidecar=appsignals.CloudWatchAgentOptions(
container_name="cloudwatch-agent",
enable_logging=True,
cpu=256,
memory_limit_mi_b=512
)
)
ecs.FargateService(self, "MySampleApp",
cluster=cluster,
task_definition=fargate_task_definition,
desired_count=1
)
import software.constructs.Construct;
import software.amazon.awscdk.services.applicationsignals.alpha.*;
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.ecs.*;
public class MyStack extends Stack {
public MyStack() {
this(null);
}
public MyStack(Construct scope) {
this(scope, null);
}
public MyStack(Construct scope, String id) {
this(scope, id, StackProps.builder().build());
}
public MyStack(Construct scope, String id, StackProps props) {
super();
Vpc vpc = Vpc.Builder.create(this, "TestVpc").build();
Cluster cluster = Cluster.Builder.create(this, "TestCluster").vpc(vpc).build();
FargateTaskDefinition fargateTaskDefinition = FargateTaskDefinition.Builder.create(this, "SampleAppTaskDefinition")
.cpu(2048)
.memoryLimitMiB(4096)
.build();
fargateTaskDefinition.addContainer("app", ContainerDefinitionOptions.builder()
.image(ContainerImage.fromRegistry("test/sample-app"))
.build());
ApplicationSignalsIntegration.Builder.create(this, "ApplicationSignalsIntegration")
.taskDefinition(fargateTaskDefinition)
.instrumentation(InstrumentationProps.builder()
.sdkVersion(JavaInstrumentationVersion.V2_10_0)
.build())
.serviceName("sample-app")
.cloudWatchAgentSidecar(CloudWatchAgentOptions.builder()
.containerName("cloudwatch-agent")
.enableLogging(true)
.cpu(256)
.memoryLimitMiB(512)
.build())
.build();
FargateService.Builder.create(this, "MySampleApp")
.cluster(cluster)
.taskDefinition(fargateTaskDefinition)
.desiredCount(1)
.build();
}
}
using Constructs;
using Amazon.CDK.AWS.ApplicationSignals.Alpha;
using Amazon.CDK;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.ECS;
class MyStack : Stack
{
public MyStack(Construct? scope=null, string? id=null, StackProps props=new StackProps { }) : base()
{
var vpc = new Vpc(this, "TestVpc", new VpcProps { });
var cluster = new Cluster(this, "TestCluster", new ClusterProps { Vpc = vpc });
var fargateTaskDefinition = new FargateTaskDefinition(this, "SampleAppTaskDefinition", new FargateTaskDefinitionProps {
Cpu = 2048,
MemoryLimitMiB = 4096
});
fargateTaskDefinition.AddContainer("app", new ContainerDefinitionOptions {
Image = ContainerImage.FromRegistry("test/sample-app")
});
new ApplicationSignalsIntegration(this, "ApplicationSignalsIntegration", new ApplicationSignalsIntegrationProps {
TaskDefinition = fargateTaskDefinition,
Instrumentation = new InstrumentationProps {
SdkVersion = JavaInstrumentationVersion.V2_10_0
},
ServiceName = "sample-app",
CloudWatchAgentSidecar = new CloudWatchAgentOptions {
ContainerName = "cloudwatch-agent",
EnableLogging = true,
Cpu = 256,
MemoryLimitMiB = 512
}
});
new FargateService(this, "MySampleApp", new FargateServiceProps {
Cluster = cluster,
TaskDefinition = fargateTaskDefinition,
DesiredCount = 1
});
}
}
import "github.com/aws/constructs-go/constructs"
import "github.com/aws/aws-cdk-go/awscdkapplicationsignalsalpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"
import ec2 "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
type myStack struct {
Stack
}
func newMyStack(scope Construct, id *string, props StackProps) *myStack {
if props == nil {
props = &StackProps{
}
}
this := &myStack{}
cdk.NewStack_Override(this, )
vpc := ec2.NewVpc(this, jsii.String("TestVpc"), &VpcProps{
})
cluster := ecs.NewCluster(this, jsii.String("TestCluster"), &ClusterProps{
Vpc: Vpc,
})
fargateTaskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("SampleAppTaskDefinition"), &FargateTaskDefinitionProps{
Cpu: jsii.Number(2048),
MemoryLimitMiB: jsii.Number(4096),
})
fargateTaskDefinition.AddContainer(jsii.String("app"), &ContainerDefinitionOptions{
Image: ecs.ContainerImage_FromRegistry(jsii.String("test/sample-app")),
})
appsignals.NewApplicationSignalsIntegration(this, jsii.String("ApplicationSignalsIntegration"), &ApplicationSignalsIntegrationProps{
TaskDefinition: fargateTaskDefinition,
Instrumentation: &InstrumentationProps{
SdkVersion: appsignals.JavaInstrumentationVersion_V2_10_0(),
},
ServiceName: jsii.String("sample-app"),
CloudWatchAgentSidecar: &CloudWatchAgentOptions{
ContainerName: jsii.String("cloudwatch-agent"),
EnableLogging: jsii.Boolean(true),
Cpu: jsii.Number(256),
MemoryLimitMiB: jsii.Number(512),
},
})
ecs.NewFargateService(this, jsii.String("MySampleApp"), &FargateServiceProps{
Cluster: cluster,
TaskDefinition: fargateTaskDefinition,
DesiredCount: jsii.Number(1),
})
return this
}
Enable Application Signals on ECS with daemon mode
Note: Since the daemon deployment strategy is not supported on ECS Fargate, this mode is only supported on ECS on EC2.
- Run CloudWatch Agent as a daemon service with HOST network mode.
- Configure
instrumentationto instrument the application with the ADOT Python Agent. - Override environment variables by configuring
overrideEnvironmentsto use service connect endpoints to communicate to the CloudWatch agent server
import { Construct } from 'constructs';
import * as appsignals from '@aws-cdk/aws-applicationsignals-alpha';
import * as cdk from 'aws-cdk-lib';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as ecs from 'aws-cdk-lib/aws-ecs';
class MyStack extends cdk.Stack {
public constructor(scope?: Construct, id?: string, props: cdk.StackProps = {}) {
super(scope, id, props);
const vpc = new ec2.Vpc(this, 'TestVpc', {});
const cluster = new ecs.Cluster(this, 'TestCluster', { vpc });
// Define Task Definition for CloudWatch agent (Daemon)
const cwAgentTaskDefinition = new ecs.Ec2TaskDefinition(this, 'CloudWatchAgentTaskDefinition', {
networkMode: ecs.NetworkMode.HOST,
});
new appsignals.CloudWatchAgentIntegration(this, 'CloudWatchAgentIntegration', {
taskDefinition: cwAgentTaskDefinition,
containerName: 'ecs-cwagent',
enableLogging: false,
cpu: 128,
memoryLimitMiB: 64,
portMappings: [
{
containerPort: 4316,
hostPort: 4316,
},
{
containerPort: 2000,
hostPort: 2000,
},
],
});
// Create the CloudWatch Agent daemon service
new ecs.Ec2Service(this, 'CloudWatchAgentDaemon', {
cluster,
taskDefinition: cwAgentTaskDefinition,
daemon: true, // Runs one container per EC2 instance
});
// Define Task Definition for user application
const sampleAppTaskDefinition = new ecs.Ec2TaskDefinition(this, 'SampleAppTaskDefinition', {
networkMode: ecs.NetworkMode.HOST,
});
sampleAppTaskDefinition.addContainer('app', {
image: ecs.ContainerImage.fromRegistry('test/sample-app'),
cpu: 0,
memoryLimitMiB: 512,
});
// No CloudWatch Agent side car is needed as application container communicates to CloudWatch Agent daemon through host network
new appsignals.ApplicationSignalsIntegration(this, 'ApplicationSignalsIntegration', {
taskDefinition: sampleAppTaskDefinition,
instrumentation: {
sdkVersion: appsignals.PythonInstrumentationVersion.V0_8_0
},
serviceName: 'sample-app'
});
new ecs.Ec2Service(this, 'MySampleApp', {
cluster,
taskDefinition: sampleAppTaskDefinition,
desiredCount: 1,
});
}
}
from constructs import Construct
import aws_cdk.aws_applicationsignals_alpha as appsignals
import aws_cdk as cdk
import aws_cdk.aws_ec2 as ec2
import aws_cdk.aws_ecs as ecs
class MyStack(cdk.Stack):
def __init__(self, scope=None, id=None, *, description=None, env=None, stackName=None, tags=None, notificationArns=None, synthesizer=None, terminationProtection=None, analyticsReporting=None, crossRegionReferences=None, permissionsBoundary=None, suppressTemplateIndentation=None, propertyInjectors=None):
super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, notificationArns=notificationArns, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting, crossRegionReferences=crossRegionReferences, permissionsBoundary=permissionsBoundary, suppressTemplateIndentation=suppressTemplateIndentation, propertyInjectors=propertyInjectors)
vpc = ec2.Vpc(self, "TestVpc")
cluster = ecs.Cluster(self, "TestCluster", vpc=vpc)
# Define Task Definition for CloudWatch agent (Daemon)
cw_agent_task_definition = ecs.Ec2TaskDefinition(self, "CloudWatchAgentTaskDefinition",
network_mode=ecs.NetworkMode.HOST
)
appsignals.CloudWatchAgentIntegration(self, "CloudWatchAgentIntegration",
task_definition=cw_agent_task_definition,
container_name="ecs-cwagent",
enable_logging=False,
cpu=128,
memory_limit_mi_b=64,
port_mappings=[ecs.PortMapping(
container_port=4316,
host_port=4316
), ecs.PortMapping(
container_port=2000,
host_port=2000
)
]
)
# Create the CloudWatch Agent daemon service
ecs.Ec2Service(self, "CloudWatchAgentDaemon",
cluster=cluster,
task_definition=cw_agent_task_definition,
daemon=True
)
# Define Task Definition for user application
sample_app_task_definition = ecs.Ec2TaskDefinition(self, "SampleAppTaskDefinition",
network_mode=ecs.NetworkMode.HOST
)
sample_app_task_definition.add_container("app",
image=ecs.ContainerImage.from_registry("test/sample-app"),
cpu=0,
memory_limit_mi_b=512
)
# No CloudWatch Agent side car is needed as application container communicates to CloudWatch Agent daemon through host network
appsignals.ApplicationSignalsIntegration(self, "ApplicationSignalsIntegration",
task_definition=sample_app_task_definition,
instrumentation=appsignals.InstrumentationProps(
sdk_version=appsignals.PythonInstrumentationVersion.V0_8_0
),
service_name="sample-app"
)
ecs.Ec2Service(self, "MySampleApp",
cluster=cluster,
task_definition=sample_app_task_definition,
desired_count=1
)
import software.constructs.Construct;
import software.amazon.awscdk.services.applicationsignals.alpha.*;
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.ecs.*;
public class MyStack extends Stack {
public MyStack() {
this(null);
}
public MyStack(Construct scope) {
this(scope, null);
}
public MyStack(Construct scope, String id) {
this(scope, id, StackProps.builder().build());
}
public MyStack(Construct scope, String id, StackProps props) {
super(scope, id, props);
Vpc vpc = Vpc.Builder.create(this, "TestVpc").build();
Cluster cluster = Cluster.Builder.create(this, "TestCluster").vpc(vpc).build();
// Define Task Definition for CloudWatch agent (Daemon)
Ec2TaskDefinition cwAgentTaskDefinition = Ec2TaskDefinition.Builder.create(this, "CloudWatchAgentTaskDefinition")
.networkMode(NetworkMode.HOST)
.build();
CloudWatchAgentIntegration.Builder.create(this, "CloudWatchAgentIntegration")
.taskDefinition(cwAgentTaskDefinition)
.containerName("ecs-cwagent")
.enableLogging(false)
.cpu(128)
.memoryLimitMiB(64)
.portMappings(List.of(PortMapping.builder()
.containerPort(4316)
.hostPort(4316)
.build(), PortMapping.builder()
.containerPort(2000)
.hostPort(2000)
.build()))
.build();
// Create the CloudWatch Agent daemon service
// Create the CloudWatch Agent daemon service
Ec2Service.Builder.create(this, "CloudWatchAgentDaemon")
.cluster(cluster)
.taskDefinition(cwAgentTaskDefinition)
.daemon(true)
.build();
// Define Task Definition for user application
Ec2TaskDefinition sampleAppTaskDefinition = Ec2TaskDefinition.Builder.create(this, "SampleAppTaskDefinition")
.networkMode(NetworkMode.HOST)
.build();
sampleAppTaskDefinition.addContainer("app", ContainerDefinitionOptions.builder()
.image(ContainerImage.fromRegistry("test/sample-app"))
.cpu(0)
.memoryLimitMiB(512)
.build());
// No CloudWatch Agent side car is needed as application container communicates to CloudWatch Agent daemon through host network
// No CloudWatch Agent side car is needed as application container communicates to CloudWatch Agent daemon through host network
ApplicationSignalsIntegration.Builder.create(this, "ApplicationSignalsIntegration")
.taskDefinition(sampleAppTaskDefinition)
.instrumentation(InstrumentationProps.builder()
.sdkVersion(PythonInstrumentationVersion.V0_8_0)
.build())
.serviceName("sample-app")
.build();
Ec2Service.Builder.create(this, "MySampleApp")
.cluster(cluster)
.taskDefinition(sampleAppTaskDefinition)
.desiredCount(1)
.build();
}
}
using Constructs;
using Amazon.CDK.AWS.ApplicationSignals.Alpha;
using Amazon.CDK;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.ECS;
class MyStack : Stack
{
public MyStack(Construct? scope=null, string? id=null, StackProps props=new StackProps { }) : base(scope, id, props)
{
var vpc = new Vpc(this, "TestVpc", new VpcProps { });
var cluster = new Cluster(this, "TestCluster", new ClusterProps { Vpc = vpc });
// Define Task Definition for CloudWatch agent (Daemon)
var cwAgentTaskDefinition = new Ec2TaskDefinition(this, "CloudWatchAgentTaskDefinition", new Ec2TaskDefinitionProps {
NetworkMode = NetworkMode.HOST
});
new CloudWatchAgentIntegration(this, "CloudWatchAgentIntegration", new CloudWatchAgentIntegrationProps {
TaskDefinition = cwAgentTaskDefinition,
ContainerName = "ecs-cwagent",
EnableLogging = false,
Cpu = 128,
MemoryLimitMiB = 64,
PortMappings = new [] { new PortMapping {
ContainerPort = 4316,
HostPort = 4316
}, new PortMapping {
ContainerPort = 2000,
HostPort = 2000
} }
});
// Create the CloudWatch Agent daemon service
// Create the CloudWatch Agent daemon service
new Ec2Service(this, "CloudWatchAgentDaemon", new Ec2ServiceProps {
Cluster = cluster,
TaskDefinition = cwAgentTaskDefinition,
Daemon = true
});
// Define Task Definition for user application
var sampleAppTaskDefinition = new Ec2TaskDefinition(this, "SampleAppTaskDefinition", new Ec2TaskDefinitionProps {
NetworkMode = NetworkMode.HOST
});
sampleAppTaskDefinition.AddContainer("app", new ContainerDefinitionOptions {
Image = ContainerImage.FromRegistry("test/sample-app"),
Cpu = 0,
MemoryLimitMiB = 512
});
// No CloudWatch Agent side car is needed as application container communicates to CloudWatch Agent daemon through host network
// No CloudWatch Agent side car is needed as application container communicates to CloudWatch Agent daemon through host network
new ApplicationSignalsIntegration(this, "ApplicationSignalsIntegration", new ApplicationSignalsIntegrationProps {
TaskDefinition = sampleAppTaskDefinition,
Instrumentation = new InstrumentationProps {
SdkVersion = PythonInstrumentationVersion.V0_8_0
},
ServiceName = "sample-app"
});
new Ec2Service(this, "MySampleApp", new Ec2ServiceProps {
Cluster = cluster,
TaskDefinition = sampleAppTaskDefinition,
DesiredCount = 1
});
}
}
import "github.com/aws/constructs-go/constructs"
import "github.com/aws/aws-cdk-go/awscdkapplicationsignalsalpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"
import ec2 "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
type myStack struct {
Stack
}
func newMyStack(scope Construct, id *string, props StackProps) *myStack {
if props == nil {
props = &StackProps{
}
}
this := &myStack{}
cdk.NewStack_Override(this, scope, id, props)
vpc := ec2.NewVpc(this, jsii.String("TestVpc"), &VpcProps{
})
cluster := ecs.NewCluster(this, jsii.String("TestCluster"), &ClusterProps{
Vpc: Vpc,
})
// Define Task Definition for CloudWatch agent (Daemon)
cwAgentTaskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("CloudWatchAgentTaskDefinition"), &Ec2TaskDefinitionProps{
NetworkMode: ecs.NetworkMode_HOST,
})
appsignals.NewCloudWatchAgentIntegration(this, jsii.String("CloudWatchAgentIntegration"), &CloudWatchAgentIntegrationProps{
TaskDefinition: cwAgentTaskDefinition,
ContainerName: jsii.String("ecs-cwagent"),
EnableLogging: jsii.Boolean(false),
Cpu: jsii.Number(128),
MemoryLimitMiB: jsii.Number(64),
PortMappings: []PortMapping{
&PortMapping{
ContainerPort: jsii.Number(4316),
HostPort: jsii.Number(4316),
},
&PortMapping{
ContainerPort: jsii.Number(2000),
HostPort: jsii.Number(2000),
},
},
})
// Create the CloudWatch Agent daemon service
// Create the CloudWatch Agent daemon service
ecs.NewEc2Service(this, jsii.String("CloudWatchAgentDaemon"), &Ec2ServiceProps{
Cluster: Cluster,
TaskDefinition: cwAgentTaskDefinition,
Daemon: jsii.Boolean(true),
})
// Define Task Definition for user application
sampleAppTaskDefinition := ecs.NewEc2TaskDefinition(this, jsii.String("SampleAppTaskDefinition"), &Ec2TaskDefinitionProps{
NetworkMode: ecs.NetworkMode_HOST,
})
sampleAppTaskDefinition.AddContainer(jsii.String("app"), &ContainerDefinitionOptions{
Image: ecs.ContainerImage_FromRegistry(jsii.String("test/sample-app")),
Cpu: jsii.Number(0),
MemoryLimitMiB: jsii.Number(512),
})
// No CloudWatch Agent side car is needed as application container communicates to CloudWatch Agent daemon through host network
// No CloudWatch Agent side car is needed as application container communicates to CloudWatch Agent daemon through host network
appsignals.NewApplicationSignalsIntegration(this, jsii.String("ApplicationSignalsIntegration"), &ApplicationSignalsIntegrationProps{
TaskDefinition: sampleAppTaskDefinition,
Instrumentation: &InstrumentationProps{
SdkVersion: appsignals.PythonInstrumentationVersion_V0_8_0(),
},
ServiceName: jsii.String("sample-app"),
})
ecs.NewEc2Service(this, jsii.String("MySampleApp"), &Ec2ServiceProps{
Cluster: Cluster,
TaskDefinition: sampleAppTaskDefinition,
DesiredCount: jsii.Number(1),
})
return this
}
Enable Application Signals on ECS with replica mode
NoteRunning CloudWatch Agent service using replica mode requires specific security group configurations to enable communication with other services. For Application Signals functionality, configure the security group with the following minimum inbound rules: Port 2000 (HTTP) and Port 4316 (HTTP). This configuration ensures proper connectivity between the CloudWatch Agent and dependent services.
- Run CloudWatch Agent as a replica service with service connect.
- Configure
instrumentationto instrument the application with the ADOT Python Agent. - Override environment variables by configuring
overrideEnvironmentsto use service connect endpoints to communicate to the CloudWatch agent server
import { Construct } from 'constructs';
import * as appsignals from '@aws-cdk/aws-applicationsignals-alpha';
import * as cdk from 'aws-cdk-lib';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as ecs from 'aws-cdk-lib/aws-ecs';
import { PrivateDnsNamespace } from 'aws-cdk-lib/aws-servicediscovery';
class MyStack extends cdk.Stack {
public constructor(scope?: Construct, id?: string, props: cdk.StackProps = {}) {
super(scope, id, props);
const vpc = new ec2.Vpc(this, 'TestVpc', {});
const cluster = new ecs.Cluster(this, 'TestCluster', { vpc });
const dnsNamespace = new PrivateDnsNamespace(this, 'Namespace', {
vpc,
name: 'local',
});
const securityGroup = new ec2.SecurityGroup(this, 'ECSSG', { vpc });
securityGroup.addIngressRule(securityGroup, ec2.Port.tcpRange(0, 65535));
// Define Task Definition for CloudWatch agent (Replica)
const cwAgentTaskDefinition = new ecs.FargateTaskDefinition(this, 'CloudWatchAgentTaskDefinition', {});
new appsignals.CloudWatchAgentIntegration(this, 'CloudWatchAgentIntegration', {
taskDefinition: cwAgentTaskDefinition,
containerName: 'ecs-cwagent',
enableLogging: false,
cpu: 128,
memoryLimitMiB: 64,
portMappings: [
{
name: 'cwagent-4316',
containerPort: 4316,
hostPort: 4316,
},
{
name: 'cwagent-2000',
containerPort: 2000,
hostPort: 2000,
},
],
});
// Create the CloudWatch Agent replica service with service connect
new ecs.FargateService(this, 'CloudWatchAgentService', {
cluster: cluster,
taskDefinition: cwAgentTaskDefinition,
securityGroups: [securityGroup],
serviceConnectConfiguration: {
namespace: dnsNamespace.namespaceArn,
services: [
{
portMappingName: 'cwagent-4316',
dnsName: 'cwagent-4316-http',
port: 4316,
},
{
portMappingName: 'cwagent-2000',
dnsName: 'cwagent-2000-http',
port: 2000,
},
],
},
desiredCount: 1,
});
// Define Task Definition for user application
const sampleAppTaskDefinition = new ecs.FargateTaskDefinition(this, 'SampleAppTaskDefinition', {});
sampleAppTaskDefinition.addContainer('app', {
image: ecs.ContainerImage.fromRegistry('test/sample-app'),
cpu: 0,
memoryLimitMiB: 512,
});
// Overwrite environment variables to connect to the CloudWatch Agent service just created
new appsignals.ApplicationSignalsIntegration(this, 'ApplicationSignalsIntegration', {
taskDefinition: sampleAppTaskDefinition,
instrumentation: {
sdkVersion: appsignals.PythonInstrumentationVersion.V0_8_0,
},
serviceName: 'sample-app',
overrideEnvironments: [
{
name: appsignals.CommonExporting.OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT,
value: 'http://cwagent-4316-http:4316/v1/metrics',
},
{
name: appsignals.TraceExporting.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT,
value: 'http://cwagent-4316-http:4316/v1/traces',
},
{
name: appsignals.TraceExporting.OTEL_TRACES_SAMPLER_ARG,
value: 'endpoint=http://cwagent-2000-http:2000',
},
],
});
// Create ECS Service with service connect configuration
new ecs.FargateService(this, 'MySampleApp', {
cluster: cluster,
taskDefinition: sampleAppTaskDefinition,
serviceConnectConfiguration: {
namespace: dnsNamespace.namespaceArn,
},
desiredCount: 1,
});
}
}
from constructs import Construct
import aws_cdk.aws_applicationsignals_alpha as appsignals
import aws_cdk as cdk
import aws_cdk.aws_ec2 as ec2
import aws_cdk.aws_ecs as ecs
from aws_cdk.aws_servicediscovery import PrivateDnsNamespace
class MyStack(cdk.Stack):
def __init__(self, scope=None, id=None, *, description=None, env=None, stackName=None, tags=None, notificationArns=None, synthesizer=None, terminationProtection=None, analyticsReporting=None, crossRegionReferences=None, permissionsBoundary=None, suppressTemplateIndentation=None, propertyInjectors=None):
super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, notificationArns=notificationArns, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting, crossRegionReferences=crossRegionReferences, permissionsBoundary=permissionsBoundary, suppressTemplateIndentation=suppressTemplateIndentation, propertyInjectors=propertyInjectors)
vpc = ec2.Vpc(self, "TestVpc")
cluster = ecs.Cluster(self, "TestCluster", vpc=vpc)
dns_namespace = PrivateDnsNamespace(self, "Namespace",
vpc=vpc,
name="local"
)
security_group = ec2.SecurityGroup(self, "ECSSG", vpc=vpc)
security_group.add_ingress_rule(security_group, ec2.Port.tcp_range(0, 65535))
# Define Task Definition for CloudWatch agent (Replica)
cw_agent_task_definition = ecs.FargateTaskDefinition(self, "CloudWatchAgentTaskDefinition")
appsignals.CloudWatchAgentIntegration(self, "CloudWatchAgentIntegration",
task_definition=cw_agent_task_definition,
container_name="ecs-cwagent",
enable_logging=False,
cpu=128,
memory_limit_mi_b=64,
port_mappings=[ecs.PortMapping(
name="cwagent-4316",
container_port=4316,
host_port=4316
), ecs.PortMapping(
name="cwagent-2000",
container_port=2000,
host_port=2000
)
]
)
# Create the CloudWatch Agent replica service with service connect
ecs.FargateService(self, "CloudWatchAgentService",
cluster=cluster,
task_definition=cw_agent_task_definition,
security_groups=[security_group],
service_connect_configuration=ecs.ServiceConnectProps(
namespace=dns_namespace.namespace_arn,
services=[ecs.ServiceConnectService(
port_mapping_name="cwagent-4316",
dns_name="cwagent-4316-http",
port=4316
), ecs.ServiceConnectService(
port_mapping_name="cwagent-2000",
dns_name="cwagent-2000-http",
port=2000
)
]
),
desired_count=1
)
# Define Task Definition for user application
sample_app_task_definition = ecs.FargateTaskDefinition(self, "SampleAppTaskDefinition")
sample_app_task_definition.add_container("app",
image=ecs.ContainerImage.from_registry("test/sample-app"),
cpu=0,
memory_limit_mi_b=512
)
# Overwrite environment variables to connect to the CloudWatch Agent service just created
appsignals.ApplicationSignalsIntegration(self, "ApplicationSignalsIntegration",
task_definition=sample_app_task_definition,
instrumentation=appsignals.InstrumentationProps(
sdk_version=appsignals.PythonInstrumentationVersion.V0_8_0
),
service_name="sample-app",
override_environments=[appsignals.EnvironmentExtension(
name=appsignals.CommonExporting.OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT,
value="http://cwagent-4316-http:4316/v1/metrics"
), appsignals.EnvironmentExtension(
name=appsignals.TraceExporting.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT,
value="http://cwagent-4316-http:4316/v1/traces"
), appsignals.EnvironmentExtension(
name=appsignals.TraceExporting.OTEL_TRACES_SAMPLER_ARG,
value="endpoint=http://cwagent-2000-http:2000"
)
]
)
# Create ECS Service with service connect configuration
ecs.FargateService(self, "MySampleApp",
cluster=cluster,
task_definition=sample_app_task_definition,
service_connect_configuration=ecs.ServiceConnectProps(
namespace=dns_namespace.namespace_arn
),
desired_count=1
)
import software.constructs.Construct;
import software.amazon.awscdk.services.applicationsignals.alpha.*;
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.ecs.*;
import software.amazon.awscdk.services.servicediscovery.PrivateDnsNamespace;
public class MyStack extends Stack {
public MyStack() {
this(null);
}
public MyStack(Construct scope) {
this(scope, null);
}
public MyStack(Construct scope, String id) {
this(scope, id, StackProps.builder().build());
}
public MyStack(Construct scope, String id, StackProps props) {
super(scope, id, props);
Vpc vpc = Vpc.Builder.create(this, "TestVpc").build();
Cluster cluster = Cluster.Builder.create(this, "TestCluster").vpc(vpc).build();
PrivateDnsNamespace dnsNamespace = PrivateDnsNamespace.Builder.create(this, "Namespace")
.vpc(vpc)
.name("local")
.build();
SecurityGroup securityGroup = SecurityGroup.Builder.create(this, "ECSSG").vpc(vpc).build();
securityGroup.addIngressRule(securityGroup, Port.tcpRange(0, 65535));
// Define Task Definition for CloudWatch agent (Replica)
FargateTaskDefinition cwAgentTaskDefinition = FargateTaskDefinition.Builder.create(this, "CloudWatchAgentTaskDefinition").build();
CloudWatchAgentIntegration.Builder.create(this, "CloudWatchAgentIntegration")
.taskDefinition(cwAgentTaskDefinition)
.containerName("ecs-cwagent")
.enableLogging(false)
.cpu(128)
.memoryLimitMiB(64)
.portMappings(List.of(PortMapping.builder()
.name("cwagent-4316")
.containerPort(4316)
.hostPort(4316)
.build(), PortMapping.builder()
.name("cwagent-2000")
.containerPort(2000)
.hostPort(2000)
.build()))
.build();
// Create the CloudWatch Agent replica service with service connect
// Create the CloudWatch Agent replica service with service connect
FargateService.Builder.create(this, "CloudWatchAgentService")
.cluster(cluster)
.taskDefinition(cwAgentTaskDefinition)
.securityGroups(List.of(securityGroup))
.serviceConnectConfiguration(ServiceConnectProps.builder()
.namespace(dnsNamespace.getNamespaceArn())
.services(List.of(ServiceConnectService.builder()
.portMappingName("cwagent-4316")
.dnsName("cwagent-4316-http")
.port(4316)
.build(), ServiceConnectService.builder()
.portMappingName("cwagent-2000")
.dnsName("cwagent-2000-http")
.port(2000)
.build()))
.build())
.desiredCount(1)
.build();
// Define Task Definition for user application
FargateTaskDefinition sampleAppTaskDefinition = FargateTaskDefinition.Builder.create(this, "SampleAppTaskDefinition").build();
sampleAppTaskDefinition.addContainer("app", ContainerDefinitionOptions.builder()
.image(ContainerImage.fromRegistry("test/sample-app"))
.cpu(0)
.memoryLimitMiB(512)
.build());
// Overwrite environment variables to connect to the CloudWatch Agent service just created
// Overwrite environment variables to connect to the CloudWatch Agent service just created
ApplicationSignalsIntegration.Builder.create(this, "ApplicationSignalsIntegration")
.taskDefinition(sampleAppTaskDefinition)
.instrumentation(InstrumentationProps.builder()
.sdkVersion(PythonInstrumentationVersion.V0_8_0)
.build())
.serviceName("sample-app")
.overrideEnvironments(List.of(EnvironmentExtension.builder()
.name(CommonExporting.OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT)
.value("http://cwagent-4316-http:4316/v1/metrics")
.build(), EnvironmentExtension.builder()
.name(TraceExporting.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT)
.value("http://cwagent-4316-http:4316/v1/traces")
.build(), EnvironmentExtension.builder()
.name(TraceExporting.OTEL_TRACES_SAMPLER_ARG)
.value("endpoint=http://cwagent-2000-http:2000")
.build()))
.build();
// Create ECS Service with service connect configuration
// Create ECS Service with service connect configuration
FargateService.Builder.create(this, "MySampleApp")
.cluster(cluster)
.taskDefinition(sampleAppTaskDefinition)
.serviceConnectConfiguration(ServiceConnectProps.builder()
.namespace(dnsNamespace.getNamespaceArn())
.build())
.desiredCount(1)
.build();
}
}
using Constructs;
using Amazon.CDK.AWS.ApplicationSignals.Alpha;
using Amazon.CDK;
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.ECS;
using Amazon.CDK.AWS.ServiceDiscovery;
class MyStack : Stack
{
public MyStack(Construct? scope=null, string? id=null, StackProps props=new StackProps { }) : base(scope, id, props)
{
var vpc = new Vpc(this, "TestVpc", new VpcProps { });
var cluster = new Cluster(this, "TestCluster", new ClusterProps { Vpc = vpc });
var dnsNamespace = new PrivateDnsNamespace(this, "Namespace", new PrivateDnsNamespaceProps {
Vpc = vpc,
Name = "local"
});
var securityGroup = new SecurityGroup(this, "ECSSG", new SecurityGroupProps { Vpc = vpc });
securityGroup.AddIngressRule(securityGroup, Port.TcpRange(0, 65535));
// Define Task Definition for CloudWatch agent (Replica)
var cwAgentTaskDefinition = new FargateTaskDefinition(this, "CloudWatchAgentTaskDefinition", new FargateTaskDefinitionProps { });
new CloudWatchAgentIntegration(this, "CloudWatchAgentIntegration", new CloudWatchAgentIntegrationProps {
TaskDefinition = cwAgentTaskDefinition,
ContainerName = "ecs-cwagent",
EnableLogging = false,
Cpu = 128,
MemoryLimitMiB = 64,
PortMappings = new [] { new PortMapping {
Name = "cwagent-4316",
ContainerPort = 4316,
HostPort = 4316
}, new PortMapping {
Name = "cwagent-2000",
ContainerPort = 2000,
HostPort = 2000
} }
});
// Create the CloudWatch Agent replica service with service connect
// Create the CloudWatch Agent replica service with service connect
new FargateService(this, "CloudWatchAgentService", new FargateServiceProps {
Cluster = cluster,
TaskDefinition = cwAgentTaskDefinition,
SecurityGroups = new [] { securityGroup },
ServiceConnectConfiguration = new ServiceConnectProps {
Namespace = dnsNamespace.NamespaceArn,
Services = new [] { new ServiceConnectService {
PortMappingName = "cwagent-4316",
DnsName = "cwagent-4316-http",
Port = 4316
}, new ServiceConnectService {
PortMappingName = "cwagent-2000",
DnsName = "cwagent-2000-http",
Port = 2000
} }
},
DesiredCount = 1
});
// Define Task Definition for user application
var sampleAppTaskDefinition = new FargateTaskDefinition(this, "SampleAppTaskDefinition", new FargateTaskDefinitionProps { });
sampleAppTaskDefinition.AddContainer("app", new ContainerDefinitionOptions {
Image = ContainerImage.FromRegistry("test/sample-app"),
Cpu = 0,
MemoryLimitMiB = 512
});
// Overwrite environment variables to connect to the CloudWatch Agent service just created
// Overwrite environment variables to connect to the CloudWatch Agent service just created
new ApplicationSignalsIntegration(this, "ApplicationSignalsIntegration", new ApplicationSignalsIntegrationProps {
TaskDefinition = sampleAppTaskDefinition,
Instrumentation = new InstrumentationProps {
SdkVersion = PythonInstrumentationVersion.V0_8_0
},
ServiceName = "sample-app",
OverrideEnvironments = new [] { new EnvironmentExtension {
Name = CommonExporting.OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT,
Value = "http://cwagent-4316-http:4316/v1/metrics"
}, new EnvironmentExtension {
Name = TraceExporting.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT,
Value = "http://cwagent-4316-http:4316/v1/traces"
}, new EnvironmentExtension {
Name = TraceExporting.OTEL_TRACES_SAMPLER_ARG,
Value = "endpoint=http://cwagent-2000-http:2000"
} }
});
// Create ECS Service with service connect configuration
// Create ECS Service with service connect configuration
new FargateService(this, "MySampleApp", new FargateServiceProps {
Cluster = cluster,
TaskDefinition = sampleAppTaskDefinition,
ServiceConnectConfiguration = new ServiceConnectProps {
Namespace = dnsNamespace.NamespaceArn
},
DesiredCount = 1
});
}
}
import "github.com/aws/constructs-go/constructs"
import "github.com/aws/aws-cdk-go/awscdkapplicationsignalsalpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
type myStack struct {
Stack
}
func newMyStack(scope Construct, id *string, props StackProps) *myStack {
if props == nil {
props = &StackProps{
}
}
this := &myStack{}
cdk.NewStack_Override(this, scope, id, props)
vpc := ec2.NewVpc(this, jsii.String("TestVpc"), &VpcProps{
})
cluster := ecs.NewCluster(this, jsii.String("TestCluster"), &ClusterProps{
Vpc: Vpc,
})
dnsNamespace := awscdk.NewPrivateDnsNamespace(this, jsii.String("Namespace"), &PrivateDnsNamespaceProps{
Vpc: Vpc,
Name: jsii.String("local"),
})
securityGroup := ec2.NewSecurityGroup(this, jsii.String("ECSSG"), &SecurityGroupProps{
Vpc: Vpc,
})
securityGroup.AddIngressRule(securityGroup, ec2.Port_TcpRange(jsii.Number(0), jsii.Number(65535)))
// Define Task Definition for CloudWatch agent (Replica)
cwAgentTaskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("CloudWatchAgentTaskDefinition"), &FargateTaskDefinitionProps{
})
appsignals.NewCloudWatchAgentIntegration(this, jsii.String("CloudWatchAgentIntegration"), &CloudWatchAgentIntegrationProps{
TaskDefinition: cwAgentTaskDefinition,
ContainerName: jsii.String("ecs-cwagent"),
EnableLogging: jsii.Boolean(false),
Cpu: jsii.Number(128),
MemoryLimitMiB: jsii.Number(64),
PortMappings: []PortMapping{
&PortMapping{
Name: jsii.String("cwagent-4316"),
ContainerPort: jsii.Number(4316),
HostPort: jsii.Number(4316),
},
&PortMapping{
Name: jsii.String("cwagent-2000"),
ContainerPort: jsii.Number(2000),
HostPort: jsii.Number(2000),
},
},
})
// Create the CloudWatch Agent replica service with service connect
// Create the CloudWatch Agent replica service with service connect
ecs.NewFargateService(this, jsii.String("CloudWatchAgentService"), &FargateServiceProps{
Cluster: cluster,
TaskDefinition: cwAgentTaskDefinition,
SecurityGroups: []ISecurityGroup{
securityGroup,
},
ServiceConnectConfiguration: &ServiceConnectProps{
Namespace: dnsNamespace.NamespaceArn,
Services: []ServiceConnectService{
&ServiceConnectService{
PortMappingName: jsii.String("cwagent-4316"),
DnsName: jsii.String("cwagent-4316-http"),
Port: jsii.Number(4316),
},
&ServiceConnectService{
PortMappingName: jsii.String("cwagent-2000"),
DnsName: jsii.String("cwagent-2000-http"),
Port: jsii.Number(2000),
},
},
},
DesiredCount: jsii.Number(1),
})
// Define Task Definition for user application
sampleAppTaskDefinition := ecs.NewFargateTaskDefinition(this, jsii.String("SampleAppTaskDefinition"), &FargateTaskDefinitionProps{
})
sampleAppTaskDefinition.AddContainer(jsii.String("app"), &ContainerDefinitionOptions{
Image: ecs.ContainerImage_FromRegistry(jsii.String("test/sample-app")),
Cpu: jsii.Number(0),
MemoryLimitMiB: jsii.Number(512),
})
// Overwrite environment variables to connect to the CloudWatch Agent service just created
// Overwrite environment variables to connect to the CloudWatch Agent service just created
appsignals.NewApplicationSignalsIntegration(this, jsii.String("ApplicationSignalsIntegration"), &ApplicationSignalsIntegrationProps{
TaskDefinition: sampleAppTaskDefinition,
Instrumentation: &InstrumentationProps{
SdkVersion: appsignals.PythonInstrumentationVersion_V0_8_0(),
},
ServiceName: jsii.String("sample-app"),
OverrideEnvironments: []EnvironmentExtension{
&EnvironmentExtension{
Name: appsignals.CommonExporting_OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT(),
Value: jsii.String("http://cwagent-4316-http:4316/v1/metrics"),
},
&EnvironmentExtension{
Name: appsignals.TraceExporting_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT(),
Value: jsii.String("http://cwagent-4316-http:4316/v1/traces"),
},
&EnvironmentExtension{
Name: appsignals.TraceExporting_OTEL_TRACES_SAMPLER_ARG(),
Value: jsii.String("endpoint=http://cwagent-2000-http:2000"),
},
},
})
// Create ECS Service with service connect configuration
// Create ECS Service with service connect configuration
ecs.NewFargateService(this, jsii.String("MySampleApp"), &FargateServiceProps{
Cluster: cluster,
TaskDefinition: sampleAppTaskDefinition,
ServiceConnectConfiguration: &ServiceConnectProps{
Namespace: dnsNamespace.*NamespaceArn,
},
DesiredCount: jsii.Number(1),
})
return this
}
Types
| Name | Kind | Summary |
|---|---|---|
ApplicationSignalsIntegration | Construct | Class for integrating Application Signals into an ECS task definition. |
ApplicationSignalsIntegrationProps | Struct | Interface for Application Signals properties. |
CloudWatchAgentIntegration | Construct | A construct that adds CloudWatch Agent as a container to an ECS task definition. |
CloudWatchAgentIntegrationProps | Struct | Properties for integrating CloudWatch Agent into an ECS task definition. |
CloudWatchAgentOptions | Struct | Configuration options for the CloudWatch Agent container. |
CloudWatchAgentVersion | Class | Provides version information and image selection for CloudWatch Agent. |
CommonExporting | Class | Common OpenTelemetry exporter configurations and AWS Application Signals settings. |
DotNetInjector | Class | Base class for .NET SDK injectors. Contains common .NET configuration settings used by both Windows and Linux implementations. |
DotnetInstrumentation | Class | .NET-specific OpenTelemetry instrumentation configurations. Contains constants for .NET runtime settings, profiler configurations, and paths for both Linux and Windows environments. |
DotnetInstrumentationVersion | Class | Available versions for .NET instrumentation. |
DotNetLinuxInjector | Class | Linux-specific implementation of the .NET SDK injector. Handles CoreCLR profiler setup and paths for Linux environments. |
DotNetWindowsInjector | Class | Windows-specific implementation of the .NET SDK injector. Handles CoreCLR profiler setup and paths for Windows environments. |
EnvironmentExtension | Struct | Interface for environment extensions. |
Injector | Class | Injector is a base class for all SDK injects to mutate the task definition to inject the ADOT init container and configure the application container with the necessary environment variables. |
InstrumentationProps | Struct | Interface for instrumentation properties. |
InstrumentationVersion | Class | Base class for instrumentation versions. |
JavaInjector | Class | Java-specific implementation of the SDK injector. |
JavaInstrumentation | Class | Java-specific OpenTelemetry instrumentation configurations. |
JavaInstrumentationVersion | Class | Available versions for Java instrumentation. |
LogsExporting | Class | OpenTelemetry logs exporter configurations. |
MetricsExporting | Class | OpenTelemetry metrics exporter configurations. |
NodeInjector | Class | Node.js-specific implementation of the SDK injector. Handles Node.js auto-instrumentation setup and NODE_OPTIONS configuration. |
NodeInstrumentation | Class | Node-specific OpenTelemetry instrumentation configurations. |
NodeInstrumentationVersion | Class | Available versions for Node.js instrumentation. |
PythonInjector | Class | Python-specific implementation of the SDK injector. |
PythonInstrumentation | Class | Python-specific OpenTelemetry instrumentation configurations. |
PythonInstrumentationVersion | Class | Available versions for Python instrumentation. |
TraceExporting | Class | OpenTelemetry trace exporter and sampling configurations. |