clean up validation app workflow and move lambda env check #31
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build, Test, and Publish ADOT OTLP UDP Exporter | |
| on: | |
| push: | |
| branches: | |
| - "udp-*" | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version number for deployment e.g. 0.1.0' | |
| required: true | |
| type: string | |
| jobs: | |
| build-test-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install hatch pytest flask | |
| - name: Build package | |
| working-directory: exporters/aws-otel-otlp-udp-exporter | |
| run: hatch build | |
| - name: Download and run X-Ray Daemon | |
| run: | | |
| mkdir xray-daemon | |
| cd xray-daemon | |
| wget https://s3.us-west-2.amazonaws.com/aws-xray-assets.us-west-2/xray-daemon/aws-xray-daemon-linux-3.x.zip | |
| unzip aws-xray-daemon-linux-3.x.zip | |
| ./xray -o -n us-west-2 -f ./daemon-logs.log --log-level debug & | |
| - name: Install UDP Exporter | |
| run: | | |
| pip install ./exporters/aws-otel-otlp-udp-exporter/dist/*.whl | |
| - name: Ensure Unit Tests are passing | |
| run: | | |
| pytest exporters/aws-otel-otlp-udp-exporter/tests/test_exporter.py | |
| - name: Run Sample App in Background | |
| working-directory: sample-applications/integ-test-app | |
| run: | | |
| # Start validation app | |
| python udp_exporter_validation_app.py & | |
| # Wait for validation app to initialize | |
| sleep 5 | |
| - name: Call Sample App Endpoint | |
| run: | | |
| # Trigger trace generation | |
| echo "traceId=$(curl localhost:8080/test)" >> $GITHUB_OUTPUT | |
| echo $traceId | |
| - name: Print Daemon Logs | |
| run: | | |
| sleep 20 | |
| cat xray-daemon/daemon-logs.log | |
| - name: Verify X-Ray daemon received traces | |
| run: | | |
| echo "X-Ray daemon logs:" | |
| cat xray-daemon/daemon-logs.log | |
| # Check if the daemon received and processed some data | |
| if grep -q "sending.*batch" xray-daemon/daemon-logs.log; then | |
| echo "✅ X-Ray daemon processed trace data (AWS upload errors are expected)" | |
| exit 0 | |
| elif grep -q "processor:.*segment" xray-daemon/daemon-logs.log; then | |
| echo "✅ X-Ray daemon processed segment data (AWS upload errors are expected)" | |
| exit 0 | |
| else | |
| echo "❌ No evidence of traces being received by X-Ray daemon" | |
| exit 1 | |
| fi | |
| # TODO: Steps to publish to PyPI |