diff --git a/.github/workflows/python-ec2-adot-sigv4-test.yml b/.github/workflows/python-ec2-adot-sigv4-test.yml index 886c9bafd..6610a3d3d 100644 --- a/.github/workflows/python-ec2-adot-sigv4-test.yml +++ b/.github/workflows/python-ec2-adot-sigv4-test.yml @@ -39,8 +39,8 @@ env: 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 - LOG_GROUP_NAME: aws/spans - TEST_LOG_GROUP_NAME: otlp_logs + SPANS_LOG_GROUP_NAME: aws/spans + APPLICATION_LOGS_LOG_GROUP_NAME: otlp_logs TEST_RESOURCES_FOLDER: ${GITHUB_WORKSPACE} jobs: @@ -122,7 +122,7 @@ jobs: -var="get_adot_wheel_command=${{ env.GET_ADOT_WHEEL_COMMAND }}" \ -var="language_version=${{ env.PYTHON_VERSION }}" \ -var="cpu_architecture=${{ env.CPU_ARCHITECTURE }}" \ - -var="test_log_group=${{ env.TEST_LOG_GROUP_NAME }}" \ + -var="application_logs_log_group=${{ env.APPLICATION_LOGS_LOG_GROUP_NAME }}" \ || deployment_failed=$? if [ $deployment_failed -eq 1 ]; then @@ -178,7 +178,7 @@ jobs: --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8001 --region ${{ env.E2E_TEST_AWS_REGION }} --metric-namespace ${{ env.METRIC_NAMESPACE }} - --log-group ${{ env.LOG_GROUP_NAME }} + --log-group ${{ env.SPANS_LOG_GROUP_NAME }} --service-name python-sample-application-${{ env.TESTING_ID }} --remote-service-name python-sample-remote-application-${{ env.TESTING_ID }} --query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }} @@ -195,7 +195,7 @@ jobs: --remote-service-deployment-name python-sample-remote-application-${{ env.TESTING_ID }} --region ${{ env.E2E_TEST_AWS_REGION }} --metric-namespace ${{ env.METRIC_NAMESPACE }} - --log-group ${{ env.LOG_GROUP_NAME }} + --log-group ${{ env.SPANS_LOG_GROUP_NAME }} --service-name python-sample-application-${{ env.TESTING_ID }} --remote-service-name python-sample-remote-application-${{ env.TESTING_ID }} --query-string ip=${{ env.REMOTE_SERVICE_IP }} @@ -213,7 +213,7 @@ jobs: --region ${{ env.E2E_TEST_AWS_REGION }} --account-id ${{ env.E2E_TEST_ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} - --log-group ${{ env.LOG_GROUP_NAME }} + --log-group ${{ env.SPANS_LOG_GROUP_NAME }} --service-name python-sample-application-${{ env.TESTING_ID }} --remote-service-name python-sample-remote-application-${{ env.TESTING_ID }} --query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }} @@ -222,15 +222,15 @@ jobs: --rollup' - name: Validate generated otlp logs - id: log-validation-1 - run: ./gradlew validator:run --args='-c python/ec2/adot-aws-otlp/logs/log-validation.yml + id: application-log-validation + run: ./gradlew validator:run --args='-c python/ec2/adot-aws-otlp/application-log-validation.yml --testing-id ${{ env.TESTING_ID }} --endpoint http://localhost:8000 --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8001 --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 }} + --log-group ${{ env.APPLICATION_LOGS_LOG_GROUP_NAME }} --service-name python-sample-application-${{ env.TESTING_ID }} --remote-service-name python-sample-remote-application-${{ env.TESTING_ID }} --query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }} diff --git a/terraform/python/ec2/adot-sigv4/main.tf b/terraform/python/ec2/adot-sigv4/main.tf index 3489cc282..58a9fb47b 100644 --- a/terraform/python/ec2/adot-sigv4/main.tf +++ b/terraform/python/ec2/adot-sigv4/main.tf @@ -168,7 +168,7 @@ resource "null_resource" "main_service_setup" { export OTEL_TRACES_EXPORTER=otlp \ 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=${var.test_log_group},x-aws-log-stream=default \ + export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=${var.application_logs_log_group},x-aws-log-stream=default \ export OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true \ export OTEL_SERVICE_NAME=python-sample-application-${var.test_id} export OTEL_TRACES_SAMPLER=always_on @@ -292,7 +292,7 @@ resource "null_resource" "remote_service_setup" { export OTEL_TRACES_EXPORTER=otlp \ 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=${var.test_log_group},x-aws-log-stream=default \ + export OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=${var.application_logs_log_group},x-aws-log-stream=default \ export OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true \ export OTEL_SERVICE_NAME=python-sample-remote-application-${var.test_id} export OTEL_TRACES_SAMPLER=always_on diff --git a/terraform/python/ec2/adot-sigv4/variables.tf b/terraform/python/ec2/adot-sigv4/variables.tf index 617ab5d6d..018e64d88 100644 --- a/terraform/python/ec2/adot-sigv4/variables.tf +++ b/terraform/python/ec2/adot-sigv4/variables.tf @@ -45,6 +45,6 @@ variable "cpu_architecture" { default = "x86_64" } -variable "test_log_group" { +variable "application_logs_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..8dd0e8163 100644 --- a/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java +++ b/validator/src/main/java/com/amazon/aoc/fileconfigs/PredefinedExpectedTemplate.java @@ -222,26 +222,26 @@ public enum PredefinedExpectedTemplate implements FileConfig { /** Python EC2 ADOT SigV4 (Stand Alone ADOT) Test Case Validations */ PYTHON_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_LOG( - "/expected-data-template/python/ec2/adot-aws-otlp/traces/outgoing-http-call-log.mustache"), + "/expected-data-template/python/ec2/adot-aws-otlp/outgoing-http-call-log.mustache"), PYTHON_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_METRIC( - "/expected-data-template/python/ec2/adot-aws-otlp/traces/outgoing-http-call-metric.mustache"), + "/expected-data-template/python/ec2/adot-aws-otlp/outgoing-http-call-metric.mustache"), PYTHON_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_TRACE( - "/expected-data-template/python/ec2/adot-aws-otlp/traces/outgoing-http-call-trace.mustache"), + "/expected-data-template/python/ec2/adot-aws-otlp/outgoing-http-call-trace.mustache"), - PYTHON_EC2_ADOT_SIGV4_AWS_SDK_CALL_LOG("/expected-data-template/python/ec2/adot-aws-otlp/traces/aws-sdk-call-log.mustache"), - PYTHON_EC2_ADOT_SIGV4_AWS_SDK_CALL_METRIC("/expected-data-template/python/ec2/adot-aws-otlp/traces/aws-sdk-call-metric.mustache"), - PYTHON_EC2_ADOT_SIGV4_AWS_SDK_CALL_TRACE("/expected-data-template/python/ec2/adot-aws-otlp/traces/aws-sdk-call-trace.mustache"), + PYTHON_EC2_ADOT_SIGV4_AWS_SDK_CALL_LOG("/expected-data-template/python/ec2/adot-aws-otlp/aws-sdk-call-log.mustache"), + PYTHON_EC2_ADOT_SIGV4_AWS_SDK_CALL_METRIC("/expected-data-template/python/ec2/adot-aws-otlp/aws-sdk-call-metric.mustache"), + PYTHON_EC2_ADOT_SIGV4_AWS_SDK_CALL_TRACE("/expected-data-template/python/ec2/adot-aws-otlp/aws-sdk-call-trace.mustache"), - PYTHON_EC2_ADOT_SIGV4_REMOTE_SERVICE_LOG("/expected-data-template/python/ec2/adot-aws-otlp/traces/remote-service-log.mustache"), - PYTHON_EC2_ADOT_SIGV4_REMOTE_SERVICE_METRIC("/expected-data-template/python/ec2/adot-aws-otlp/traces/remote-service-metric.mustache"), - PYTHON_EC2_ADOT_SIGV4_REMOTE_SERVICE_TRACE("/expected-data-template/python/ec2/adot-aws-otlp/traces/remote-service-trace.mustache"), + PYTHON_EC2_ADOT_SIGV4_REMOTE_SERVICE_LOG("/expected-data-template/python/ec2/adot-aws-otlp/remote-service-log.mustache"), + PYTHON_EC2_ADOT_SIGV4_REMOTE_SERVICE_METRIC("/expected-data-template/python/ec2/adot-aws-otlp/remote-service-metric.mustache"), + PYTHON_EC2_ADOT_SIGV4_REMOTE_SERVICE_TRACE("/expected-data-template/python/ec2/adot-aws-otlp/remote-service-trace.mustache"), - PYTHON_EC2_ADOT_SIGV4_CLIENT_CALL_LOG("/expected-data-template/python/ec2/adot-aws-otlp/traces/client-call-log.mustache"), - PYTHON_EC2_ADOT_SIGV4_CLIENT_CALL_METRIC("/expected-data-template/python/ec2/adot-aws-otlp/traces/client-call-metric.mustache"), - PYTHON_EC2_ADOT_SIGV4_CLIENT_CALL_TRACE("/expected-data-template/python/ec2/adot-aws-otlp/traces/client-call-trace.mustache"), + PYTHON_EC2_ADOT_SIGV4_CLIENT_CALL_LOG("/expected-data-template/python/ec2/adot-aws-otlp/client-call-log.mustache"), + PYTHON_EC2_ADOT_SIGV4_CLIENT_CALL_METRIC("/expected-data-template/python/ec2/adot-aws-otlp/client-call-metric.mustache"), + PYTHON_EC2_ADOT_SIGV4_CLIENT_CALL_TRACE("/expected-data-template/python/ec2/adot-aws-otlp/client-call-trace.mustache"), /** Python EC2 ADOT SigV4 Log Exporter Test Case Validation */ - PYTHON_EC2_ADOT_OTLP_LOG("/expected-data-template/python/ec2/adot-aws-otlp/logs/log.mustache"), + PYTHON_EC2_ADOT_OTLP_LOG("/expected-data-template/python/ec2/adot-aws-otlp/application-log.mustache"), /** Python K8S Test Case Validations */ PYTHON_K8S_OUTGOING_HTTP_CALL_LOG("/expected-data-template/python/k8s/outgoing-http-call-log.mustache"), @@ -326,7 +326,7 @@ public enum PredefinedExpectedTemplate implements FileConfig { DOTNET_EC2_ASG_CLIENT_CALL_METRIC("/expected-data-template/dotnet/ec2/asg/client-call-metric.mustache"), DOTNET_EC2_ASG_CLIENT_CALL_TRACE("/expected-data-template/dotnet/ec2/asg/client-call-trace.mustache"), - /** Python EC2 ADOT SigV4 (Stand Alone ADOT) Test Case Validations */ + /** DotNet EC2 ADOT SigV4 (Stand Alone ADOT) Test Case Validations */ DOTNET_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_LOG( "/expected-data-template/dotnet/ec2/adot-sigv4/outgoing-http-call-log.mustache"), DOTNET_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_METRIC( @@ -449,7 +449,7 @@ public enum PredefinedExpectedTemplate implements FileConfig { NODE_K8S_CLIENT_CALL_METRIC("/expected-data-template/node/k8s/client-call-metric.mustache"), NODE_K8S_CLIENT_CALL_TRACE("/expected-data-template/node/k8s/client-call-trace.mustache"), - /** Python EC2 ADOT SigV4 (Stand Alone ADOT) Test Case Validations */ + /** Node EC2 ADOT SigV4 (Stand Alone ADOT) Test Case Validations */ NODE_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_LOG( "/expected-data-template/node/ec2/adot-sigv4/outgoing-http-call-log.mustache"), NODE_EC2_ADOT_SIGV4_OUTGOING_HTTP_CALL_METRIC( diff --git a/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/logs/log.mustache b/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/application-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/logs/log.mustache rename to validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/application-log.mustache diff --git a/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/aws-sdk-call-log.mustache b/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/aws-sdk-call-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/aws-sdk-call-log.mustache rename to validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/aws-sdk-call-log.mustache diff --git a/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/aws-sdk-call-metric.mustache b/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/aws-sdk-call-metric.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/aws-sdk-call-metric.mustache rename to validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/aws-sdk-call-metric.mustache diff --git a/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/aws-sdk-call-trace.mustache b/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/aws-sdk-call-trace.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/aws-sdk-call-trace.mustache rename to validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/aws-sdk-call-trace.mustache diff --git a/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/client-call-log.mustache b/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/client-call-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/client-call-log.mustache rename to validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/client-call-log.mustache diff --git a/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/client-call-metric.mustache b/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/client-call-metric.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/client-call-metric.mustache rename to validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/client-call-metric.mustache diff --git a/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/client-call-trace.mustache b/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/client-call-trace.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/client-call-trace.mustache rename to validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/client-call-trace.mustache diff --git a/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/outgoing-http-call-log.mustache b/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/outgoing-http-call-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/outgoing-http-call-log.mustache rename to validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/outgoing-http-call-log.mustache diff --git a/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/outgoing-http-call-metric.mustache b/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/outgoing-http-call-metric.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/outgoing-http-call-metric.mustache rename to validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/outgoing-http-call-metric.mustache diff --git a/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/outgoing-http-call-trace.mustache b/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/outgoing-http-call-trace.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/outgoing-http-call-trace.mustache rename to validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/outgoing-http-call-trace.mustache diff --git a/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/remote-service-log.mustache b/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/remote-service-log.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/remote-service-log.mustache rename to validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/remote-service-log.mustache diff --git a/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/remote-service-metric.mustache b/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/remote-service-metric.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/remote-service-metric.mustache rename to validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/remote-service-metric.mustache diff --git a/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/remote-service-trace.mustache b/validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/remote-service-trace.mustache similarity index 100% rename from validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/traces/remote-service-trace.mustache rename to validator/src/main/resources/expected-data-template/python/ec2/adot-aws-otlp/remote-service-trace.mustache diff --git a/validator/src/main/resources/validations/python/ec2/adot-aws-otlp/logs/log-validation.yml b/validator/src/main/resources/validations/python/ec2/adot-aws-otlp/application-log-validation.yml similarity index 100% rename from validator/src/main/resources/validations/python/ec2/adot-aws-otlp/logs/log-validation.yml rename to validator/src/main/resources/validations/python/ec2/adot-aws-otlp/application-log-validation.yml