Skip to content

Commit 3f43a73

Browse files
Jeel-mehtaJeel Mehta
andauthored
[Python] Renaming files and folders associated with Python SigV4 logs Release Testing (#414)
*Description of changes:* The changes are made to be consistent with the Java SigV4 Logs Release Testing- [https://github.com/aws-observability/aws-application-signals-test-framework/pull/412](url) Test workflow link -https://github.com/aws-observability/aws-application-signals-test-framework/actions/runs/15571938763/job/43849467481 1. Simplified file paths by: - Removing redundant 'traces' directory - Standardizing 'adot-aws-otlp' paths - Renaming validation files for clarity 2. Updated workflow configurations and job identifiers to match new structure 3. Refactored template file paths in PredefinedExpectedTemplate.java for: - AWS SDK calls - Remote service calls - Client calls - Updated language-specific documentation comments 4. Renamed multiple .mustache files to align with new structure (content unchanged) *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: Jeel Mehta <[email protected]>
1 parent 15d43fb commit 3f43a73

18 files changed

+27
-27
lines changed

.github/workflows/python-ec2-adot-sigv4-test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ env:
3939
E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }}
4040
E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }}
4141
METRIC_NAMESPACE: ApplicationSignals
42-
LOG_GROUP_NAME: aws/spans
43-
TEST_LOG_GROUP_NAME: otlp_logs
42+
SPANS_LOG_GROUP_NAME: aws/spans
43+
APPLICATION_LOGS_LOG_GROUP_NAME: otlp_logs
4444
TEST_RESOURCES_FOLDER: ${GITHUB_WORKSPACE}
4545

4646
jobs:
@@ -122,7 +122,7 @@ jobs:
122122
-var="get_adot_wheel_command=${{ env.GET_ADOT_WHEEL_COMMAND }}" \
123123
-var="language_version=${{ env.PYTHON_VERSION }}" \
124124
-var="cpu_architecture=${{ env.CPU_ARCHITECTURE }}" \
125-
-var="test_log_group=${{ env.TEST_LOG_GROUP_NAME }}" \
125+
-var="application_logs_log_group=${{ env.APPLICATION_LOGS_LOG_GROUP_NAME }}" \
126126
|| deployment_failed=$?
127127
128128
if [ $deployment_failed -eq 1 ]; then
@@ -178,7 +178,7 @@ jobs:
178178
--remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8001
179179
--region ${{ env.E2E_TEST_AWS_REGION }}
180180
--metric-namespace ${{ env.METRIC_NAMESPACE }}
181-
--log-group ${{ env.LOG_GROUP_NAME }}
181+
--log-group ${{ env.SPANS_LOG_GROUP_NAME }}
182182
--service-name python-sample-application-${{ env.TESTING_ID }}
183183
--remote-service-name python-sample-remote-application-${{ env.TESTING_ID }}
184184
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
@@ -195,7 +195,7 @@ jobs:
195195
--remote-service-deployment-name python-sample-remote-application-${{ env.TESTING_ID }}
196196
--region ${{ env.E2E_TEST_AWS_REGION }}
197197
--metric-namespace ${{ env.METRIC_NAMESPACE }}
198-
--log-group ${{ env.LOG_GROUP_NAME }}
198+
--log-group ${{ env.SPANS_LOG_GROUP_NAME }}
199199
--service-name python-sample-application-${{ env.TESTING_ID }}
200200
--remote-service-name python-sample-remote-application-${{ env.TESTING_ID }}
201201
--query-string ip=${{ env.REMOTE_SERVICE_IP }}
@@ -213,7 +213,7 @@ jobs:
213213
--region ${{ env.E2E_TEST_AWS_REGION }}
214214
--account-id ${{ env.E2E_TEST_ACCOUNT_ID }}
215215
--metric-namespace ${{ env.METRIC_NAMESPACE }}
216-
--log-group ${{ env.LOG_GROUP_NAME }}
216+
--log-group ${{ env.SPANS_LOG_GROUP_NAME }}
217217
--service-name python-sample-application-${{ env.TESTING_ID }}
218218
--remote-service-name python-sample-remote-application-${{ env.TESTING_ID }}
219219
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}
@@ -222,15 +222,15 @@ jobs:
222222
--rollup'
223223

