pin cargo-audit version (#286) #14
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: Test ADOT X-Ray UDP Exporter | |
| on: | |
| workflow_call: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| id-token: write | |
| jobs: | |
| udp-exporter-e2e-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo @ SHA - ${{ github.sha }} | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Set up Node and run Unit Tests | |
| uses: ./.github/actions/set_up | |
| with: | |
| node_version: "20" | |
| package_name: "@aws/aws-distro-opentelemetry-exporter-xray-udp" | |
| os: ubuntu-latest | |
| run_unit_tests: true | |
| # Project dependencies and compilation are already done in the previous step | |
| - name: Install Dependencies, Compile, and Build Tarball | |
| id: staging_tarball_build | |
| run: | | |
| cd exporters/aws-distro-opentelemetry-exporter-xray-udp | |
| npm pack | |
| - name: Configure AWS credentials for Testing Tracing | |
| uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0 | |
| with: | |
| role-to-assume: ${{ secrets.XRAY_UDP_EXPORTER_TEST_ROLE }} | |
| aws-region: 'us-east-1' | |
| - name: Download and run X-Ray Daemon | |
| run: | | |
| mkdir xray-daemon | |
| cd xray-daemon | |
| wget https://s3.us-east-2.amazonaws.com/aws-xray-assets.us-east-2/xray-daemon/aws-xray-daemon-linux-3.x.zip | |
| unzip aws-xray-daemon-linux-3.x.zip | |
| ./xray -o -n us-east-2 -f ./daemon-logs.log --log-level debug & | |
| - name: Setup Sample App | |
| working-directory: sample-applications/udp-exporter-test-app | |
| run: | | |
| npm install ../../exporters/aws-distro-opentelemetry-exporter-xray-udp/aws-aws-distro-opentelemetry-exporter-xray-udp-*.tgz | |
| npm install | |
| node udp-exporter-test-server.js & | |
| # Wait for test server to initialize | |
| sleep 5 | |
| - name: Call Sample App Endpoint | |
| id: call-endpoint | |
| run: | | |
| echo "traceId=$(curl localhost:8080/test)" >> $GITHUB_OUTPUT | |
| - name: Check if traces are successfully sent to AWS X-Ray | |
| run: | | |
| sleep 20 | |
| # # Print Daemon Logs for debugging | |
| # cat xray-daemon/daemon-logs.log | |
| traceId=${{ steps.call-endpoint.outputs.traceId }} | |
| numTracesFound=$(aws xray batch-get-traces --trace-ids $traceId --region us-east-2 | jq '.Traces' | jq length) | |
| if [[ numTracesFound -ne "1" ]]; then | |
| echo "TraceId $traceId not found in X-Ray." | |
| exit 1 | |
| else | |
| echo "TraceId $traceId found in X-Ray." | |
| fi |