Show / Hide Table of Contents

Class PythonInstrumentationVersion

(experimental) Available versions for Python instrumentation.

Inheritance
object
InstrumentationVersion
PythonInstrumentationVersion
Inherited Members
InstrumentationVersion.ImageURI()
InstrumentationVersion.MemoryLimitMiB()
InstrumentationVersion.ImageRepo
InstrumentationVersion.MemoryLimit
InstrumentationVersion.Version
Namespace: Amazon.CDK.AWS.ApplicationSignals.Alpha
Assembly: Amazon.CDK.AWS.ApplicationSignals.Alpha.dll
Syntax (csharp)
public class PythonInstrumentationVersion : InstrumentationVersion
Syntax (vb)
Public Class PythonInstrumentationVersion Inherits InstrumentationVersion
Remarks

Stability: Experimental

ExampleMetadata: infused

Examples
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
                     });
                 }
             }

Synopsis

Constructors

PythonInstrumentationVersion(string, string, double)

(experimental) Available versions for Python instrumentation.

Properties

DEFAULT_MEMORY_LIMIT_MIB

(experimental) The default memory limit of the Python instrumentation.

IMAGE_REPO

(experimental) The image repository for Python instrumentation.

V0_8_0

(experimental) ADOT Python Instrumentation version 0.8.0.

V0_9_0

(experimental) ADOT Python Instrumentation version 0.8.0.

Constructors

PythonInstrumentationVersion(string, string, double)

(experimental) Available versions for Python instrumentation.

public PythonInstrumentationVersion(string imageRepo, string version, double memoryLimit)
Parameters
imageRepo string
version string
memoryLimit double
Remarks

Stability: Experimental

Properties

DEFAULT_MEMORY_LIMIT_MIB

(experimental) The default memory limit of the Python instrumentation.

public static double DEFAULT_MEMORY_LIMIT_MIB { get; }
Property Value

double

Remarks

Stability: Experimental

IMAGE_REPO

(experimental) The image repository for Python instrumentation.

public static string IMAGE_REPO { get; }
Property Value

string

Remarks

Stability: Experimental

V0_8_0

(experimental) ADOT Python Instrumentation version 0.8.0.

public static PythonInstrumentationVersion V0_8_0 { get; }
Property Value

PythonInstrumentationVersion

Remarks

Stability: Experimental

V0_9_0

(experimental) ADOT Python Instrumentation version 0.8.0.

public static PythonInstrumentationVersion V0_9_0 { get; }
Property Value

PythonInstrumentationVersion

Remarks

Stability: Experimental

Back to top Generated by DocFX