224224
- name: Validate generated otlp logs
225-
id: log-validation-1
226-
run: ./gradlew validator:run --args='-c python/ec2/adot-aws-otlp/logs/log-validation.yml
225+
id: application-log-validation
226+
run: ./gradlew validator:run --args='-c python/ec2/adot-aws-otlp/application-log-validation.yml
227227
--testing-id ${{ env.TESTING_ID }}
228228
--endpoint http://localhost:8000
229229
--remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8001
230230
--region ${{ env.E2E_TEST_AWS_REGION }}
231231
--account-id ${{ env.E2E_TEST_ACCOUNT_ID }}
232232
--metric-namespace ${{ env.METRIC_NAMESPACE }}
233-
--log-group ${{ env.TEST_LOG_GROUP_NAME }}
233+
--log-group ${{ env.APPLICATION_LOGS_LOG_GROUP_NAME }}
234234
--service-name python-sample-application-${{ env.TESTING_ID }}
235235
--remote-service-name python-sample-remote-application-${{ env.TESTING_ID }}
236236
--query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }}

terraform/python/ec2/adot-sigv4/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ resource "null_resource" "main_service_setup" {
168168
export OTEL_TRACES_EXPORTER=otlp \
169169
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://xray.${var.aws_region}.amazonaws.com/v1/traces \
170170
export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://logs.${var.aws_region}.amazonaws.com/v1/logs \
171-
export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=${var.test_log_group},x-aws-log-stream=default \
171+
export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=${var.application_logs_log_group},x-aws-log-stream=default \
172172
export OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true \
173173
export OTEL_SERVICE_NAME=python-sample-application-${var.test_id}
174174
export OTEL_TRACES_SAMPLER=always_on
@@ -292,7 +292,7 @@ resource "null_resource" "remote_service_setup" {
292292
export OTEL_TRACES_EXPORTER=otlp \
293293
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://xray.${var.aws_region}.amazonaws.com/v1/traces \
294294
export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://logs.${var.aws_region}.amazonaws.com/v1/logs \
295-
export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=${var.test_log_group},x-aws-log-stream=default \
295+
export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=${var.application_logs_log_group},x-aws-log-stream=default \
296296
export OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true \
297297
export OTEL_SERVICE_NAME=python-sample-remote-application-${var.test_id}
298298
export OTEL_TRACES_SAMPLER=always_on

terraform/python/ec2/adot-sigv4/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ variable "cpu_architecture" {
4545
default = "x86_64"
4646
}
4747

48-
variable "test_log_group" {
48+
variable "application_logs_log_group" {
4949
default = "otlp_logs"
5050
}

validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -225,26 +225,26 @@ public enum PredefinedExpectedTemplate implements FileConfig {
225225

226226
/** Python EC2 ADOT SigV4 (Stand Alone ADOT) Test Case Validations */
227227
PYTHON_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_LOG(
228-
"/expected-data-template/python/ec2/adot-aws-otlp/traces/outgoing-http-call-log.mustache"),
228+
"/expected-data-template/python/ec2/adot-aws-otlp/outgoing-http-call-log.mustache"),
229229
PYTHON_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_METRIC(
230-
"/expected-data-template/python/ec2/adot-aws-otlp/traces/outgoing-http-call-metric.mustache"),
230+
"/expected-data-template/python/ec2/adot-aws-otlp/outgoing-http-call-metric.mustache"),
231231
PYTHON_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_TRACE(
232-
"/expected-data-template/python/ec2/adot-aws-otlp/traces/outgoing-http-call-trace.mustache"),
232+
"/expected-data-template/python/ec2/adot-aws-otlp/outgoing-http-call-trace.mustache"),
233233

234-
PYTHON_EC2_ADOT_SIGV4_AWS_SDK_CALL_LOG("/expected-data-template/python/ec2/adot-aws-otlp/traces/aws-sdk-call-log.mustache"),
235-
PYTHON_EC2_ADOT_SIGV4_AWS_SDK_CALL_METRIC("/expected-data-template/python/ec2/adot-aws-otlp/traces/aws-sdk-call-metric.mustache"),
236-
PYTHON_EC2_ADOT_SIGV4_AWS_SDK_CALL_TRACE("/expected-data-template/python/ec2/adot-aws-otlp/traces/aws-sdk-call-trace.mustache"),
234+
PYTHON_EC2_ADOT_SIGV4_AWS_SDK_CALL_LOG("/expected-data-template/python/ec2/adot-aws-otlp/aws-sdk-call-log.mustache"),
235+
PYTHON_EC2_ADOT_SIGV4_AWS_SDK_CALL_METRIC("/expected-data-template/python/ec2/adot-aws-otlp/aws-sdk-call-metric.mustache"),
236+
PYTHON_EC2_ADOT_SIGV4_AWS_SDK_CALL_TRACE("/expected-data-template/python/ec2/adot-aws-otlp/aws-sdk-call-trace.mustache"),
237237

238-
PYTHON_EC2_ADOT_SIGV4_REMOTE_SERVICE_LOG("/expected-data-template/python/ec2/adot-aws-otlp/traces/remote-service-log.mustache"),
239-
PYTHON_EC2_ADOT_SIGV4_REMOTE_SERVICE_METRIC("/expected-data-template/python/ec2/adot-aws-otlp/traces/remote-service-metric.mustache"),
240-
PYTHON_EC2_ADOT_SIGV4_REMOTE_SERVICE_TRACE("/expected-data-template/python/ec2/adot-aws-otlp/traces/remote-service-trace.mustache"),
238+
PYTHON_EC2_ADOT_SIGV4_REMOTE_SERVICE_LOG("/expected-data-template/python/ec2/adot-aws-otlp/remote-service-log.mustache"),
239+
PYTHON_EC2_ADOT_SIGV4_REMOTE_SERVICE_METRIC("/expected-data-template/python/ec2/adot-aws-otlp/remote-service-metric.mustache"),
240+
PYTHON_EC2_ADOT_SIGV4_REMOTE_SERVICE_TRACE("/expected-data-template/python/ec2/adot-aws-otlp/remote-service-trace.mustache"),
241241

242-
PYTHON_EC2_ADOT_SIGV4_CLIENT_CALL_LOG("/expected-data-template/python/ec2/adot-aws-otlp/traces/client-call-log.mustache"),
243-
PYTHON_EC2_ADOT_SIGV4_CLIENT_CALL_METRIC("/expected-data-template/python/ec2/adot-aws-otlp/traces/client-call-metric.mustache"),
244-
PYTHON_EC2_ADOT_SIGV4_CLIENT_CALL_TRACE("/expected-data-template/python/ec2/adot-aws-otlp/traces/client-call-trace.mustache"),
242+
PYTHON_EC2_ADOT_SIGV4_CLIENT_CALL_LOG("/expected-data-template/python/ec2/adot-aws-otlp/client-call-log.mustache"),
243+
PYTHON_EC2_ADOT_SIGV4_CLIENT_CALL_METRIC("/expected-data-template/python/ec2/adot-aws-otlp/client-call-metric.mustache"),
244+
PYTHON_EC2_ADOT_SIGV4_CLIENT_CALL_TRACE("/expected-data-template/python/ec2/adot-aws-otlp/client-call-trace.mustache"),
245245

246246
/** Python EC2 ADOT SigV4 Log Exporter Test Case Validation */
247-
PYTHON_EC2_ADOT_OTLP_LOG("/expected-data-template/python/ec2/adot-aws-otlp/logs/log.mustache"),
247+
PYTHON_EC2_ADOT_OTLP_LOG("/expected-data-template/python/ec2/adot-aws-otlp/application-log.mustache"),
248248

249249
/** Python K8S Test Case Validations */
250250
PYTHON_K8S_OUTGOING_HTTP_CALL_LOG("/expected-data-template/python/k8s/outgoing-http-call-log.mustache"),
@@ -329,7 +329,7 @@ public enum PredefinedExpectedTemplate implements FileConfig {
329329
DOTNET_EC2_ASG_CLIENT_CALL_METRIC("/expected-data-template/dotnet/ec2/asg/client-call-metric.mustache"),
330330
DOTNET_EC2_ASG_CLIENT_CALL_TRACE("/expected-data-template/dotnet/ec2/asg/client-call-trace.mustache"),
331331

332-
/** Python EC2 ADOT SigV4 (Stand Alone ADOT) Test Case Validations */
332+
/** DotNet EC2 ADOT SigV4 (Stand Alone ADOT) Test Case Validations */
333333
DOTNET_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_LOG(
334334
"/expected-data-template/dotnet/ec2/adot-sigv4/outgoing-http-call-log.mustache"),
335335
DOTNET_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_METRIC(
@@ -452,7 +452,7 @@ public enum PredefinedExpectedTemplate implements FileConfig {
452452
NODE_K8S_CLIENT_CALL_METRIC("/expected-data-template/node/k8s/client-call-metric.mustache"),
453453
NODE_K8S_CLIENT_CALL_TRACE("/expected-data-template/node/k8s/client-call-trace.mustache"),
454454

455-
/** Python EC2 ADOT SigV4 (Stand Alone ADOT) Test Case Validations */
455+
/** Node EC2 ADOT SigV4 (Stand Alone ADOT) Test Case Validations */
456456
NODE_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_LOG(
457457
"/expected-data-template/node/ec2/adot-sigv4/outgoing-http-call-log.mustache"),
458458
NODE_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_METRIC(

0 commit comments

Comments
 (0)