@@ -22,93 +22,62 @@ jobs:
2222 - name : Install dependencies
2323 run : |
2424 python -m pip install --upgrade pip
25- pip install hatch pytest
25+ pip install hatch pytest flask
2626
2727 - name : Build package
2828 working-directory : exporters/aws-otel-otlp-udp-exporter
2929 run : hatch build
3030
31- - name : Setup X-Ray daemon
31+ - name : Download and run X-Ray Daemon
3232 run : |
33- # Download X-Ray daemon
34- wget https://s3.us-east-2.amazonaws.com/aws-xray-assets.us-east-2/xray-daemon/aws-xray-daemon-linux-3.x.zip
35- unzip -o aws-xray-daemon-linux-3.x.zip
36-
37- # Create config file
38- echo '{
39- "Version": 2,
40- "TotalBufferSizeMB": 10,
41- "Logging": {
42- "LogLevel": "debug"
43- },
44- }' > xray-daemon-config.json
33+ mkdir xray-daemon
34+ cd xray-daemon
35+ wget https://s3.us-west-2.amazonaws.com/aws-xray-assets.us-west-2/xray-daemon/aws-xray-daemon-linux-3.x.zip
36+ unzip aws-xray-daemon-linux-3.x.zip
37+ ./xray -o -n us-west-2 -f ./daemon-logs.log --log-level debug &
4538
46- # Make sure xray is executable
47- chmod +x ./xray
48-
49- # Create logs directory
50- mkdir -p daemon-logs
51-
52- # Start X-Ray daemon
53- ./xray -o -n us-west-2 -c xray-daemon-config.json > daemon-logs/xray-daemon.log 2>&1 &
54- XRAY_PID=$!
55- echo "X-Ray daemon started with PID $XRAY_PID"
56-
57- # Wait for daemon to be ready
58- echo "Waiting for X-Ray daemon to start..."
39+ - name : Install UDP Exporter
40+ run : |
41+ pip install ./exporters/aws-otel-otlp-udp-exporter/dist/*.whl
42+
43+ - name : Ensure Unit Tests are passing
44+ run : |
45+ pytest exporters/aws-otel-otlp-udp-exporter/tests/test_exporter.py
46+
47+ - name : Run Sample App in Background
48+ working-directory : sample-applications/integ-test-app
49+ run : |
50+ # Start validation app
51+ python udp_exporter_validation_app.py &
52+ # Wait for validation app to initialize
5953 sleep 5
60-
61- # Check if process is still running
62- if ps -p $XRAY_PID > /dev/null; then
63- echo "✅ X-Ray daemon process is running"
64- else
65- echo "❌ X-Ray daemon process is not running"
66- echo "Log contents:"
67- cat daemon-logs/xray-daemon.log
68- exit 1
69- fi
70-
71- # Try to connect to the daemon
72- if nc -zv 127.0.0.1 2000 2>&1; then
73- echo "✅ Successfully connected to X-Ray daemon on port 2000"
74- else
75- echo "❌ Cannot connect to X-Ray daemon on port 2000"
76- echo "Log contents:"
77- cat daemon-logs/xray-daemon.log
78- exit 1
79- fi
80-
81- # Extra verification with curl (might not work depending on daemon setup)
82- if curl -s http://localhost:2000/GetDaemonVersion; then
83- echo "✅ X-Ray daemon API responded"
84- else
85- echo "ℹ️ X-Ray daemon doesn't support API or not ready yet"
86- # Don't exit with error as this might not be reliable
87- fi
88-
89- echo "X-Ray daemon setup completed"
9054
91- - name : Setup validation app
55+ - name : Call Sample App Endpoint
9256 run : |
93- pip install ./exporters/aws-otel-otlp-udp-exporter/dist/*.whl
57+ # Trigger trace generation
58+ echo "traceId=$(curl localhost:8080/test)" >> $GITHUB_OUTPUT
59+ echo $traceId
9460
95- - name : Run validation test
96- working-directory : exporters/aws-otel-otlp-udp-exporter/validation-app
97- run : python app.py
61+ - name : Print Daemon Logs
62+ run : |
63+ sleep 20
64+ cat xray-daemon/daemon-logs.log
9865
9966 - name : Verify X-Ray daemon received traces
10067 run : |
10168 echo "X-Ray daemon logs:"
102- cat daemon-logs/ xray-daemon.log
69+ cat xray-daemon/daemon-logs .log
10370
10471 # Check if the daemon received and processed some data
105- if grep -q "sending.*batch" daemon-logs/ xray-daemon.log; then
72+ if grep -q "sending.*batch" xray-daemon/daemon-logs .log; then
10673 echo "✅ X-Ray daemon processed trace data (AWS upload errors are expected)"
10774 exit 0
108- elif grep -q "processor:.*segment" daemon-logs/ xray-daemon.log; then
75+ elif grep -q "processor:.*segment" xray-daemon/daemon-logs .log; then
10976 echo "✅ X-Ray daemon processed segment data (AWS upload errors are expected)"
11077 exit 0
11178 else
11279 echo "❌ No evidence of traces being received by X-Ray daemon"
11380 exit 1
11481 fi
82+
83+ # TODO: Steps to publish to PyPI
0 commit comments