Commit 11c7981
Evals for ECS django enablement support (#511)
*Issue description:*
awslabs/mcp#1808
*Description of changes:*
ECS Django CDK:
```
(mcp-testing) [/Volumes/workplace/wangzl/aws-application-signals-test-framework/mcp-testing]$ python -m evals tasks --task-id ecs_python_django_cdk
Using MCP repository: /Volumes/workplace/wangzl/mcpdev/mcp
Starting MCP tool evaluation for tasks
Loaded 1 task(s)
- ecs_python_django_cdk
============================================================
EVALUATION RESULT: ecs_python_django_cdk
============================================================
Duration: 101.46s
Turns: 10
Tool Calls: 9 (4 unique)
Hit Rate: 100.0%
Success Rate: 100.0%
File Operations: 8
Tool Breakdown:
- get_enablement_guide: 1 calls (1 success, 0 failed)
- list_files: 4 calls (4 success, 0 failed)
- read_file: 3 calls (3 success, 0 failed)
- write_file: 1 calls (1 success, 0 failed)
Validation Results:
Build: ✅ PASS (1/1 criteria met)
[PASS] Build succeeds
Reasoning: Build completed with exit code 0
LLM Judge: ✅ PASS (23/23 criteria met)
[PASS] IAM: CloudWatchAgentServerPolicy attached to ECS application role
Reasoning: CloudWatchAgentServerPolicy is attached to the ECS task role in the managedPolicies array.
[PASS] CloudWatch Agent: Sidecar container added to ECS task definition
Reasoning: CloudWatch Agent sidecar container is added to the ECS task definition with proper configuration.
[PASS] CloudWatch Agent: CloudWatch Agent configuration file added to ECS task definition
Reasoning: CloudWatch Agent configuration is provided via CW_CONFIG_CONTENT environment variable.
[PASS] CloudWatch Agent: Configuration file created with traces.traces_collected.application_signals
Reasoning: Configuration includes traces.traces_collected.application_signals in the CW_CONFIG_CONTENT.
[PASS] CloudWatch Agent: Configuration file created with logs.metrics_collected.application_signals
Reasoning: Configuration includes logs.metrics_collected.application_signals in the CW_CONFIG_CONTENT.
[PASS] CloudWatch Agent: Log group created for CloudWatch Agent logs
Reasoning: CloudWatch Agent log group is created with name '/ecs/ecs-cwagent'.
[PASS] ADOT SDK: ADOT SDK container added as sidecar to ECS task definition
Reasoning: ADOT SDK container (init container) is added as sidecar to copy auto-instrumentation files.
[PASS] ADOT SDK: ADOT SDK container added volumeMount for opentelemetry-auto-instrumentation
Reasoning: ADOT SDK container includes volumeMount for opentelemetry-auto-instrumentation-python.
[PASS] Integrity: Application container modified to include volumeMount from ADOT SDK container
Reasoning: Application container is modified to include volumeMount from ADOT SDK container.
[PASS] Integrity: Aplication containder added container dependency on ADOT SDK container
Reasoning: Application container has container dependency on ADOT SDK container (init container) with SUCCESS condition.
[PASS] Integrity: Application container added container dependency on CloudWatch Agent container
Reasoning: Application container has container dependency on CloudWatch Agent container with START condition.
[PASS] Integrity: Application container in ECS task definition modified to include OTEL environment variables
Reasoning: Application container includes multiple OTEL environment variables for configuration.
[PASS] Integrity: -e OTEL_RESOURCE_ATTRIBUTES with service.name
Reasoning: OTEL_RESOURCE_ATTRIBUTES is set with service.name using the config.serviceName value.
[PASS] Integrity: -e OTEL_LOGS_EXPORTER=none
Reasoning: OTEL_LOGS_EXPORTER is set to 'none'.
[PASS] Integrity: -e OTEL_METRICS_EXPORTER=none
Reasoning: OTEL_METRICS_EXPORTER is set to 'none'.
[PASS] Integrity: -e OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
Reasoning: OTEL_EXPORTER_OTLP_PROTOCOL is set to 'http/protobuf'.
[PASS] Integrity: -e OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true
Reasoning: OTEL_AWS_APPLICATION_SIGNALS_ENABLED is set to 'true'.
[PASS] Integrity: -e OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4316/v1/metrics
Reasoning: OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT is set to 'http://localhost:4316/v1/metrics'.
[PASS] Integrity: -e OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4316/v1/traces
Reasoning: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT is set to 'http://localhost:4316/v1/traces'.
[PASS] Integrity: -e OTEL_PYTHON_CONFIGURATOR=aws_configurator
Reasoning: OTEL_PYTHON_CONFIGURATOR is set to 'aws_configurator'.
[PASS] Integrity: -e OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
Reasoning: OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED is set to 'true'.
[PASS] Integrity: -e PYTHONPATH includes volumeMount from ADOT Python container and auto_instrumentation of the volumeMount
Reasoning: PYTHONPATH includes the volumeMount path and auto_instrumentation subdirectory.
[PASS] Integrity: -e DJANGO_SETTINGS_MODULE set to django application settings module
Reasoning: DJANGO_SETTINGS_MODULE is set to 'djangoapp.settings' matching the Django application structure.
Overall Task Status: ✅ PASS
```
ECS Django terraform:
```
(mcp-testing) [/Volumes/workplace/wangzl/aws-application-signals-test-framework/mcp-testing]$ python -m evals tasks --task-id ecs_python_django_terraform --no-cleanup
Using MCP repository: /Volumes/workplace/wangzl/mcpdev/mcp
Starting MCP tool evaluation for tasks
Loaded 1 task(s)
- ecs_python_django_terraform
============================================================
EVALUATION RESULT: ecs_python_django_terraform
============================================================
Duration: 184.03s
Turns: 11
Tool Calls: 10 (4 unique)
Hit Rate: 100.0%
Success Rate: 100.0%
File Operations: 9
Tool Breakdown:
- get_enablement_guide: 1 calls (1 success, 0 failed)
- list_files: 3 calls (3 success, 0 failed)
- read_file: 5 calls (5 success, 0 failed)
- write_file: 1 calls (1 success, 0 failed)
Validation Results:
Build: ✅ PASS (1/1 criteria met)
[PASS] Build succeeds
Reasoning: Build completed with exit code 0
LLM Judge: ✅ PASS (23/23 criteria met)
[PASS] IAM: CloudWatchAgentServerPolicy attached to ECS application role
Reasoning: CloudWatchAgentServerPolicy is attached to the ECS task role via aws_iam_role_policy_attachment.task_role_cloudwatch_agent_policy.
[PASS] CloudWatch Agent: Sidecar container added to ECS task definition
Reasoning: CloudWatch Agent sidecar container "ecs-cwagent-${var.app_name}" is added to the ECS task definition with proper configuration.
[PASS] CloudWatch Agent: CloudWatch Agent configuration file added to ECS task definition
Reasoning: CloudWatch Agent configuration file is added via CW_CONFIG_CONTENT environment variable in the CloudWatch Agent container.
[PASS] CloudWatch Agent: Configuration file created with traces.traces_collected.application_signals
Reasoning: Configuration file contains traces.traces_collected.application_signals section as specified in the CW_CONFIG_CONTENT.
[PASS] CloudWatch Agent: Configuration file created with logs.metrics_collected.application_signals
Reasoning: Configuration file contains logs.metrics_collected.application_signals section as specified in the CW_CONFIG_CONTENT.
[PASS] CloudWatch Agent: Log group created for CloudWatch Agent logs
Reasoning: CloudWatch log group "cw_agent_log_group" is created specifically for CloudWatch Agent logs with name "/ecs/ecs-cwagent".
[PASS] ADOT SDK: ADOT SDK container added as sidecar to ECS task definition
Reasoning: ADOT SDK container "init" is added as sidecar using the public.ecr.aws/aws-observability/adot-autoinstrumentation-python:v0.12.0 image.
[PASS] ADOT SDK: ADOT SDK container added volumeMount for opentelemetry-auto-instrumentation
Reasoning: ADOT SDK container includes volumeMount for "opentelemetry-auto-instrumentation-python" volume.
[PASS] Integrity: Application container modified to include volumeMount from ADOT SDK container
Reasoning: Application container includes volumeMount from ADOT SDK container for "opentelemetry-auto-instrumentation-python".
[PASS] Integrity: Aplication containder added container dependency on ADOT SDK container
Reasoning: Application container has dependency on ADOT SDK container "init" with condition "SUCCESS".
[PASS] Integrity: Application container added container dependency on CloudWatch Agent container
Reasoning: Application container has dependency on CloudWatch Agent container "ecs-cwagent-${var.app_name}" with condition "START".
[PASS] Integrity: Application container in ECS task definition modified to include OTEL environment variables
Reasoning: Application container includes multiple OTEL environment variables for OpenTelemetry configuration.
[PASS] Integrity: -e OTEL_RESOURCE_ATTRIBUTES with service.name
Reasoning: OTEL_RESOURCE_ATTRIBUTES is set with service.name=${var.app_name}.
[PASS] Integrity: -e OTEL_LOGS_EXPORTER=none
Reasoning: OTEL_LOGS_EXPORTER is set to "none".
[PASS] Integrity: -e OTEL_METRICS_EXPORTER=none
Reasoning: OTEL_METRICS_EXPORTER is set to "none".
[PASS] Integrity: -e OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
Reasoning: OTEL_EXPORTER_OTLP_PROTOCOL is set to "http/protobuf".
[PASS] Integrity: -e OTEL_AWS_APPLICATION_SIGNALS_ENABLED=true
Reasoning: OTEL_AWS_APPLICATION_SIGNALS_ENABLED is set to "true".
[PASS] Integrity: -e OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT=http://localhost:4316/v1/metrics
Reasoning: OTEL_AWS_APPLICATION_SIGNALS_EXPORTER_ENDPOINT is set to "http://localhost:4316/v1/metrics".
[PASS] Integrity: -e OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4316/v1/traces
Reasoning: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT is set to "http://localhost:4316/v1/traces".
[PASS] Integrity: -e OTEL_PYTHON_CONFIGURATOR=aws_configurator
Reasoning: OTEL_PYTHON_CONFIGURATOR is set to "aws_configurator".
[PASS] Integrity: -e OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
Reasoning: OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED is set to "true".
[PASS] Integrity: -e PYTHONPATH includes volumeMount from ADOT Python container and auto_instrumentation of the volumeMount
Reasoning: PYTHONPATH includes the volumeMount path "/otel-auto-instrumentation-python/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation-python".
[PASS] Integrity: -e DJANGO_SETTINGS_MODULE set to django application settings module
Reasoning: DJANGO_SETTINGS_MODULE is set to "djangoapp.settings" matching the Django application structure.
Overall Task Status: ✅ PASS
```
*Rollback procedure:*
<Can we safely revert this commit if needed? If not, detail what must be
done to safely revert and why it is needed.>
*Ensure you've run the following tests on your changes and include the
link below:*
To do so, create a `test.yml` file with `name: Test` and workflow
description to test your changes, then remove the file for your PR. Link
your test run in your PR description. This process is a short term
solution while we work on creating a staging environment for testing.
NOTE: TESTS RUNNING ON A SINGLE EKS CLUSTER CANNOT BE RUN IN PARALLEL.
See the
[needs](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds)
keyword to run tests in succession.
- Run Java EKS on `e2e-playground` in us-east-1 and eu-central-2
- Run Python EKS on `e2e-playground` in us-east-1 and eu-central-2
- Run metric limiter on EKS cluster `e2e-playground` in us-east-1 and
eu-central-2
- Run EC2 tests in all regions
- Run K8s on a separate K8s cluster (check IAD test account for master
node endpoints; these will change as we create and destroy clusters for
OS patching)
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
---------
Co-authored-by: Michael He <53622546+yiyuan-he@users.noreply.github.com>1 parent c3e3d7b commit 11c7981
File tree
3 files changed
+65
-7
lines changed- mcp-testing/evals/tasks/applicationsignals
- get_enablement_guide/configs
- samples/get-enablement-guide-samples/infrastructure/ecs
- cdk/lib
- terraform
3 files changed
+65
-7
lines changedLines changed: 63 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | | - | |
| 94 | + | |
91 | 95 | | |
92 | | - | |
| 96 | + | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| |||
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
116 | | - | |
| 120 | + | |
117 | 121 | | |
118 | | - | |
| 122 | + | |
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
| |||
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
142 | 200 | | |
143 | 201 | | |
144 | 202 | | |
| |||
161 | 219 | | |
162 | 220 | | |
163 | 221 | | |
164 | | - | |
| 222 | + | |
165 | 223 | | |
166 | 224 | | |
167 | 225 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
0 commit comments