Skip to content

Commit

Permalink
Merge pull request aws-observability#56 from aws-observability/fix-me…
Browse files Browse the repository at this point in the history
…tric-limiter

Remove amazon-cloudwatch delete and call APIs before remote sample app
  • Loading branch information
harrryr authored Apr 29, 2024
2 parents e95f62d + 9e28f57 commit 379730b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/appsignals-e2e-metric-limiter-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ jobs:
--region ${{ inputs.aws-region }} \
--configuration-values '{"agent":{"config":{"logs":{"metrics_collected":{"app_signals":{"limiter":{"drop_threshold":2}}}}}}}'
execute_and_retry 2 "kubectl delete pods --all -n amazon-cloudwatch"
execute_and_retry 2 "kubectl wait --for=condition=Ready pod --all -n amazon-cloudwatch"
execute_and_retry 2 "kubectl delete pods --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" "" 60
execute_and_retry 2 "kubectl wait --for=condition=Ready --request-timeout '5m' pod --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" "" 10
Expand All @@ -192,6 +190,14 @@ jobs:
sleep 10
done
# Need to call some APIs so that it exceeds the metric limiter threshold and make the test
# APIs generate AllOtherOperations metric. Sleep for a minute to let cloudwatch service process the API call
# Calling it here before calling the remote sample app endpoint because the API generated by it is validated
# for AllOtherRemoteOperations in the metric validation step
curl -S -s $(echo "$main_sample_app_endpoint" | tr -d '"'); echo
curl -S -s $(echo "$main_sample_app_endpoint" | tr -d '"')/fake-endpoint; echo
sleep 60
echo "Attempting to connect to the remote sample app endpoint"
remote_sample_app_endpoint=http://$(terraform output sample_remote_app_endpoint)/healthcheck
echo $remote_sample_app_endpoint
Expand Down Expand Up @@ -263,15 +269,6 @@ jobs:
run: echo "APP_ENDPOINT=$(terraform output sample_app_endpoint)" >> $GITHUB_ENV
working-directory: terraform/eks

# Need to call some APIs so that it exceeds the metric limiter threshold and make the test
# APIs generate AllOtherOperations metric. Sleep for a minute to let cloudwatch service process the API call
- name: Call healthcheck and error API to meet the metric limiter threshold
continue-on-error: true
run: |
curl -S -s http://${{ env.APP_ENDPOINT }}/; echo
curl -S -s http://${{ env.APP_ENDPOINT }}/fake-endpoint; echo
sleep 60
# This steps increases the speed of the validation by creating the telemetry data in advance
- name: Call all test APIs
continue-on-error: true
Expand Down

0 comments on commit 379730b

Please sign in to comment.