From 55ef7399a543fb317ec54ba6337cdd78e4c19247 Mon Sep 17 00:00:00 2001 From: Jeel Mehta Date: Wed, 7 May 2025 12:09:41 -0700 Subject: [PATCH 01/10] Testing the log support --- .../workflows/java-ec2-adot-sigv4-test.yml | 25 +++++++++++++++++-- terraform/java/ec2/adot-sigv4/main.tf | 5 +++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/java-ec2-adot-sigv4-test.yml b/.github/workflows/java-ec2-adot-sigv4-test.yml index ca36941e8..eab6b73ca 100644 --- a/.github/workflows/java-ec2-adot-sigv4-test.yml +++ b/.github/workflows/java-ec2-adot-sigv4-test.yml @@ -8,6 +8,9 @@ # This test case validates ADOT used on its own to send traces to the X-Ray OTLP endpoint with SigV4 authentication name: Java EC2 ADOT SigV4 (Stand-Alone ADOT) Use Case on: + push: + branches: + - Java_SigV4_logs_release_testing workflow_call: inputs: caller-workflow-name: @@ -37,11 +40,12 @@ env: E2E_TEST_AWS_REGION: 'us-west-2' # Test uses us-west-2 in the us-east-1 accoun CALLER_WORKFLOW_NAME: ${{ inputs.caller-workflow-name }} METRIC_NAMESPACE: ApplicationSignals - JAVA_VERSION: ${{ inputs.java-version }} - CPU_ARCHITECTURE: ${{ inputs.cpu-architecture }} + JAVA_VERSION: ${{ inputs.java-version || '11' }} + CPU_ARCHITECTURE: ${{ inputs.cpu-architecture || 'x86_64' }} E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }} # us-east-1 test account E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }} LOG_GROUP_NAME: aws/spans + TEST_LOG_GROUP_NAME: otlp_sigv4_logs TEST_RESOURCES_FOLDER: ${GITHUB_WORKSPACE} jobs: @@ -193,6 +197,23 @@ jobs: --instance-id ${{ env.MAIN_SERVICE_INSTANCE_ID }} --rollup' + - name: Validate generated SigV4 logs + id: log-validation-1 + run: ./gradlew validator:run --args='-c java/ec2/adot-sigv4/log-validation.yml + --testing-id ${{ env.TESTING_ID }} + --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} + --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8080 + --region ${{ env.E2E_TEST_AWS_REGION }} + --account-id ${{ env.E2E_TEST_ACCOUNT_ID }} + --metric-namespace ${{ env.METRIC_NAMESPACE }} + --log-group ${{ env.TEST_LOG_GROUP_NAME }} + --service-name sample-application-${{ env.TESTING_ID }} + --remote-service-name sample-remote-application-${{ env.TESTING_ID }} + --query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }} + --instance-ami ${{ env.EC2_INSTANCE_AMI }} + --instance-id ${{ env.MAIN_SERVICE_INSTANCE_ID }} + --rollup' + - name: Validate generated metrics id: metric-validation if: (success() || steps.log-validation.outcome == 'failure') && !cancelled() diff --git a/terraform/java/ec2/adot-sigv4/main.tf b/terraform/java/ec2/adot-sigv4/main.tf index d1ced938a..a127d492a 100644 --- a/terraform/java/ec2/adot-sigv4/main.tf +++ b/terraform/java/ec2/adot-sigv4/main.tf @@ -134,11 +134,14 @@ resource "null_resource" "main_service_setup" { export JAVA_TOOL_OPTIONS=' -javaagent:/home/ec2-user/adot.jar' export OTEL_AWS_APPLICATION_SIGNALS_ENABLED=false export OTEL_RESOURCE_PROVIDERS_AWS_ENABLED=true - export OTEL_LOGS_EXPORT=none + export OTEL_LOGS_EXPORTER=otlp export OTEL_METRICS_EXPORTER=none export OTEL_TRACES_EXPORTER=otlp export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf + export OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=http/protobuf export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://xray.${var.aws_region}.amazonaws.com/v1/traces + export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://logs.${var.aws_region}.amazonaws.com/v1/logs + export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=otlp_sigv4_logs,x-aws-log-stream=default export OTEL_RESOURCE_ATTRIBUTES=service.name=sample-application-${var.test_id} nohup java -jar main-service.jar &> nohup.out & From 9ea59c98e47ee3096f0d398a57dbe0935c3413d3 Mon Sep 17 00:00:00 2001 From: Jeel Mehta Date: Wed, 7 May 2025 12:35:17 -0700 Subject: [PATCH 02/10] Retrying test --- .github/workflows/java-ec2-adot-sigv4-test.yml | 10 +++++----- terraform/java/ec2/adot-sigv4/main.tf | 11 +++++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/java-ec2-adot-sigv4-test.yml b/.github/workflows/java-ec2-adot-sigv4-test.yml index eab6b73ca..24491453b 100644 --- a/.github/workflows/java-ec2-adot-sigv4-test.yml +++ b/.github/workflows/java-ec2-adot-sigv4-test.yml @@ -90,11 +90,11 @@ jobs: - name: Set ADOT getter command environment variable run: | - if [ "${{ github.event.repository.name }}" = "aws-otel-java-instrumentation" ]; then - echo GET_ADOT_JAR_COMMAND="aws s3 cp s3://adot-main-build-staging-jar/aws-opentelemetry-agent.jar ./adot.jar" >> $GITHUB_ENV - else - echo GET_ADOT_JAR_COMMAND="wget -O adot.jar https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest/download/aws-opentelemetry-agent.jar" >> $GITHUB_ENV - fi + # if [ "${{ github.event.repository.name }}" = "aws-otel-java-instrumentation" ]; then + echo GET_ADOT_JAR_COMMAND="aws s3 cp s3://adot-main-build-staging-jar/aws-opentelemetry-agent.jar ./adot.jar" >> $GITHUB_ENV + # else + # echo GET_ADOT_JAR_COMMAND="wget -O adot.jar https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest/download/aws-opentelemetry-agent.jar" >> $GITHUB_ENV + # fi - name: Set up terraform uses: ./.github/workflows/actions/execute_and_retry diff --git a/terraform/java/ec2/adot-sigv4/main.tf b/terraform/java/ec2/adot-sigv4/main.tf index a127d492a..ffbe83d79 100644 --- a/terraform/java/ec2/adot-sigv4/main.tf +++ b/terraform/java/ec2/adot-sigv4/main.tf @@ -132,8 +132,6 @@ resource "null_resource" "main_service_setup" { # OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED=true \ export JAVA_TOOL_OPTIONS=' -javaagent:/home/ec2-user/adot.jar' - export OTEL_AWS_APPLICATION_SIGNALS_ENABLED=false - export OTEL_RESOURCE_PROVIDERS_AWS_ENABLED=true export OTEL_LOGS_EXPORTER=otlp export OTEL_METRICS_EXPORTER=none export OTEL_TRACES_EXPORTER=otlp @@ -225,14 +223,15 @@ resource "null_resource" "remote_service_setup" { # OTEL_INSTRUMENTATION_COMMON_EXPERIMENTAL_CONTROLLER_TELEMETRY_ENABLED=true \ export JAVA_TOOL_OPTIONS=' -javaagent:/home/ec2-user/adot.jar' - export OTEL_AWS_APPLICATION_SIGNALS_ENABLED=false - export OTEL_RESOURCE_PROVIDERS_AWS_ENABLED=true - export OTEL_LOGS_EXPORT=none + export OTEL_LOGS_EXPORTER=otlp export OTEL_METRICS_EXPORTER=none export OTEL_TRACES_EXPORTER=otlp export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf + export OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=http/protobuf export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://xray.${var.aws_region}.amazonaws.com/v1/traces - OTEL_RESOURCE_ATTRIBUTES=service.name=sample-remote-application-${var.test_id} \ + export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://logs.${var.aws_region}.amazonaws.com/v1/logs + export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=otlp_sigv4_logs,x-aws-log-stream=default + export OTEL_RESOURCE_ATTRIBUTES=service.name=sample-application-${var.test_id} nohup java -jar remote-service.jar &> nohup.out & # The application needs time to come up and reach a steady state, this should not take longer than 30 seconds From db9b1441c9675922122fa905b8c3c51fecd42e53 Mon Sep 17 00:00:00 2001 From: Jeel Mehta Date: Wed, 14 May 2025 15:31:25 -0700 Subject: [PATCH 03/10] Adding new environment variable --- terraform/java/ec2/adot-sigv4/main.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/terraform/java/ec2/adot-sigv4/main.tf b/terraform/java/ec2/adot-sigv4/main.tf index ffbe83d79..6681711aa 100644 --- a/terraform/java/ec2/adot-sigv4/main.tf +++ b/terraform/java/ec2/adot-sigv4/main.tf @@ -137,6 +137,7 @@ resource "null_resource" "main_service_setup" { export OTEL_TRACES_EXPORTER=otlp export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf export OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=http/protobuf + export OTEL_LOG_LEVEL=CRITICAL export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://xray.${var.aws_region}.amazonaws.com/v1/traces export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://logs.${var.aws_region}.amazonaws.com/v1/logs export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=otlp_sigv4_logs,x-aws-log-stream=default @@ -228,6 +229,7 @@ resource "null_resource" "remote_service_setup" { export OTEL_TRACES_EXPORTER=otlp export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf export OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=http/protobuf + export OTEL_LOG_LEVEL=CRITICAL export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://xray.${var.aws_region}.amazonaws.com/v1/traces export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://logs.${var.aws_region}.amazonaws.com/v1/logs export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=otlp_sigv4_logs,x-aws-log-stream=default From 1279dcf264d6f082d9fdb6d69e7e6637931240c7 Mon Sep 17 00:00:00 2001 From: Jeel Mehta Date: Wed, 14 May 2025 15:37:51 -0700 Subject: [PATCH 04/10] Reverting the changes --- terraform/java/ec2/adot-sigv4/main.tf | 2 -- 1 file changed, 2 deletions(-) diff --git a/terraform/java/ec2/adot-sigv4/main.tf b/terraform/java/ec2/adot-sigv4/main.tf index 6681711aa..ffbe83d79 100644 --- a/terraform/java/ec2/adot-sigv4/main.tf +++ b/terraform/java/ec2/adot-sigv4/main.tf @@ -137,7 +137,6 @@ resource "null_resource" "main_service_setup" { export OTEL_TRACES_EXPORTER=otlp export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf export OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=http/protobuf - export OTEL_LOG_LEVEL=CRITICAL export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://xray.${var.aws_region}.amazonaws.com/v1/traces export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://logs.${var.aws_region}.amazonaws.com/v1/logs export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=otlp_sigv4_logs,x-aws-log-stream=default @@ -229,7 +228,6 @@ resource "null_resource" "remote_service_setup" { export OTEL_TRACES_EXPORTER=otlp export OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/protobuf export OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=http/protobuf - export OTEL_LOG_LEVEL=CRITICAL export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://xray.${var.aws_region}.amazonaws.com/v1/traces export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://logs.${var.aws_region}.amazonaws.com/v1/logs export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=otlp_sigv4_logs,x-aws-log-stream=default From 9c8a0587bd179476e24d96daa54deb55fba0d6fa Mon Sep 17 00:00:00 2001 From: Jeel Mehta Date: Thu, 29 May 2025 15:08:13 -0700 Subject: [PATCH 05/10] Renaming the folders and adding relevant tests --- .../workflows/java-ec2-adot-sigv4-test.yml | 43 ++++++++++--------- terraform/java/ec2/adot-sigv4/variables.tf | 4 ++ .../PredefinedExpectedTemplate.java | 27 ++++++------ .../java/ec2/adot-aws-otlp/logs/log.mustache | 20 +++++++++ .../traces}/aws-sdk-call-log.mustache | 0 .../traces}/aws-sdk-call-metric.mustache | 0 .../traces}/aws-sdk-call-trace.mustache | 0 .../traces}/client-call-log.mustache | 0 .../traces}/client-call-metric.mustache | 0 .../traces}/client-call-trace.mustache | 0 .../traces}/outgoing-http-call-log.mustache | 0 .../outgoing-http-call-metric.mustache | 0 .../traces}/outgoing-http-call-trace.mustache | 0 .../traces}/remote-service-log.mustache | 0 .../traces}/remote-service-metric.mustache | 0 .../traces}/remote-service-trace.mustache | 0 .../log-validation.yml | 0 .../ec2/adot-aws-otlp/logs/log-validation.yml | 3 ++ .../metric-validation.yml | 0 .../trace-validation.yml | 0 20 files changed, 64 insertions(+), 33 deletions(-) create mode 100644 validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache rename validator/src/main/resources/expected-data-template/java/ec2/{adot-sigv4 => adot-aws-otlp/traces}/aws-sdk-call-log.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/{adot-sigv4 => adot-aws-otlp/traces}/aws-sdk-call-metric.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/{adot-sigv4 => adot-aws-otlp/traces}/aws-sdk-call-trace.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/{adot-sigv4 => adot-aws-otlp/traces}/client-call-log.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/{adot-sigv4 => adot-aws-otlp/traces}/client-call-metric.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/{adot-sigv4 => adot-aws-otlp/traces}/client-call-trace.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/{adot-sigv4 => adot-aws-otlp/traces}/outgoing-http-call-log.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/{adot-sigv4 => adot-aws-otlp/traces}/outgoing-http-call-metric.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/{adot-sigv4 => adot-aws-otlp/traces}/outgoing-http-call-trace.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/{adot-sigv4 => adot-aws-otlp/traces}/remote-service-log.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/{adot-sigv4 => adot-aws-otlp/traces}/remote-service-metric.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/{adot-sigv4 => adot-aws-otlp/traces}/remote-service-trace.mustache (100%) rename validator/src/main/resources/validations/java/ec2/{adot-sigv4 => adot-aws-otlp}/log-validation.yml (100%) create mode 100644 validator/src/main/resources/validations/java/ec2/adot-aws-otlp/logs/log-validation.yml rename validator/src/main/resources/validations/java/ec2/{adot-sigv4 => adot-aws-otlp}/metric-validation.yml (100%) rename validator/src/main/resources/validations/java/ec2/{adot-sigv4 => adot-aws-otlp}/trace-validation.yml (100%) diff --git a/.github/workflows/java-ec2-adot-sigv4-test.yml b/.github/workflows/java-ec2-adot-sigv4-test.yml index 24491453b..09653e0e9 100644 --- a/.github/workflows/java-ec2-adot-sigv4-test.yml +++ b/.github/workflows/java-ec2-adot-sigv4-test.yml @@ -45,7 +45,7 @@ env: E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }} # us-east-1 test account E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }} LOG_GROUP_NAME: aws/spans - TEST_LOG_GROUP_NAME: otlp_sigv4_logs + TEST_LOG_GROUP_NAME: otlp_logs TEST_RESOURCES_FOLDER: ${GITHUB_WORKSPACE} jobs: @@ -132,6 +132,7 @@ jobs: -var="get_adot_jar_command=${{ env.GET_ADOT_JAR_COMMAND }}" \ -var="language_version=${{ env.JAVA_VERSION }}" \ -var="cpu_architecture=${{ env.CPU_ARCHITECTURE }}" \ + -var="test_log_group=${{ env.TEST_LOG_GROUP_NAME }}" \ || deployment_failed=$? if [ $deployment_failed -eq 1 ]; then @@ -182,7 +183,7 @@ jobs: # Validation for pulse telemetry data - name: Validate generated EMF logs id: log-validation - run: ./gradlew validator:run --args='-c java/ec2/adot-sigv4/log-validation.yml + run: ./gradlew validator:run --args='-c java/ec2/adot-aws-otlp/log-validation.yml --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8080 @@ -197,27 +198,10 @@ jobs: --instance-id ${{ env.MAIN_SERVICE_INSTANCE_ID }} --rollup' - - name: Validate generated SigV4 logs - id: log-validation-1 - run: ./gradlew validator:run --args='-c java/ec2/adot-sigv4/log-validation.yml - --testing-id ${{ env.TESTING_ID }} - --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} - --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8080 - --region ${{ env.E2E_TEST_AWS_REGION }} - --account-id ${{ env.E2E_TEST_ACCOUNT_ID }} - --metric-namespace ${{ env.METRIC_NAMESPACE }} - --log-group ${{ env.TEST_LOG_GROUP_NAME }} - --service-name sample-application-${{ env.TESTING_ID }} - --remote-service-name sample-remote-application-${{ env.TESTING_ID }} - --query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }} - --instance-ami ${{ env.EC2_INSTANCE_AMI }} - --instance-id ${{ env.MAIN_SERVICE_INSTANCE_ID }} - --rollup' - - name: Validate generated metrics id: metric-validation if: (success() || steps.log-validation.outcome == 'failure') && !cancelled() - run: ./gradlew validator:run --args='-c java/ec2/adot-sigv4/metric-validation.yml + run: ./gradlew validator:run --args='-c java/ec2/adot-aws-otlp/metric-validation.yml --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} --remote-service-deployment-name sample-remote-application-${{ env.TESTING_ID }} @@ -235,7 +219,7 @@ jobs: - name: Validate generated traces id: trace-validation if: (success() || steps.log-validation.outcome == 'failure' || steps.metric-validation.outcome == 'failure') && !cancelled() - run: ./gradlew validator:run --args='-c java/ec2/adot-sigv4/trace-validation.yml + run: ./gradlew validator:run --args='-c java/ec2/adot-aws-otlp/trace-validation.yml --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8080 @@ -249,6 +233,23 @@ jobs: --instance-ami ${{ env.EC2_INSTANCE_AMI }} --instance-id ${{ env.MAIN_SERVICE_INSTANCE_ID }} --rollup' + + - name: Validate generated otlp logs + id: log-validation-1 + run: ./gradlew validator:run --args='-c java/ec2/adot-aws-otlp/log-validation.yml + --testing-id ${{ env.TESTING_ID }} + --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} + --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8080 + --region ${{ env.E2E_TEST_AWS_REGION }} + --account-id ${{ env.E2E_TEST_ACCOUNT_ID }} + --metric-namespace ${{ env.METRIC_NAMESPACE }} + --log-group ${{ env.TEST_LOG_GROUP_NAME }} + --service-name sample-application-${{ env.TESTING_ID }} + --remote-service-name sample-remote-application-${{ env.TESTING_ID }} + --query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }} + --instance-ami ${{ env.EC2_INSTANCE_AMI }} + --instance-id ${{ env.MAIN_SERVICE_INSTANCE_ID }} + --rollup' - name: Refresh AWS Credentials if: ${{ github.event.repository.name == 'aws-application-signals-test-framework' }} diff --git a/terraform/java/ec2/adot-sigv4/variables.tf b/terraform/java/ec2/adot-sigv4/variables.tf index 4d861ee8b..acb69dc64 100644 --- a/terraform/java/ec2/adot-sigv4/variables.tf +++ b/terraform/java/ec2/adot-sigv4/variables.tf @@ -47,4 +47,8 @@ variable "language_version" { variable "cpu_architecture" { default = "x86_64" +} + +variable "test_log_group" { + default = "otlp_logs" } \ No newline at end of file diff --git a/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java b/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java index c51ca6309..d26369d68 100644 --- a/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java +++ b/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java @@ -116,23 +116,26 @@ public enum PredefinedExpectedTemplate implements FileConfig { JAVA_EC2_UBUNTU_CLIENT_CALL_TRACE("/expected-data-template/java/ec2/ubuntu/client-call-trace.mustache"), /** Java EC2 ADOT SigV4 (ADOT Stand-Alone) Test Case Validations */ - JAVA_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_LOG("/expected-data-template/java/ec2/adot-sigv4/outgoing-http-call-log.mustache"), + JAVA_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_LOG("/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-log.mustache"), JAVA_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_METRIC( - "/expected-data-template/java/ec2/adot-sigv4/outgoing-http-call-metric.mustache"), + "/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-metric.mustache"), JAVA_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_TRACE( - "/expected-data-template/java/ec2/adot-sigv4/outgoing-http-call-trace.mustache"), + "/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-trace.mustache"), - JAVA_EC2_ADOT_SIGV4_AWS_SDK_CALL_LOG("/expected-data-template/java/ec2/adot-sigv4/aws-sdk-call-log.mustache"), - JAVA_EC2_ADOT_SIGV4_AWS_SDK_CALL_METRIC("/expected-data-template/java/ec2/adot-sigv4/aws-sdk-call-metric.mustache"), - JAVA_EC2_ADOT_SIGV4_AWS_SDK_CALL_TRACE("/expected-data-template/java/ec2/adot-sigv4/aws-sdk-call-trace.mustache"), + JAVA_EC2_ADOT_SIGV4_AWS_SDK_CALL_LOG("/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-log.mustache"), + JAVA_EC2_ADOT_SIGV4_AWS_SDK_CALL_METRIC("/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-metric.mustache"), + JAVA_EC2_ADOT_SIGV4_AWS_SDK_CALL_TRACE("/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-trace.mustache"), - JAVA_EC2_ADOT_SIGV4_REMOTE_SERVICE_LOG("/expected-data-template/java/ec2/adot-sigv4/remote-service-log.mustache"), - JAVA_EC2_ADOT_SIGV4_REMOTE_SERVICE_METRIC("/expected-data-template/java/ec2/adot-sigv4/remote-service-metric.mustache"), - JAVA_EC2_ADOT_SIGV4_REMOTE_SERVICE_TRACE("/expected-data-template/java/ec2/adot-sigv4/remote-service-trace.mustache"), + JAVA_EC2_ADOT_SIGV4_REMOTE_SERVICE_LOG("/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-log.mustache"), + JAVA_EC2_ADOT_SIGV4_REMOTE_SERVICE_METRIC("/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-metric.mustache"), + JAVA_EC2_ADOT_SIGV4_REMOTE_SERVICE_TRACE("/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-trace.mustache"), - JAVA_EC2_ADOT_SIGV4_CLIENT_CALL_LOG("/expected-data-template/java/ec2/adot-sigv4/client-call-log.mustache"), - JAVA_EC2_ADOT_SIGV4_CLIENT_CALL_METRIC("/expected-data-template/java/ec2/adot-sigv4/client-call-metric.mustache"), - JAVA_EC2_ADOT_SIGV4_CLIENT_CALL_TRACE("/expected-data-template/java/ec2/adot-sigv4/client-call-trace.mustache"), + JAVA_EC2_ADOT_SIGV4_CLIENT_CALL_LOG("/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-log.mustache"), + JAVA_EC2_ADOT_SIGV4_CLIENT_CALL_METRIC("/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-metric.mustache"), + JAVA_EC2_ADOT_SIGV4_CLIENT_CALL_TRACE("/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-trace.mustache"), + + /** Java EC2 ADOT SigV4 Log Exporter Test Case Validation */ + JAVA_EC2_ADOT_OTLP_LOG("/expected-data-template/python/ec2/adot-aws-otlp/logs/log.mustache"), /** Java EC2 K8s Test Case Validations */ JAVA_K8S_OUTGOING_HTTP_CALL_LOG("/expected-data-template/java/k8s/outgoing-http-call-log.mustache"), diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache new file mode 100644 index 000000000..719d0174e --- /dev/null +++ b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache @@ -0,0 +1,20 @@ +[{ + "resource": { + "attributes": { + "aws.local.service": "{{serviceName}}", + "service.name": "{{serviceName}}", + "cloud.provider": "aws", + "cloud.region": "{{region}}", + "cloud.account.id": "{{accountId}}", + "cloud.platform": "aws_ec2" + } + }, + "severityNumber": "^[0-9]+$", + "severityText": "{{severityText}}", + "body": "This is a custom log for validation testing", + "traceId": "{{traceId}}", + "spanId": "{{spanId}}", + "attributes": { + "otelServiceName": "{{serviceName}}" + } +}] \ No newline at end of file diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/aws-sdk-call-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/aws-sdk-call-log.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-log.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/aws-sdk-call-metric.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-metric.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/aws-sdk-call-metric.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-metric.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/aws-sdk-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-trace.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/aws-sdk-call-trace.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-trace.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/client-call-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/client-call-log.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-log.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/client-call-metric.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-metric.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/client-call-metric.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-metric.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/client-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-trace.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/client-call-trace.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-trace.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/outgoing-http-call-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/outgoing-http-call-log.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-log.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/outgoing-http-call-metric.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-metric.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/outgoing-http-call-metric.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-metric.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/outgoing-http-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-trace.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/outgoing-http-call-trace.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-trace.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/remote-service-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/remote-service-log.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-log.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/remote-service-metric.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-metric.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/remote-service-metric.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-metric.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/remote-service-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-trace.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-sigv4/remote-service-trace.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-trace.mustache diff --git a/validator/src/main/resources/validations/java/ec2/adot-sigv4/log-validation.yml b/validator/src/main/resources/validations/java/ec2/adot-aws-otlp/log-validation.yml similarity index 100% rename from validator/src/main/resources/validations/java/ec2/adot-sigv4/log-validation.yml rename to validator/src/main/resources/validations/java/ec2/adot-aws-otlp/log-validation.yml diff --git a/validator/src/main/resources/validations/java/ec2/adot-aws-otlp/logs/log-validation.yml b/validator/src/main/resources/validations/java/ec2/adot-aws-otlp/logs/log-validation.yml new file mode 100644 index 000000000..e908a49a4 --- /dev/null +++ b/validator/src/main/resources/validations/java/ec2/adot-aws-otlp/logs/log-validation.yml @@ -0,0 +1,3 @@ +- + validationType: "cw-log" + expectedLogStructureTemplate: "JAVA_EC2_ADOT_OTLP_LOG" \ No newline at end of file diff --git a/validator/src/main/resources/validations/java/ec2/adot-sigv4/metric-validation.yml b/validator/src/main/resources/validations/java/ec2/adot-aws-otlp/metric-validation.yml similarity index 100% rename from validator/src/main/resources/validations/java/ec2/adot-sigv4/metric-validation.yml rename to validator/src/main/resources/validations/java/ec2/adot-aws-otlp/metric-validation.yml diff --git a/validator/src/main/resources/validations/java/ec2/adot-sigv4/trace-validation.yml b/validator/src/main/resources/validations/java/ec2/adot-aws-otlp/trace-validation.yml similarity index 100% rename from validator/src/main/resources/validations/java/ec2/adot-sigv4/trace-validation.yml rename to validator/src/main/resources/validations/java/ec2/adot-aws-otlp/trace-validation.yml From 987905e8d25b71214c200bd9c28ee444befd1d90 Mon Sep 17 00:00:00 2001 From: Jeel Mehta Date: Fri, 30 May 2025 10:20:35 -0700 Subject: [PATCH 06/10] testing --- .github/workflows/java-ec2-adot-sigv4-test.yml | 2 +- terraform/java/ec2/adot-sigv4/main.tf | 6 +++--- .../java/ec2/adot-aws-otlp/logs/log.mustache | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/java-ec2-adot-sigv4-test.yml b/.github/workflows/java-ec2-adot-sigv4-test.yml index 09653e0e9..9a0f94ec9 100644 --- a/.github/workflows/java-ec2-adot-sigv4-test.yml +++ b/.github/workflows/java-ec2-adot-sigv4-test.yml @@ -236,7 +236,7 @@ jobs: - name: Validate generated otlp logs id: log-validation-1 - run: ./gradlew validator:run --args='-c java/ec2/adot-aws-otlp/log-validation.yml + run: ./gradlew validator:run --args='-c java/ec2/adot-aws-otlp/logs/log-validation.yml --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8080 diff --git a/terraform/java/ec2/adot-sigv4/main.tf b/terraform/java/ec2/adot-sigv4/main.tf index ffbe83d79..514133465 100644 --- a/terraform/java/ec2/adot-sigv4/main.tf +++ b/terraform/java/ec2/adot-sigv4/main.tf @@ -139,7 +139,7 @@ resource "null_resource" "main_service_setup" { export OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=http/protobuf export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://xray.${var.aws_region}.amazonaws.com/v1/traces export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://logs.${var.aws_region}.amazonaws.com/v1/logs - export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=otlp_sigv4_logs,x-aws-log-stream=default + export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=${var.test_log_group},x-aws-log-stream=default export OTEL_RESOURCE_ATTRIBUTES=service.name=sample-application-${var.test_id} nohup java -jar main-service.jar &> nohup.out & @@ -230,8 +230,8 @@ resource "null_resource" "remote_service_setup" { export OTEL_EXPORTER_OTLP_LOGS_PROTOCOL=http/protobuf export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://xray.${var.aws_region}.amazonaws.com/v1/traces export OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://logs.${var.aws_region}.amazonaws.com/v1/logs - export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=otlp_sigv4_logs,x-aws-log-stream=default - export OTEL_RESOURCE_ATTRIBUTES=service.name=sample-application-${var.test_id} + export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=${var.test_log_group},x-aws-log-stream=default + OTEL_RESOURCE_ATTRIBUTES=service.name=sample-remote-application-${var.test_id} \ nohup java -jar remote-service.jar &> nohup.out & # The application needs time to come up and reach a steady state, this should not take longer than 30 seconds diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache index 719d0174e..94994a97a 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache @@ -1,7 +1,6 @@ [{ "resource": { "attributes": { - "aws.local.service": "{{serviceName}}", "service.name": "{{serviceName}}", "cloud.provider": "aws", "cloud.region": "{{region}}", @@ -14,7 +13,4 @@ "body": "This is a custom log for validation testing", "traceId": "{{traceId}}", "spanId": "{{spanId}}", - "attributes": { - "otelServiceName": "{{serviceName}}" - } }] \ No newline at end of file From 8947f855df6952cf1de3b4becfaec37cd82c795b Mon Sep 17 00:00:00 2001 From: Jeel Mehta Date: Tue, 3 Jun 2025 14:43:30 -0700 Subject: [PATCH 07/10] Changing the filter pattern and testing --- .../com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java | 2 +- .../src/main/java/com/amazon/aoc/validators/CWLogValidator.java | 2 +- .../java/ec2/adot-aws-otlp/logs/log.mustache | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java b/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java index d26369d68..15d940898 100644 --- a/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java +++ b/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java @@ -135,7 +135,7 @@ public enum PredefinedExpectedTemplate implements FileConfig { JAVA_EC2_ADOT_SIGV4_CLIENT_CALL_TRACE("/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-trace.mustache"), /** Java EC2 ADOT SigV4 Log Exporter Test Case Validation */ - JAVA_EC2_ADOT_OTLP_LOG("/expected-data-template/python/ec2/adot-aws-otlp/logs/log.mustache"), + JAVA_EC2_ADOT_OTLP_LOG("/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache"), /** Java EC2 K8s Test Case Validations */ JAVA_K8S_OUTGOING_HTTP_CALL_LOG("/expected-data-template/java/k8s/outgoing-http-call-log.mustache"), diff --git a/validator/src/main/java/com/amazon/aoc/validators/CWLogValidator.java b/validator/src/main/java/com/amazon/aoc/validators/CWLogValidator.java index 4946c9084..49af8d396 100644 --- a/validator/src/main/java/com/amazon/aoc/validators/CWLogValidator.java +++ b/validator/src/main/java/com/amazon/aoc/validators/CWLogValidator.java @@ -236,7 +236,7 @@ private Map getActualOtelSpanLog(String operation, String remote private Map getActualAwsOtlpLog() throws Exception { String filterPattern= String.format( - "{ ($.attributes.otelServiceName = \"%s\") && ($.body = \"This is a custom log for validation testing\") }", + "{ ($.resource.attributes.['service.name'] = \"%s\") && ($.body = \"This is a custom log for validation testing\") }", context.getServiceName() ); log.info("Filter Pattern for OTLP Log Search: " + filterPattern); diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache index 94994a97a..8eabbd12d 100644 --- a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache +++ b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache @@ -12,5 +12,5 @@ "severityText": "{{severityText}}", "body": "This is a custom log for validation testing", "traceId": "{{traceId}}", - "spanId": "{{spanId}}", + "spanId": "{{spanId}}" }] \ No newline at end of file From dcc41c41740c1ff60e1a45fdc3aa17aa30beef5c Mon Sep 17 00:00:00 2001 From: Jeel Mehta Date: Wed, 4 Jun 2025 11:24:47 -0700 Subject: [PATCH 08/10] Testing both Python and Java logs test after change in filter pattern --- .../workflows/python-ec2-adot-sigv4-test.yml | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python-ec2-adot-sigv4-test.yml b/.github/workflows/python-ec2-adot-sigv4-test.yml index 886c9bafd..2171ba527 100644 --- a/.github/workflows/python-ec2-adot-sigv4-test.yml +++ b/.github/workflows/python-ec2-adot-sigv4-test.yml @@ -6,6 +6,9 @@ # Read more about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview name: Python EC2 ADOT SigV4 (Stand-Alone ADOT) Use Case on: + push: + branches: + - Java_SigV4_logs_release_testing workflow_call: inputs: caller-workflow-name: @@ -33,9 +36,9 @@ permissions: env: E2E_TEST_AWS_REGION: 'us-west-2' CALLER_WORKFLOW_NAME: ${{ inputs.caller-workflow-name }} - PYTHON_VERSION: ${{ inputs.python-version }} - CPU_ARCHITECTURE: ${{ inputs.cpu-architecture }} - ADOT_WHEEL_NAME: ${{ inputs.staging-wheel-name }} + PYTHON_VERSION: ${{ inputs.python-version || '3.9' }} + CPU_ARCHITECTURE: ${{ inputs.cpu-architecture || 'x86_64' }} + ADOT_WHEEL_NAME: ${{ inputs.staging-wheel-name || 'aws_opentelemetry_distro-0.9.0.dev0-0b6b7cf8-py3-none-any.whl' }} E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }} E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }} METRIC_NAMESPACE: ApplicationSignals @@ -77,15 +80,15 @@ jobs: - name: Set Get ADOT Wheel command environment variable run: | - if [ "${{ github.event.repository.name }}" = "aws-otel-python-instrumentation" ]; then + # if [ "${{ github.event.repository.name }}" = "aws-otel-python-instrumentation" ]; then # Reusing the adot-main-build-staging-jar bucket to store the python wheel file - echo GET_ADOT_WHEEL_COMMAND="aws s3 cp s3://adot-main-build-staging-jar/${{ env.ADOT_WHEEL_NAME }} ./${{ env.ADOT_WHEEL_NAME }} && sudo python${{ env.PYTHON_VERSION }} -m pip install ${{ env.ADOT_WHEEL_NAME }}" >> $GITHUB_ENV - else - latest_release_version=$(curl -sL https://github.com/aws-observability/aws-otel-python-instrumentation/releases/latest | grep -oP '/releases/tag/v\K[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) - echo "The latest version is $latest_release_version" - echo GET_ADOT_WHEEL_COMMAND="wget -O ${{ env.ADOT_WHEEL_NAME }} https://github.com/aws-observability/aws-otel-python-instrumentation/releases/latest/download/aws_opentelemetry_distro-$latest_release_version-py3-none-any.whl \ - && sudo python${{ env.PYTHON_VERSION }} -m pip install ${{ env.ADOT_WHEEL_NAME }}" >> $GITHUB_ENV - fi + echo GET_ADOT_WHEEL_COMMAND="aws s3 cp s3://adot-main-build-staging-jar/${{ env.ADOT_WHEEL_NAME }} ./${{ env.ADOT_WHEEL_NAME }} && sudo python${{ env.PYTHON_VERSION }} -m pip install ${{ env.ADOT_WHEEL_NAME }}" >> $GITHUB_ENV + # else + # latest_release_version=$(curl -sL https://github.com/aws-observability/aws-otel-python-instrumentation/releases/latest | grep -oP '/releases/tag/v\K[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) + # echo "The latest version is $latest_release_version" + # echo GET_ADOT_WHEEL_COMMAND="wget -O ${{ env.ADOT_WHEEL_NAME }} https://github.com/aws-observability/aws-otel-python-instrumentation/releases/latest/download/aws_opentelemetry_distro-$latest_release_version-py3-none-any.whl \ + # && sudo python${{ env.PYTHON_VERSION }} -m pip install ${{ env.ADOT_WHEEL_NAME }}" >> $GITHUB_ENV + # fi - name: Set up terraform uses: ./.github/workflows/actions/execute_and_retry From 025d31acb733ddc869c39bd26de1f20e3013503c Mon Sep 17 00:00:00 2001 From: Jeel Mehta Date: Wed, 4 Jun 2025 11:57:12 -0700 Subject: [PATCH 09/10] Reverting back the changes made to run the workflow --- .../workflows/java-ec2-adot-sigv4-test.yml | 17 ++++++------- .../workflows/python-ec2-adot-sigv4-test.yml | 25 ++++++++----------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/.github/workflows/java-ec2-adot-sigv4-test.yml b/.github/workflows/java-ec2-adot-sigv4-test.yml index 9a0f94ec9..3f335ed77 100644 --- a/.github/workflows/java-ec2-adot-sigv4-test.yml +++ b/.github/workflows/java-ec2-adot-sigv4-test.yml @@ -8,9 +8,6 @@ # This test case validates ADOT used on its own to send traces to the X-Ray OTLP endpoint with SigV4 authentication name: Java EC2 ADOT SigV4 (Stand-Alone ADOT) Use Case on: - push: - branches: - - Java_SigV4_logs_release_testing workflow_call: inputs: caller-workflow-name: @@ -40,8 +37,8 @@ env: E2E_TEST_AWS_REGION: 'us-west-2' # Test uses us-west-2 in the us-east-1 accoun CALLER_WORKFLOW_NAME: ${{ inputs.caller-workflow-name }} METRIC_NAMESPACE: ApplicationSignals - JAVA_VERSION: ${{ inputs.java-version || '11' }} - CPU_ARCHITECTURE: ${{ inputs.cpu-architecture || 'x86_64' }} + JAVA_VERSION: ${{ inputs.java-version }} + CPU_ARCHITECTURE: ${{ inputs.cpu-architecture }} E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }} # us-east-1 test account E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }} LOG_GROUP_NAME: aws/spans @@ -90,11 +87,11 @@ jobs: - name: Set ADOT getter command environment variable run: | - # if [ "${{ github.event.repository.name }}" = "aws-otel-java-instrumentation" ]; then - echo GET_ADOT_JAR_COMMAND="aws s3 cp s3://adot-main-build-staging-jar/aws-opentelemetry-agent.jar ./adot.jar" >> $GITHUB_ENV - # else - # echo GET_ADOT_JAR_COMMAND="wget -O adot.jar https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest/download/aws-opentelemetry-agent.jar" >> $GITHUB_ENV - # fi + if [ "${{ github.event.repository.name }}" = "aws-otel-java-instrumentation" ]; then + echo GET_ADOT_JAR_COMMAND="aws s3 cp s3://adot-main-build-staging-jar/aws-opentelemetry-agent.jar ./adot.jar" >> $GITHUB_ENV + else + echo GET_ADOT_JAR_COMMAND="wget -O adot.jar https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest/download/aws-opentelemetry-agent.jar" >> $GITHUB_ENV + fi - name: Set up terraform uses: ./.github/workflows/actions/execute_and_retry diff --git a/.github/workflows/python-ec2-adot-sigv4-test.yml b/.github/workflows/python-ec2-adot-sigv4-test.yml index 2171ba527..886c9bafd 100644 --- a/.github/workflows/python-ec2-adot-sigv4-test.yml +++ b/.github/workflows/python-ec2-adot-sigv4-test.yml @@ -6,9 +6,6 @@ # Read more about reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#overview name: Python EC2 ADOT SigV4 (Stand-Alone ADOT) Use Case on: - push: - branches: - - Java_SigV4_logs_release_testing workflow_call: inputs: caller-workflow-name: @@ -36,9 +33,9 @@ permissions: env: E2E_TEST_AWS_REGION: 'us-west-2' CALLER_WORKFLOW_NAME: ${{ inputs.caller-workflow-name }} - PYTHON_VERSION: ${{ inputs.python-version || '3.9' }} - CPU_ARCHITECTURE: ${{ inputs.cpu-architecture || 'x86_64' }} - ADOT_WHEEL_NAME: ${{ inputs.staging-wheel-name || 'aws_opentelemetry_distro-0.9.0.dev0-0b6b7cf8-py3-none-any.whl' }} + PYTHON_VERSION: ${{ inputs.python-version }} + CPU_ARCHITECTURE: ${{ inputs.cpu-architecture }} + ADOT_WHEEL_NAME: ${{ inputs.staging-wheel-name }} E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }} E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }} METRIC_NAMESPACE: ApplicationSignals @@ -80,15 +77,15 @@ jobs: - name: Set Get ADOT Wheel command environment variable run: | - # if [ "${{ github.event.repository.name }}" = "aws-otel-python-instrumentation" ]; then + if [ "${{ github.event.repository.name }}" = "aws-otel-python-instrumentation" ]; then # Reusing the adot-main-build-staging-jar bucket to store the python wheel file - echo GET_ADOT_WHEEL_COMMAND="aws s3 cp s3://adot-main-build-staging-jar/${{ env.ADOT_WHEEL_NAME }} ./${{ env.ADOT_WHEEL_NAME }} && sudo python${{ env.PYTHON_VERSION }} -m pip install ${{ env.ADOT_WHEEL_NAME }}" >> $GITHUB_ENV - # else - # latest_release_version=$(curl -sL https://github.com/aws-observability/aws-otel-python-instrumentation/releases/latest | grep -oP '/releases/tag/v\K[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) - # echo "The latest version is $latest_release_version" - # echo GET_ADOT_WHEEL_COMMAND="wget -O ${{ env.ADOT_WHEEL_NAME }} https://github.com/aws-observability/aws-otel-python-instrumentation/releases/latest/download/aws_opentelemetry_distro-$latest_release_version-py3-none-any.whl \ - # && sudo python${{ env.PYTHON_VERSION }} -m pip install ${{ env.ADOT_WHEEL_NAME }}" >> $GITHUB_ENV - # fi + echo GET_ADOT_WHEEL_COMMAND="aws s3 cp s3://adot-main-build-staging-jar/${{ env.ADOT_WHEEL_NAME }} ./${{ env.ADOT_WHEEL_NAME }} && sudo python${{ env.PYTHON_VERSION }} -m pip install ${{ env.ADOT_WHEEL_NAME }}" >> $GITHUB_ENV + else + latest_release_version=$(curl -sL https://github.com/aws-observability/aws-otel-python-instrumentation/releases/latest | grep -oP '/releases/tag/v\K[0-9]+\.[0-9]+\.[0-9]+' | head -n 1) + echo "The latest version is $latest_release_version" + echo GET_ADOT_WHEEL_COMMAND="wget -O ${{ env.ADOT_WHEEL_NAME }} https://github.com/aws-observability/aws-otel-python-instrumentation/releases/latest/download/aws_opentelemetry_distro-$latest_release_version-py3-none-any.whl \ + && sudo python${{ env.PYTHON_VERSION }} -m pip install ${{ env.ADOT_WHEEL_NAME }}" >> $GITHUB_ENV + fi - name: Set up terraform uses: ./.github/workflows/actions/execute_and_retry From 8956518aecef224d3a6dbe046dc98ec6da573cbf Mon Sep 17 00:00:00 2001 From: Jeel Mehta Date: Fri, 6 Jun 2025 16:39:54 -0700 Subject: [PATCH 10/10] Test run --- .../workflows/java-ec2-adot-sigv4-test.yml | 4 +-- .../PredefinedExpectedTemplate.java | 26 +++++++++---------- .../{traces => }/aws-sdk-call-log.mustache | 0 .../{traces => }/aws-sdk-call-metric.mustache | 0 .../{traces => }/aws-sdk-call-trace.mustache | 0 .../{traces => }/client-call-log.mustache | 0 .../{traces => }/client-call-metric.mustache | 0 .../{traces => }/client-call-trace.mustache | 0 ...{log.mustache => application-log.mustache} | 0 .../outgoing-http-call-log.mustache | 0 .../outgoing-http-call-metric.mustache | 0 .../outgoing-http-call-trace.mustache | 0 .../{traces => }/remote-service-log.mustache | 0 .../remote-service-metric.mustache | 0 .../remote-service-trace.mustache | 0 ...ion.yml => application-log-validation.yml} | 0 16 files changed, 15 insertions(+), 15 deletions(-) rename validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/{traces => }/aws-sdk-call-log.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/{traces => }/aws-sdk-call-metric.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/{traces => }/aws-sdk-call-trace.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/{traces => }/client-call-log.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/{traces => }/client-call-metric.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/{traces => }/client-call-trace.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/{log.mustache => application-log.mustache} (100%) rename validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/{traces => }/outgoing-http-call-log.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/{traces => }/outgoing-http-call-metric.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/{traces => }/outgoing-http-call-trace.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/{traces => }/remote-service-log.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/{traces => }/remote-service-metric.mustache (100%) rename validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/{traces => }/remote-service-trace.mustache (100%) rename validator/src/main/resources/validations/java/ec2/adot-aws-otlp/logs/{log-validation.yml => application-log-validation.yml} (100%) diff --git a/.github/workflows/java-ec2-adot-sigv4-test.yml b/.github/workflows/java-ec2-adot-sigv4-test.yml index 3f335ed77..01070e939 100644 --- a/.github/workflows/java-ec2-adot-sigv4-test.yml +++ b/.github/workflows/java-ec2-adot-sigv4-test.yml @@ -232,8 +232,8 @@ jobs: --rollup' - name: Validate generated otlp logs - id: log-validation-1 - run: ./gradlew validator:run --args='-c java/ec2/adot-aws-otlp/logs/log-validation.yml + id: application-log-validation + run: ./gradlew validator:run --args='-c java/ec2/adot-aws-otlp/logs/application-log-validation.yml --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8080 diff --git a/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java b/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java index 15d940898..b632bebb1 100644 --- a/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java +++ b/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java @@ -116,26 +116,26 @@ public enum PredefinedExpectedTemplate implements FileConfig { JAVA_EC2_UBUNTU_CLIENT_CALL_TRACE("/expected-data-template/java/ec2/ubuntu/client-call-trace.mustache"), /** Java EC2 ADOT SigV4 (ADOT Stand-Alone) Test Case Validations */ - JAVA_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_LOG("/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-log.mustache"), + JAVA_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_LOG("/expected-data-template/java/ec2/adot-aws-otlp/outgoing-http-call-log.mustache"), JAVA_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_METRIC( - "/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-metric.mustache"), + "/expected-data-template/java/ec2/adot-aws-otlp/outgoing-http-call-metric.mustache"), JAVA_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_TRACE( - "/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-trace.mustache"), + "/expected-data-template/java/ec2/adot-aws-otlp/outgoing-http-call-trace.mustache"), - JAVA_EC2_ADOT_SIGV4_AWS_SDK_CALL_LOG("/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-log.mustache"), - JAVA_EC2_ADOT_SIGV4_AWS_SDK_CALL_METRIC("/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-metric.mustache"), - JAVA_EC2_ADOT_SIGV4_AWS_SDK_CALL_TRACE("/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-trace.mustache"), + JAVA_EC2_ADOT_SIGV4_AWS_SDK_CALL_LOG("/expected-data-template/java/ec2/adot-aws-otlp/aws-sdk-call-log.mustache"), + JAVA_EC2_ADOT_SIGV4_AWS_SDK_CALL_METRIC("/expected-data-template/java/ec2/adot-aws-otlp/aws-sdk-call-metric.mustache"), + JAVA_EC2_ADOT_SIGV4_AWS_SDK_CALL_TRACE("/expected-data-template/java/ec2/adot-aws-otlp/aws-sdk-call-trace.mustache"), - JAVA_EC2_ADOT_SIGV4_REMOTE_SERVICE_LOG("/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-log.mustache"), - JAVA_EC2_ADOT_SIGV4_REMOTE_SERVICE_METRIC("/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-metric.mustache"), - JAVA_EC2_ADOT_SIGV4_REMOTE_SERVICE_TRACE("/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-trace.mustache"), + JAVA_EC2_ADOT_SIGV4_REMOTE_SERVICE_LOG("/expected-data-template/java/ec2/adot-aws-otlp/remote-service-log.mustache"), + JAVA_EC2_ADOT_SIGV4_REMOTE_SERVICE_METRIC("/expected-data-template/java/ec2/adot-aws-otlp/remote-service-metric.mustache"), + JAVA_EC2_ADOT_SIGV4_REMOTE_SERVICE_TRACE("/expected-data-template/java/ec2/adot-aws-otlp/remote-service-trace.mustache"), - JAVA_EC2_ADOT_SIGV4_CLIENT_CALL_LOG("/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-log.mustache"), - JAVA_EC2_ADOT_SIGV4_CLIENT_CALL_METRIC("/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-metric.mustache"), - JAVA_EC2_ADOT_SIGV4_CLIENT_CALL_TRACE("/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-trace.mustache"), + JAVA_EC2_ADOT_SIGV4_CLIENT_CALL_LOG("/expected-data-template/java/ec2/adot-aws-otlp/client-call-log.mustache"), + JAVA_EC2_ADOT_SIGV4_CLIENT_CALL_METRIC("/expected-data-template/java/ec2/adot-aws-otlp/client-call-metric.mustache"), + JAVA_EC2_ADOT_SIGV4_CLIENT_CALL_TRACE("/expected-data-template/java/ec2/adot-aws-otlp/client-call-trace.mustache"), /** Java EC2 ADOT SigV4 Log Exporter Test Case Validation */ - JAVA_EC2_ADOT_OTLP_LOG("/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache"), + JAVA_EC2_ADOT_OTLP_LOG("/expected-data-template/java/ec2/adot-aws-otlp/logs/application-log.mustache"), /** Java EC2 K8s Test Case Validations */ JAVA_K8S_OUTGOING_HTTP_CALL_LOG("/expected-data-template/java/k8s/outgoing-http-call-log.mustache"), diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/aws-sdk-call-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-log.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/aws-sdk-call-log.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-metric.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/aws-sdk-call-metric.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-metric.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/aws-sdk-call-metric.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/aws-sdk-call-trace.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/aws-sdk-call-trace.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/aws-sdk-call-trace.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/client-call-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-log.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/client-call-log.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-metric.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/client-call-metric.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-metric.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/client-call-metric.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/client-call-trace.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/client-call-trace.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/client-call-trace.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/application-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/log.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/logs/application-log.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/outgoing-http-call-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-log.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/outgoing-http-call-log.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-metric.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/outgoing-http-call-metric.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-metric.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/outgoing-http-call-metric.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/outgoing-http-call-trace.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/outgoing-http-call-trace.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/outgoing-http-call-trace.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-log.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/remote-service-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-log.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/remote-service-log.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-metric.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/remote-service-metric.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-metric.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/remote-service-metric.mustache diff --git a/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-trace.mustache b/validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/remote-service-trace.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/traces/remote-service-trace.mustache rename to validator/src/main/resources/expected-data-template/java/ec2/adot-aws-otlp/remote-service-trace.mustache diff --git a/validator/src/main/resources/validations/java/ec2/adot-aws-otlp/logs/log-validation.yml b/validator/src/main/resources/validations/java/ec2/adot-aws-otlp/logs/application-log-validation.yml similarity index 100% rename from validator/src/main/resources/validations/java/ec2/adot-aws-otlp/logs/log-validation.yml rename to validator/src/main/resources/validations/java/ec2/adot-aws-otlp/logs/application-log-validation.yml