diff --git a/.github/workflows/application-signals-python-e2e-ec2-test.yml b/.github/workflows/application-signals-python-e2e-ec2-test.yml index ca848aee1..ed1708a79 100644 --- a/.github/workflows/application-signals-python-e2e-ec2-test.yml +++ b/.github/workflows/application-signals-python-e2e-ec2-test.yml @@ -168,7 +168,7 @@ jobs: continue-on-error: true run: | curl -S -s -o /dev/null http://${{ env.MAIN_SERVICE_ENDPOINT }}/outgoing-http-call; echo - curl -S -s -o /dev/null http://${{ env.MAIN_SERVICE_ENDPOINT }}/aws-sdk-call; echo + curl -S -s -o /dev/null http://${{ env.MAIN_SERVICE_ENDPOINT }}/aws-sdk-call?testingId=${{ env.TESTING_ID }}; echo curl -S -s -o /dev/null http://${{ env.MAIN_SERVICE_ENDPOINT }}/remote-service?ip=${{ env.REMOTE_SERVICE_IP }}; echo curl -S -s -o /dev/null http://${{ env.MAIN_SERVICE_ENDPOINT }}/client-call; echo @@ -184,6 +184,7 @@ jobs: - name: Validate generated EMF logs id: log-validation run: ./gradlew validator:run --args='-c python/ec2/log-validation.yml + --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8001 --region ${{ inputs.aws-region }} @@ -191,7 +192,7 @@ jobs: --log-group ${{ env.LOG_GROUP_NAME }} --service-name python-sample-application-${{ env.TESTING_ID }} --remote-service-name python-sample-remote-application-${{ env.TESTING_ID }} - --request-body ip=${{ env.REMOTE_SERVICE_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_IP }} --instance-ami ${{ env.EC2_INSTANCE_AMI }} --rollup' @@ -199,6 +200,7 @@ jobs: id: metric-validation if: (success() || steps.log-validation.outcome == 'failure') && !cancelled() run: ./gradlew validator:run --args='-c python/ec2/metric-validation.yml + --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8001 --region ${{ inputs.aws-region }} @@ -206,7 +208,7 @@ jobs: --log-group ${{ env.LOG_GROUP_NAME }} --service-name python-sample-application-${{ env.TESTING_ID }} --remote-service-name python-sample-remote-application-${{ env.TESTING_ID }} - --request-body ip=${{ env.REMOTE_SERVICE_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }} --instance-ami ${{ env.EC2_INSTANCE_AMI }} --rollup' @@ -214,6 +216,7 @@ jobs: id: trace-validation if: (success() || steps.log-validation.outcome == 'failure' || steps.metric-validation.outcome == 'failure') && !cancelled() run: ./gradlew validator:run --args='-c python/ec2/trace-validation.yml + --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8001 --region ${{ inputs.aws-region }} @@ -222,7 +225,7 @@ jobs: --log-group ${{ env.LOG_GROUP_NAME }} --service-name python-sample-application-${{ env.TESTING_ID }} --remote-service-name python-sample-remote-application-${{ env.TESTING_ID }} - --request-body ip=${{ env.REMOTE_SERVICE_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_IP }} --instance-ami ${{ env.EC2_INSTANCE_AMI }} --rollup' diff --git a/.github/workflows/application-signals-python-e2e-eks-test.yml b/.github/workflows/application-signals-python-e2e-eks-test.yml index 350da636c..56163f3c1 100644 --- a/.github/workflows/application-signals-python-e2e-eks-test.yml +++ b/.github/workflows/application-signals-python-e2e-eks-test.yml @@ -253,7 +253,7 @@ jobs: continue-on-error: true run: | curl -S -s -o /dev/null http://${{ env.APP_ENDPOINT }}/outgoing-http-call; echo - curl -S -s -o /dev/null http://${{ env.APP_ENDPOINT }}/aws-sdk-call; echo + curl -S -s -o /dev/null http://${{ env.APP_ENDPOINT }}/aws-sdk-call?testingId=${{ env.TESTING_ID }}; echo curl -S -s -o /dev/null http://${{ env.APP_ENDPOINT }}/remote-service?ip=${{ env.REMOTE_SERVICE_POD_IP }}; echo curl -S -s -o /dev/null http://${{ env.APP_ENDPOINT }}/client-call; echo @@ -280,7 +280,7 @@ jobs: --platform-info ${{ inputs.test-cluster-name }} --service-name python-application-${{ env.TESTING_ID }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }} - --request-body ip=${{ env.REMOTE_SERVICE_POD_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }} --rollup' - name: Call endpoints and validate generated metrics @@ -298,7 +298,7 @@ jobs: --service-name python-application-${{ env.TESTING_ID }} --remote-service-name python-remote-application-${{ env.TESTING_ID }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }} - --request-body ip=${{ env.REMOTE_SERVICE_POD_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }} --rollup' - name: Call endpoints and validate generated traces @@ -314,7 +314,7 @@ jobs: --platform-info ${{ inputs.test-cluster-name }} --service-name python-application-${{ env.TESTING_ID }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }} - --request-body ip=${{ env.REMOTE_SERVICE_POD_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }} --rollup' - name: Publish metric on test result diff --git a/.github/workflows/appsignals-e2e-ec2-test.yml b/.github/workflows/appsignals-e2e-ec2-test.yml index 8f37a6067..33544e769 100644 --- a/.github/workflows/appsignals-e2e-ec2-test.yml +++ b/.github/workflows/appsignals-e2e-ec2-test.yml @@ -165,10 +165,10 @@ jobs: - name: Call all test APIs continue-on-error: true run: | - curl -S -s http://${{ env.MAIN_SERVICE_ENDPOINT }}/outgoing-http-call/ - curl -S -s http://${{ env.MAIN_SERVICE_ENDPOINT }}/aws-sdk-call/ - curl -S -s http://${{ env.MAIN_SERVICE_ENDPOINT }}/remote-service?ip=${{ env.REMOTE_SERVICE_IP }}/ - curl -S -s http://${{ env.MAIN_SERVICE_ENDPOINT }}/client-call/ + curl -S -s http://${{ env.MAIN_SERVICE_ENDPOINT }}/outgoing-http-call + curl -S -s http://${{ env.MAIN_SERVICE_ENDPOINT }}/aws-sdk-call?testingId=${{ env.TESTING_ID }} + curl -S -s http://${{ env.MAIN_SERVICE_ENDPOINT }}/remote-service?ip=${{ env.REMOTE_SERVICE_IP }} + curl -S -s http://${{ env.MAIN_SERVICE_ENDPOINT }}/client-call - name: Initiate Gradlew Daemon uses: ./.github/workflows/actions/execute_and_retry @@ -191,7 +191,7 @@ jobs: --log-group ${{ env.LOG_GROUP_NAME }} --service-name sample-application-${{ env.TESTING_ID }} --remote-service-name sample-remote-application-${{ env.TESTING_ID }} - --request-body ip=${{ env.REMOTE_SERVICE_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_IP }} --instance-ami ${{ env.EC2_INSTANCE_AMI }} --rollup' @@ -208,7 +208,7 @@ jobs: --log-group ${{ env.LOG_GROUP_NAME }} --service-name sample-application-${{ env.TESTING_ID }} --remote-service-name sample-remote-application-${{ env.TESTING_ID }} - --request-body ip=${{ env.REMOTE_SERVICE_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_IP }}&testingId=${{ env.TESTING_ID }} --instance-ami ${{ env.EC2_INSTANCE_AMI }} --rollup' @@ -225,7 +225,7 @@ jobs: --log-group ${{ env.LOG_GROUP_NAME }} --service-name sample-application-${{ env.TESTING_ID }} --remote-service-name sample-remote-application-${{ env.TESTING_ID }} - --request-body ip=${{ env.REMOTE_SERVICE_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_IP }} --instance-ami ${{ env.EC2_INSTANCE_AMI }} --rollup' diff --git a/.github/workflows/appsignals-e2e-eks-test.yml b/.github/workflows/appsignals-e2e-eks-test.yml index 80d5e6c38..14fbe341e 100644 --- a/.github/workflows/appsignals-e2e-eks-test.yml +++ b/.github/workflows/appsignals-e2e-eks-test.yml @@ -261,10 +261,10 @@ jobs: - name: Call all test APIs continue-on-error: true run: | - curl -S -s http://${{ env.APP_ENDPOINT }}/outgoing-http-call/ - curl -S -s http://${{ env.APP_ENDPOINT }}/aws-sdk-call/ - curl -S -s http://${{ env.APP_ENDPOINT }}/remote-service?ip=${{ env.REMOTE_SERVICE_POD_IP }}/ - curl -S -s http://${{ env.APP_ENDPOINT }}/client-call/ + curl -S -s http://${{ env.APP_ENDPOINT }}/outgoing-http-call + curl -S -s http://${{ env.APP_ENDPOINT }}/aws-sdk-call?testingId=${{ env.TESTING_ID }} + curl -S -s http://${{ env.APP_ENDPOINT }}/remote-service?ip=${{ env.REMOTE_SERVICE_POD_IP }} + curl -S -s http://${{ env.APP_ENDPOINT }}/client-call - name: Initiate Gradlew Daemon uses: ./.github/workflows/actions/execute_and_retry @@ -289,7 +289,7 @@ jobs: --platform-info ${{ inputs.test-cluster-name }} --service-name sample-application-${{ env.TESTING_ID }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }} - --request-body ip=${{ env.REMOTE_SERVICE_POD_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }} --rollup' - name: Call endpoints and validate generated metrics @@ -307,7 +307,7 @@ jobs: --service-name sample-application-${{ env.TESTING_ID }} --remote-service-name sample-remote-application-${{ env.TESTING_ID }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }} - --request-body ip=${{ env.REMOTE_SERVICE_POD_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }} --rollup' - name: Call endpoints and validate generated traces @@ -324,7 +324,7 @@ jobs: --platform-info ${{ inputs.test-cluster-name }} --service-name sample-application-${{ env.TESTING_ID }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_DEPLOYMENT_NAME }} - --request-body ip=${{ env.REMOTE_SERVICE_POD_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }} --rollup' - name: Publish metric on test result diff --git a/.github/workflows/appsignals-e2e-k8s-test.yml b/.github/workflows/appsignals-e2e-k8s-test.yml index fb266dd60..1d00a906c 100644 --- a/.github/workflows/appsignals-e2e-k8s-test.yml +++ b/.github/workflows/appsignals-e2e-k8s-test.yml @@ -120,7 +120,7 @@ jobs: --app-namespace ${{ env.SAMPLE_APP_NAMESPACE }} --service-name sample-application-${{ env.TESTING_ID }} --remote-service-name sample-r-app-deployment-${{ env.TESTING_ID }} - --request-body ip=${{ env.REMOTE_SERVICE_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_IP }} --rollup' - name: Validate generated metrics @@ -138,7 +138,7 @@ jobs: --service-name sample-application-${{ env.TESTING_ID }} --remote-service-name sample-r-app-deployment-${{ env.TESTING_ID }} --remote-service-deployment-name sample-r-app-deployment-${{ env.TESTING_ID }} - --request-body ip=${{ env.REMOTE_SERVICE_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_IP }} --rollup' - name: Validate generated traces @@ -156,7 +156,7 @@ jobs: --service-name sample-application-${{ env.TESTING_ID }} --remote-service-name sample-r-app-deployment-${{ env.TESTING_ID }} --remote-service-deployment-name sample-r-app-deployment-${{ env.TESTING_ID }} - --request-body ip=${{ env.REMOTE_SERVICE_IP }} + --query-string ip=${{ env.REMOTE_SERVICE_IP }} --rollup' - name: Publish metric on test result diff --git a/terraform/ec2/main.tf b/terraform/ec2/main.tf index b3bc009cb..ff289d0c5 100644 --- a/terraform/ec2/main.tf +++ b/terraform/ec2/main.tf @@ -177,7 +177,7 @@ resource "null_resource" "remote_service_setup" { "echo $agent_config > amazon-cloudwatch-agent.json", # Get and run CW agent rpm - "${var.get_cw_agent_rpm_command}", + "${var.get_cw_agent_rpm_command}", "sudo rpm -U ./cw-agent.rpm", "sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:./amazon-cloudwatch-agent.json", diff --git a/validator/src/main/java/com/amazon/aoc/App.java b/validator/src/main/java/com/amazon/aoc/App.java index 423c74d12..3c2cf9868 100644 --- a/validator/src/main/java/com/amazon/aoc/App.java +++ b/validator/src/main/java/com/amazon/aoc/App.java @@ -78,8 +78,8 @@ public class App implements Callable { @CommandLine.Option(names = {"--endpoint"}) private String endpoint; - @CommandLine.Option(names = {"--request-body"}) - private String requestBody; + @CommandLine.Option(names = {"--query-string"}) + private String queryString; @CommandLine.Option( names = {"--log-group"}, @@ -161,7 +161,7 @@ public Integer call() throws Exception { context.setRemoteServiceName(this.remoteServiceName); context.setRemoteServiceDeploymentName(this.remoteServiceDeploymentName); context.setEndpoint(this.endpoint); - context.setRequestBody(this.requestBody); + context.setQueryString(this.queryString); context.setLogGroup(this.logGroup); context.setEcsContext(buildJsonContext(ecsContext, ECSContext.class)); context.setEc2Context(buildJsonContext(ec2Context, EC2Context.class)); diff --git a/validator/src/main/java/com/amazon/aoc/callers/HttpCaller.java b/validator/src/main/java/com/amazon/aoc/callers/HttpCaller.java index eda96cefe..13f917e69 100644 --- a/validator/src/main/java/com/amazon/aoc/callers/HttpCaller.java +++ b/validator/src/main/java/com/amazon/aoc/callers/HttpCaller.java @@ -32,7 +32,7 @@ public class HttpCaller implements ICaller { private String url; private String path; - private String requestBody; + private String queryString; /** * construct httpCaller. @@ -51,11 +51,11 @@ public HttpCaller(String endpoint, String path) { * * @param endpoint the endpoint to call, for example "http://127.0.0.1:8080" * @param path the path to call, for example "/test" - * @param requestBody the request body, for example "key=value" + * @param queryString the query string, for example "key1=value1&key2=value2" */ - public HttpCaller(String endpoint, String path, String requestBody) { + public HttpCaller(String endpoint, String path, String queryString) { this.path = path; - this.url = endpoint + path + "?" + requestBody + "/"; + this.url = endpoint + path + "?" + queryString; log.info("validator is trying to hit this {} endpoint", this.url); } diff --git a/validator/src/main/java/com/amazon/aoc/models/Context.java b/validator/src/main/java/com/amazon/aoc/models/Context.java index 5d8a13c08..14aa488e9 100644 --- a/validator/src/main/java/com/amazon/aoc/models/Context.java +++ b/validator/src/main/java/com/amazon/aoc/models/Context.java @@ -51,7 +51,7 @@ public class Context { private String endpoint; - private String requestBody; + private String queryString; private String logGroup; diff --git a/validator/src/main/java/com/amazon/aoc/models/ValidationConfig.java b/validator/src/main/java/com/amazon/aoc/models/ValidationConfig.java index f1c83a553..37a41df95 100644 --- a/validator/src/main/java/com/amazon/aoc/models/ValidationConfig.java +++ b/validator/src/main/java/com/amazon/aoc/models/ValidationConfig.java @@ -28,7 +28,7 @@ public class ValidationConfig { String httpPath; String httpMethod; - String requestBody; + String queryString; String expectedResultPath; Boolean shouldValidateMetricValue; diff --git a/validator/src/main/java/com/amazon/aoc/services/CloudWatchService.java b/validator/src/main/java/com/amazon/aoc/services/CloudWatchService.java index db444f42e..dba7f3944 100644 --- a/validator/src/main/java/com/amazon/aoc/services/CloudWatchService.java +++ b/validator/src/main/java/com/amazon/aoc/services/CloudWatchService.java @@ -35,6 +35,7 @@ public class CloudWatchService { public static final String SERVICE_DIMENSION = "Service"; public static final String REMOTE_SERVICE_DIMENSION = "RemoteService"; + public static final String REMOTE_TARGET_DIMENSION = "RemoteTarget"; private static final int MAX_QUERY_PERIOD = 60; private static final String REQUESTER = "integrationTest"; diff --git a/validator/src/main/java/com/amazon/aoc/validators/CWMetricValidator.java b/validator/src/main/java/com/amazon/aoc/validators/CWMetricValidator.java index 6a665dd2b..d3732506d 100644 --- a/validator/src/main/java/com/amazon/aoc/validators/CWMetricValidator.java +++ b/validator/src/main/java/com/amazon/aoc/validators/CWMetricValidator.java @@ -90,17 +90,20 @@ public void validate() throws Exception { RetryHelper.retry( maxRetryCount, () -> { - // We will query both the Service and RemoteService dimensions to ensure we get all - // metrics from all aggregations, specifically the [RemoteService] aggregation. + // We will query the Service, RemoteService, and RemoteTarget dimensions to ensure we + // get all metrics from all aggregations, specifically the [RemoteService] aggregation. List serviceNames = Lists.newArrayList( context.getServiceName(), context.getRemoteServiceDeploymentName()); - // TODO - Put the following back in: "www.amazon.com", "AWS.SDK.S3" List remoteServiceNames = Lists.newArrayList(context.getRemoteServiceDeploymentName()); + List remoteTargetNames = Lists.newArrayList(); if (context.getRemoteServiceName() != null && !context.getRemoteServiceName().isEmpty()) { serviceNames.add(context.getRemoteServiceName()); } + if (context.getTestingId() != null && !context.getTestingId().isEmpty()) { + remoteTargetNames.add("::s3:::e2e-test-bucket-name-" + context.getTestingId()); + } List actualMetricList = Lists.newArrayList(); addMetrics( @@ -113,6 +116,11 @@ public void validate() throws Exception { remoteServiceNames, expectedMetricList, actualMetricList); + addMetrics( + CloudWatchService.REMOTE_TARGET_DIMENSION, + remoteTargetNames, + expectedMetricList, + actualMetricList); // remove the skip dimensions log.info("dimensions to be skipped in validation: {}", skippedDimensionNameList); diff --git a/validator/src/main/java/com/amazon/aoc/validators/ValidatorFactory.java b/validator/src/main/java/com/amazon/aoc/validators/ValidatorFactory.java index 56397cb28..ed648c78b 100644 --- a/validator/src/main/java/com/amazon/aoc/validators/ValidatorFactory.java +++ b/validator/src/main/java/com/amazon/aoc/validators/ValidatorFactory.java @@ -64,11 +64,11 @@ public IValidator launchValidator(ValidationConfig validationConfig) throws Exce case "http": caller = new HttpCaller(context.getEndpoint(), validationConfig.getHttpPath()); break; - case "http-with-body": + case "http-with-query": // ONLY ONE OF THESE CAN BE USED PER VALIDATOR CALL caller = new HttpCaller( - context.getEndpoint(), validationConfig.getHttpPath(), context.getRequestBody()); + context.getEndpoint(), validationConfig.getHttpPath(), context.getQueryString()); break; case "none": caller = null; diff --git a/validator/src/main/resources/expected-data-template/ec2/aws-sdk-call-metric.mustache b/validator/src/main/resources/expected-data-template/ec2/aws-sdk-call-metric.mustache index cd23971e9..773ae4503 100644 --- a/validator/src/main/resources/expected-data-template/ec2/aws-sdk-call-metric.mustache +++ b/validator/src/main/resources/expected-data-template/ec2/aws-sdk-call-metric.mustache @@ -95,7 +95,7 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Latency @@ -115,7 +115,35 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Latency + namespace: {{metricNamespace}} + dimensions: + - + name: Service + value: {{serviceName}} + - + name: HostedIn.Environment + value: EC2 + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Latency + namespace: {{metricNamespace}} + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Error @@ -214,7 +242,7 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Error @@ -234,7 +262,35 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Error + namespace: {{metricNamespace}} + dimensions: + - + name: Service + value: {{serviceName}} + - + name: HostedIn.Environment + value: EC2 + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Error + namespace: {{metricNamespace}} + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Fault @@ -333,7 +389,7 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Fault @@ -353,6 +409,33 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Fault + namespace: {{metricNamespace}} + dimensions: + - + name: Service + value: {{serviceName}} + - + name: HostedIn.Environment + value: EC2 + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} +- + metricName: Fault + namespace: {{metricNamespace}} + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} diff --git a/validator/src/main/resources/expected-data-template/ec2/remote-service-trace.mustache b/validator/src/main/resources/expected-data-template/ec2/remote-service-trace.mustache index 1004ddfaf..ce0215fc6 100644 --- a/validator/src/main/resources/expected-data-template/ec2/remote-service-trace.mustache +++ b/validator/src/main/resources/expected-data-template/ec2/remote-service-trace.mustache @@ -2,7 +2,7 @@ "name": "^{{serviceName}}$", "http": { "request": { - "url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})/$", + "url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})$", "method": "^GET$" }, "response": { diff --git a/validator/src/main/resources/expected-data-template/eks/aws-sdk-call-metric.mustache b/validator/src/main/resources/expected-data-template/eks/aws-sdk-call-metric.mustache index cca870991..c9f739d1e 100644 --- a/validator/src/main/resources/expected-data-template/eks/aws-sdk-call-metric.mustache +++ b/validator/src/main/resources/expected-data-template/eks/aws-sdk-call-metric.mustache @@ -113,7 +113,7 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Latency @@ -136,7 +136,38 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Latency + namespace: {{metricNamespace}} + dimensions: + - + name: Service + value: {{serviceName}} + - + name: HostedIn.EKS.Cluster + value: {{platformInfo}} + - + name: HostedIn.K8s.Namespace + value: {{appNamespace}} + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Latency + namespace: {{metricNamespace}} + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Error @@ -253,7 +284,7 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Error @@ -276,7 +307,38 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Error + namespace: {{metricNamespace}} + dimensions: + - + name: Service + value: {{serviceName}} + - + name: HostedIn.EKS.Cluster + value: {{platformInfo}} + - + name: HostedIn.K8s.Namespace + value: {{appNamespace}} + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Error + namespace: {{metricNamespace}} + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Fault @@ -393,7 +455,7 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Fault @@ -416,4 +478,35 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name \ No newline at end of file + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Fault + namespace: {{metricNamespace}} + dimensions: + - + name: Service + value: {{serviceName}} + - + name: HostedIn.EKS.Cluster + value: {{platformInfo}} + - + name: HostedIn.K8s.Namespace + value: {{appNamespace}} + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Fault + namespace: {{metricNamespace}} + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} diff --git a/validator/src/main/resources/expected-data-template/eks/remote-service-trace.mustache b/validator/src/main/resources/expected-data-template/eks/remote-service-trace.mustache index 5afd70018..63ee506f7 100644 --- a/validator/src/main/resources/expected-data-template/eks/remote-service-trace.mustache +++ b/validator/src/main/resources/expected-data-template/eks/remote-service-trace.mustache @@ -2,7 +2,7 @@ "name": "^{{serviceName}}$", "http": { "request": { - "url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})/$", + "url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})$", "method": "^GET$" }, "response": { diff --git a/validator/src/main/resources/expected-data-template/k8s/remote-service-trace.mustache b/validator/src/main/resources/expected-data-template/k8s/remote-service-trace.mustache index bb1a841e6..fe7511130 100644 --- a/validator/src/main/resources/expected-data-template/k8s/remote-service-trace.mustache +++ b/validator/src/main/resources/expected-data-template/k8s/remote-service-trace.mustache @@ -2,7 +2,7 @@ "name": "^{{serviceName}}$", "http": { "request": { - "url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})/$", + "url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})$", "method": "^GET$" }, "response": { diff --git a/validator/src/main/resources/expected-data-template/python/ec2/aws-sdk-call-metric.mustache b/validator/src/main/resources/expected-data-template/python/ec2/aws-sdk-call-metric.mustache index 65586b715..fc5a43bd3 100644 --- a/validator/src/main/resources/expected-data-template/python/ec2/aws-sdk-call-metric.mustache +++ b/validator/src/main/resources/expected-data-template/python/ec2/aws-sdk-call-metric.mustache @@ -95,7 +95,7 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Latency @@ -115,7 +115,35 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Latency + namespace: {{metricNamespace}} + dimensions: + - + name: Service + value: {{serviceName}} + - + name: HostedIn.Environment + value: EC2 + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Latency + namespace: {{metricNamespace}} + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Error @@ -214,7 +242,7 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Error @@ -234,7 +262,35 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Error + namespace: {{metricNamespace}} + dimensions: + - + name: Service + value: {{serviceName}} + - + name: HostedIn.Environment + value: EC2 + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Error + namespace: {{metricNamespace}} + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Fault @@ -333,7 +389,7 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Fault @@ -353,6 +409,33 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Fault + namespace: {{metricNamespace}} + dimensions: + - + name: Service + value: {{serviceName}} + - + name: HostedIn.Environment + value: EC2 + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} +- + metricName: Fault + namespace: {{metricNamespace}} + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} diff --git a/validator/src/main/resources/expected-data-template/python/ec2/remote-service-trace.mustache b/validator/src/main/resources/expected-data-template/python/ec2/remote-service-trace.mustache index 45bc4f92e..f22833424 100644 --- a/validator/src/main/resources/expected-data-template/python/ec2/remote-service-trace.mustache +++ b/validator/src/main/resources/expected-data-template/python/ec2/remote-service-trace.mustache @@ -2,7 +2,7 @@ "name": "^{{serviceName}}$", "http": { "request": { - "url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})/$", + "url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})$", "method": "^GET$" }, "response": { diff --git a/validator/src/main/resources/expected-data-template/python/eks/aws-sdk-call-metric.mustache b/validator/src/main/resources/expected-data-template/python/eks/aws-sdk-call-metric.mustache index b30ff3294..501adfcff 100644 --- a/validator/src/main/resources/expected-data-template/python/eks/aws-sdk-call-metric.mustache +++ b/validator/src/main/resources/expected-data-template/python/eks/aws-sdk-call-metric.mustache @@ -113,7 +113,7 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Latency @@ -136,7 +136,38 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Latency + namespace: {{metricNamespace}} + dimensions: + - + name: Service + value: {{serviceName}} + - + name: HostedIn.EKS.Cluster + value: {{platformInfo}} + - + name: HostedIn.K8s.Namespace + value: {{appNamespace}} + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Latency + namespace: {{metricNamespace}} + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Error @@ -253,7 +284,7 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Error @@ -276,7 +307,38 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Error + namespace: {{metricNamespace}} + dimensions: + - + name: Service + value: {{serviceName}} + - + name: HostedIn.EKS.Cluster + value: {{platformInfo}} + - + name: HostedIn.K8s.Namespace + value: {{appNamespace}} + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Error + namespace: {{metricNamespace}} + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Fault @@ -393,7 +455,7 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name + value: ::s3:::e2e-test-bucket-name-{{testingId}} - metricName: Fault @@ -416,4 +478,35 @@ value: AWS.SDK.S3 - name: RemoteTarget - value: ::s3:::e2e-test-bucket-name \ No newline at end of file + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Fault + namespace: {{metricNamespace}} + dimensions: + - + name: Service + value: {{serviceName}} + - + name: HostedIn.EKS.Cluster + value: {{platformInfo}} + - + name: HostedIn.K8s.Namespace + value: {{appNamespace}} + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} + +- + metricName: Fault + namespace: {{metricNamespace}} + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-{{testingId}} diff --git a/validator/src/main/resources/expected-data-template/python/eks/remote-service-trace.mustache b/validator/src/main/resources/expected-data-template/python/eks/remote-service-trace.mustache index f35e45904..cf4d2c3df 100644 --- a/validator/src/main/resources/expected-data-template/python/eks/remote-service-trace.mustache +++ b/validator/src/main/resources/expected-data-template/python/eks/remote-service-trace.mustache @@ -2,7 +2,7 @@ "name": "^{{serviceName}}$", "http": { "request": { - "url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})/$", + "url": "^{{endpoint}}/remote-service\\?ip=(([0-9]{1,3}.){3}[0-9]{1,3})$", "method": "^GET$" }, "response": { diff --git a/validator/src/main/resources/validations/ec2/log-validation.yml b/validator/src/main/resources/validations/ec2/log-validation.yml index 8770ee8fa..ad6a3c458 100644 --- a/validator/src/main/resources/validations/ec2/log-validation.yml +++ b/validator/src/main/resources/validations/ec2/log-validation.yml @@ -14,7 +14,7 @@ validationType: "cw-log" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedLogStructureTemplate: "EC2_REMOTE_SERVICE_LOG" - validationType: "cw-log" diff --git a/validator/src/main/resources/validations/ec2/metric-validation.yml b/validator/src/main/resources/validations/ec2/metric-validation.yml index 98f1595ad..1bdfea16e 100644 --- a/validator/src/main/resources/validations/ec2/metric-validation.yml +++ b/validator/src/main/resources/validations/ec2/metric-validation.yml @@ -8,13 +8,13 @@ validationType: "cw-metric" httpPath: "/aws-sdk-call" httpMethod: "get" - callingType: "http" + callingType: "http-with-query" expectedMetricTemplate: "EC2_AWS_SDK_CALL_METRIC" - validationType: "cw-metric" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedMetricTemplate: "EC2_REMOTE_SERVICE_METRIC" - validationType: "cw-metric" diff --git a/validator/src/main/resources/validations/ec2/trace-validation.yml b/validator/src/main/resources/validations/ec2/trace-validation.yml index 2486b5c3c..85b986a0d 100644 --- a/validator/src/main/resources/validations/ec2/trace-validation.yml +++ b/validator/src/main/resources/validations/ec2/trace-validation.yml @@ -14,7 +14,7 @@ validationType: "trace" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedTraceTemplate: "EC2_REMOTE_SERVICE_TRACE" - validationType: "trace" diff --git a/validator/src/main/resources/validations/eks/log-validation.yml b/validator/src/main/resources/validations/eks/log-validation.yml index 427ed0adb..6d6edcb93 100644 --- a/validator/src/main/resources/validations/eks/log-validation.yml +++ b/validator/src/main/resources/validations/eks/log-validation.yml @@ -14,7 +14,7 @@ validationType: "cw-log" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedLogStructureTemplate: "EKS_REMOTE_SERVICE_LOG" - validationType: "cw-log" diff --git a/validator/src/main/resources/validations/eks/metric-validation.yml b/validator/src/main/resources/validations/eks/metric-validation.yml index dde79819c..66090c27f 100644 --- a/validator/src/main/resources/validations/eks/metric-validation.yml +++ b/validator/src/main/resources/validations/eks/metric-validation.yml @@ -8,13 +8,13 @@ validationType: "cw-metric" httpPath: "/aws-sdk-call" httpMethod: "get" - callingType: "http" + callingType: "http-with-query" expectedMetricTemplate: "EKS_AWS_SDK_CALL_METRIC" - validationType: "cw-metric" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedMetricTemplate: "EKS_REMOTE_SERVICE_METRIC" - validationType: "cw-metric" diff --git a/validator/src/main/resources/validations/eks/trace-validation.yml b/validator/src/main/resources/validations/eks/trace-validation.yml index 160b711ec..de28b66bd 100644 --- a/validator/src/main/resources/validations/eks/trace-validation.yml +++ b/validator/src/main/resources/validations/eks/trace-validation.yml @@ -14,7 +14,7 @@ validationType: "trace" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedTraceTemplate: "EKS_REMOTE_SERVICE_TRACE" - validationType: "trace" diff --git a/validator/src/main/resources/validations/k8s/log-validation.yml b/validator/src/main/resources/validations/k8s/log-validation.yml index c031c6a19..e7e209cba 100644 --- a/validator/src/main/resources/validations/k8s/log-validation.yml +++ b/validator/src/main/resources/validations/k8s/log-validation.yml @@ -14,7 +14,7 @@ validationType: "cw-log" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedLogStructureTemplate: "K8S_REMOTE_SERVICE_LOG" - validationType: "cw-log" diff --git a/validator/src/main/resources/validations/k8s/metric-validation.yml b/validator/src/main/resources/validations/k8s/metric-validation.yml index 32910540a..0053253e0 100644 --- a/validator/src/main/resources/validations/k8s/metric-validation.yml +++ b/validator/src/main/resources/validations/k8s/metric-validation.yml @@ -14,7 +14,7 @@ validationType: "cw-metric" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedMetricTemplate: "K8S_REMOTE_SERVICE_METRIC" - validationType: "cw-metric" diff --git a/validator/src/main/resources/validations/k8s/trace-validation.yml b/validator/src/main/resources/validations/k8s/trace-validation.yml index db86731e7..3646d461f 100644 --- a/validator/src/main/resources/validations/k8s/trace-validation.yml +++ b/validator/src/main/resources/validations/k8s/trace-validation.yml @@ -14,7 +14,7 @@ validationType: "trace" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedTraceTemplate: "K8S_REMOTE_SERVICE_TRACE" - validationType: "trace" diff --git a/validator/src/main/resources/validations/python/ec2/log-validation.yml b/validator/src/main/resources/validations/python/ec2/log-validation.yml index d44860bd5..02ced2003 100644 --- a/validator/src/main/resources/validations/python/ec2/log-validation.yml +++ b/validator/src/main/resources/validations/python/ec2/log-validation.yml @@ -14,7 +14,7 @@ validationType: "cw-log" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedLogStructureTemplate: "PYTHON_EC2_REMOTE_SERVICE_LOG" - validationType: "cw-log" diff --git a/validator/src/main/resources/validations/python/ec2/metric-validation.yml b/validator/src/main/resources/validations/python/ec2/metric-validation.yml index 56b234b32..be29b6ee9 100644 --- a/validator/src/main/resources/validations/python/ec2/metric-validation.yml +++ b/validator/src/main/resources/validations/python/ec2/metric-validation.yml @@ -8,13 +8,13 @@ validationType: "cw-metric" httpPath: "/aws-sdk-call" httpMethod: "get" - callingType: "http" + callingType: "http-with-query" expectedMetricTemplate: "PYTHON_EC2_AWS_SDK_CALL_METRIC" - validationType: "cw-metric" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedMetricTemplate: "PYTHON_EC2_REMOTE_SERVICE_METRIC" - validationType: "cw-metric" diff --git a/validator/src/main/resources/validations/python/ec2/trace-validation.yml b/validator/src/main/resources/validations/python/ec2/trace-validation.yml index 03a13ecd1..b9d3496d1 100644 --- a/validator/src/main/resources/validations/python/ec2/trace-validation.yml +++ b/validator/src/main/resources/validations/python/ec2/trace-validation.yml @@ -14,7 +14,7 @@ validationType: "trace" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedTraceTemplate: "PYTHON_EC2_REMOTE_SERVICE_TRACE" - validationType: "trace" diff --git a/validator/src/main/resources/validations/python/eks/log-validation.yml b/validator/src/main/resources/validations/python/eks/log-validation.yml index 5ef19a108..5296a7075 100644 --- a/validator/src/main/resources/validations/python/eks/log-validation.yml +++ b/validator/src/main/resources/validations/python/eks/log-validation.yml @@ -14,7 +14,7 @@ validationType: "cw-log" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedLogStructureTemplate: "PYTHON_EKS_REMOTE_SERVICE_LOG" - validationType: "cw-log" diff --git a/validator/src/main/resources/validations/python/eks/metric-validation.yml b/validator/src/main/resources/validations/python/eks/metric-validation.yml index 4778326d3..80093158f 100644 --- a/validator/src/main/resources/validations/python/eks/metric-validation.yml +++ b/validator/src/main/resources/validations/python/eks/metric-validation.yml @@ -8,13 +8,13 @@ validationType: "cw-metric" httpPath: "/aws-sdk-call" httpMethod: "get" - callingType: "http" + callingType: "http-with-query" expectedMetricTemplate: "PYTHON_EKS_AWS_SDK_CALL_METRIC" - validationType: "cw-metric" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedMetricTemplate: "PYTHON_EKS_REMOTE_SERVICE_METRIC" - validationType: "cw-metric" diff --git a/validator/src/main/resources/validations/python/eks/trace-validation.yml b/validator/src/main/resources/validations/python/eks/trace-validation.yml index b3e1fcbd9..4a10fe814 100644 --- a/validator/src/main/resources/validations/python/eks/trace-validation.yml +++ b/validator/src/main/resources/validations/python/eks/trace-validation.yml @@ -14,7 +14,7 @@ validationType: "trace" httpPath: "/remote-service" httpMethod: "get" - callingType: "http-with-body" + callingType: "http-with-query" expectedTraceTemplate: "PYTHON_EKS_REMOTE_SERVICE_TRACE" - validationType: "trace" diff --git a/validator/src/test/java/com/amazon/aoc/validators/CWMetricValidatorTest.java b/validator/src/test/java/com/amazon/aoc/validators/CWMetricValidatorTest.java index 2e750c703..ab8a30b71 100644 --- a/validator/src/test/java/com/amazon/aoc/validators/CWMetricValidatorTest.java +++ b/validator/src/test/java/com/amazon/aoc/validators/CWMetricValidatorTest.java @@ -45,11 +45,13 @@ public class CWMetricValidatorTest { private CWMetricHelper cwMetricHelper = new CWMetricHelper(); private static final String SERVICE_DIMENSION = "Service"; private static final String REMOTE_SERVICE_DIMENSION = "RemoteService"; + private static final String REMOTE_TARGET_DIMENSION = "RemoteTarget"; private static final String TEMPLATE_ROOT = "file://" + System.getProperty("user.dir") + "/src/test/test-resources/"; private static final String SERVICE_NAME = "serviceName"; private static final String REMOTE_SERVICE_NAME = "remoteServiceName"; private static final String REMOTE_SERVICE_DEPLOYMENT_NAME = "remoteServiceDeploymentName"; + private static final String TESTING_ID = "testIdentifier"; private Context context; private HttpCaller httpCaller; @@ -97,6 +99,7 @@ public void testValidateEndToEnd_Success() throws Exception { List remoteMetricsWithRemoteApp = getTestMetrics("endToEnd_remoteMetricsWithRemoteApp"); List remoteMetricsWithAmazon = getTestMetrics("endToEnd_remoteMetricsWithAmazon"); List remoteMetricsWithAwsSdk = getTestMetrics("endToEnd_remoteMetricsWithAwsSdk"); + List remoteMetricsWithS3Target = getTestMetrics("endToEnd_remoteMetricsWithS3Target"); CloudWatchService cloudWatchService = mockCloudWatchService( @@ -104,7 +107,8 @@ public void testValidateEndToEnd_Success() throws Exception { remoteServiceMetrics, remoteMetricsWithRemoteApp, remoteMetricsWithAmazon, - remoteMetricsWithAwsSdk); + remoteMetricsWithAwsSdk, + remoteMetricsWithS3Target); validate(validationConfig, cloudWatchService); } @@ -120,6 +124,8 @@ public void testValidateEndToEnd_MissingRemoteService() throws Exception { List remoteMetricsWithRemoteApp = Lists.newArrayList(); List remoteMetricsWithAmazon = getTestMetrics("endToEnd_remoteMetricsWithAmazon"); List remoteMetricsWithAwsSdk = getTestMetrics("endToEnd_remoteMetricsWithAwsSdk"); + List remoteMetricsWithAwsSdkWithTarget = + getTestMetrics("endToEnd_remoteMetricsWithAwsSdk"); CloudWatchService cloudWatchService = mockCloudWatchService( @@ -127,7 +133,8 @@ public void testValidateEndToEnd_MissingRemoteService() throws Exception { remoteServiceMetrics, remoteMetricsWithRemoteApp, remoteMetricsWithAmazon, - remoteMetricsWithAwsSdk); + remoteMetricsWithAwsSdk, + remoteMetricsWithAwsSdkWithTarget); try { validate(validationConfig, cloudWatchService); @@ -153,6 +160,7 @@ private Context initContext() { context.setServiceName(SERVICE_NAME); context.setRemoteServiceName(REMOTE_SERVICE_NAME); context.setRemoteServiceDeploymentName(REMOTE_SERVICE_DEPLOYMENT_NAME); + context.setTestingId(TESTING_ID); return context; } @@ -175,7 +183,8 @@ private CloudWatchService mockCloudWatchService( List remoteServiceMetrics, List remoteMetricsWithRemoteApp, List remoteMetricsWithAmazon, - List remoteMetricsWithAwsSdk) { + List remoteMetricsWithAwsSdk, + List remoteMetricsWithS3Target) { CloudWatchService cloudWatchService = mock(CloudWatchService.class); when(cloudWatchService.listMetrics(any(), any(), eq(SERVICE_DIMENSION), eq(SERVICE_NAME))) .thenReturn(localServiceMetrics); @@ -191,6 +200,9 @@ private CloudWatchService mockCloudWatchService( when(cloudWatchService.listMetrics( any(), any(), eq(REMOTE_SERVICE_DIMENSION), eq("AWS.SDK.S3"))) .thenReturn(remoteMetricsWithAwsSdk); + when(cloudWatchService.listMetrics( + any(), any(), eq(REMOTE_TARGET_DIMENSION), eq("::s3:::e2e-test-bucket-name-" + context.getTestingId()))) + .thenReturn(remoteMetricsWithS3Target); return cloudWatchService; } diff --git a/validator/src/test/test-resources/endToEnd_expectedMetrics.mustache b/validator/src/test/test-resources/endToEnd_expectedMetrics.mustache index 331d6620c..ec102ddf5 100644 --- a/validator/src/test/test-resources/endToEnd_expectedMetrics.mustache +++ b/validator/src/test/test-resources/endToEnd_expectedMetrics.mustache @@ -84,4 +84,14 @@ dimensions: - name: RemoteService - value: remoteServiceDeploymentName \ No newline at end of file + value: remoteServiceDeploymentName +- + metricName: metricName + namespace: metricNamespace + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-testIdentifier \ No newline at end of file diff --git a/validator/src/test/test-resources/endToEnd_remoteMetricsWithS3Target.mustache b/validator/src/test/test-resources/endToEnd_remoteMetricsWithS3Target.mustache new file mode 100644 index 000000000..6856e79e8 --- /dev/null +++ b/validator/src/test/test-resources/endToEnd_remoteMetricsWithS3Target.mustache @@ -0,0 +1,10 @@ +- + metricName: metricName + namespace: metricNamespace + dimensions: + - + name: RemoteService + value: AWS.SDK.S3 + - + name: RemoteTarget + value: ::s3:::e2e-test-bucket-name-testIdentifier \ No newline at end of file