|
| 1 | +name: Release ADOT OTLP UDP Exporter |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + inputs: |
| 5 | + version: |
| 6 | + description: The version to tag the release with, e.g., 1.2.0 |
| 7 | + required: true |
| 8 | + |
| 9 | +env: |
| 10 | + RUBY_VERSION: "3.2" |
| 11 | + |
| 12 | +jobs: |
| 13 | + build: |
| 14 | + environment: Release |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - name: Checkout Contrib Repo @ SHA - ${{ github.sha }} |
| 18 | + uses: actions/checkout@v4 |
| 19 | + |
| 20 | + # Install ruby and bundle dependencies and cache! |
| 21 | + - name: Install Ruby ${{ env.RUBY_VERSION }} with dependencies |
| 22 | + uses: ruby/setup-ruby@v1.221.0 |
| 23 | + with: |
| 24 | + ruby-version: "${{ env.RUBY_VERSION }}" |
| 25 | + working-directory: "exporter/otlp-udp" |
| 26 | + bundler: "latest" |
| 27 | + bundler-cache: true |
| 28 | + cache-version: "v1-ruby-otlp-udp" |
| 29 | + |
| 30 | + - name: Run Unit Tests |
| 31 | + run: | |
| 32 | + cd exporter/otlp-udp |
| 33 | + bundle install |
| 34 | + bundle exec rake test |
| 35 | +
|
| 36 | + - name: Download and run X-Ray Daemon |
| 37 | + run: | |
| 38 | + mkdir xray-daemon |
| 39 | + cd xray-daemon |
| 40 | + wget https://s3.us-west-2.amazonaws.com/aws-xray-assets.us-west-2/xray-daemon/aws-xray-daemon-linux-3.x.zip |
| 41 | + unzip aws-xray-daemon-linux-3.x.zip |
| 42 | + ./xray -o -n us-west-2 -f ./daemon-logs.log --log-level debug & |
| 43 | +
|
| 44 | + - name: Setup Sample App |
| 45 | + run: | |
| 46 | + cd sample-apps/integ-test-http-server/ruby-on-rails |
| 47 | + bundle install |
| 48 | +
|
| 49 | + - name: Run Sample App in Background |
| 50 | + run: | |
| 51 | + cd sample-apps/integ-test-http-server/ruby-on-rails |
| 52 | + LISTEN_ADDRESS=127.0.0.1:8080 rails server & |
| 53 | + # Wait for test server to initialize |
| 54 | + sleep 5 |
| 55 | +
|
| 56 | + - name: Call Sample App Endpoint |
| 57 | + id: call-endpoint |
| 58 | + run: | |
| 59 | + echo "traceId=$(curl localhost:8080/test)" >> $GITHUB_OUTPUT |
| 60 | +
|
| 61 | + - name: Verify X-Ray daemon received traces |
| 62 | + run: | |
| 63 | + sleep 10 |
| 64 | + echo "X-Ray daemon logs:" |
| 65 | + cat xray-daemon/daemon-logs.log |
| 66 | + # Check if the daemon received and processed some data |
| 67 | + if grep -q "sending.*batch" xray-daemon/daemon-logs.log; then |
| 68 | + echo "✅ X-Ray daemon processed trace data (AWS upload errors are expected)" |
| 69 | + exit 0 |
| 70 | + elif grep -q "processor:.*segment" xray-daemon/daemon-logs.log; then |
| 71 | + echo "✅ X-Ray daemon processed segment data (AWS upload errors are expected)" |
| 72 | + exit 0 |
| 73 | + else |
| 74 | + echo "❌ No evidence of traces being received by X-Ray daemon" |
| 75 | + exit 1 |
| 76 | + fi |
| 77 | +
|
| 78 | + # TODO: Publish OTLP UDP Exporter to RubyGems |
0 commit comments