Skip to content

Commit 5f55fda

Browse files
authored
Release workflow for UDP Exporter (#143)
* add sample app and release workflow for udp exporter * remove unneeded files
1 parent e3a1023 commit 5f55fda

File tree

17 files changed

+668
-0
lines changed

17 files changed

+668
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
source 'https://rubygems.org'
2+
git_source(:github) { |_repo| "https://github.com/#{repo}.git" }
3+
4+
ruby '~> 3.2.0'
5+
6+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
7+
gem 'rails', '~> 7.0.4.2'
8+
9+
# Use the Puma web server [https://github.com/puma/puma]
10+
gem 'puma', '~> 6.3'
11+
12+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
13+
gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
14+
15+
group :development do
16+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
17+
gem 'debug', platforms: %i[mri mingw x64_mingw]
18+
end
19+
20+
gem 'aws-sdk-s3', '~> 1'
21+
gem 'faraday'
22+
23+
gem 'opentelemetry-exporter-otlp', '>= 0.21.2'
24+
gem 'opentelemetry-sdk'
25+
26+
gem 'opentelemetry-propagator-xray'
27+
28+
gem 'opentelemetry-instrumentation-aws_sdk', '>= 0.2.1'
29+
gem 'opentelemetry-instrumentation-faraday'
30+
gem 'opentelemetry-instrumentation-rails'
31+
32+
# Test the current commit of `aws-opentelemetry-exporter-otlp-udp`
33+
gem 'aws-opentelemetry-exporter-otlp-udp', path: '../../../exporter/otlp-udp'
34+
35+
gem 'concurrent-ruby', '1.3.4'

0 commit comments

Comments
 (0)