Skip to content

Commit 965a5ae

Browse files
authored
Publish metric on distribution availability
Publish metric on distribution availability
1 parent f5f41fb commit 965a5ae

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/continuous-monitoring.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,29 @@ jobs:
1111
steps:
1212
- name: Checkout Repository
1313
uses: actions/checkout@v2
14+
15+
- name: Configure AWS Credentials
16+
uses: aws-actions/configure-aws-credentials@v1
17+
with:
18+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
19+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
20+
aws-region: us-east-1
21+
1422
- uses: actions/setup-python@v2
1523
with:
1624
python-version: '3.x'
25+
1726
- run: pip install tox
27+
1828
- name: Run smoke tests
29+
id: distribution-availability
1930
run: tox -c tox-distributioncheck.ini
31+
32+
- name: Publish metric on X-Ray Go SDK distribution availability
33+
if: ${{ always() }}
34+
run: |
35+
if [[ "${{ steps.distribution-availability.outcome }}" == "failure" ]]; then
36+
aws cloudwatch put-metric-data --metric-name XRayPythonSDKDistributionAvailability --dimensions failure=rate --namespace MonitorSDK --value 1 --timestamp $(date +%s)
37+
else
38+
aws cloudwatch put-metric-data --metric-name XRayPythonSDKDistributionAvailability --dimensions failure=rate --namespace MonitorSDK --value 0 --timestamp $(date +%s)
39+
fi

0 commit comments

Comments
 (0)