1- name : Release ADOT OTLP UDP Exporter
1+ name : Release ADOT X-Ray UDP Exporter
2+
23on :
34 workflow_dispatch :
45 inputs :
5- version :
6+ udp-exporter- version :
67 description : The version to tag the release with, e.g., 1.2.0
78 required : true
9+ type : string
10+
11+ permissions :
12+ id-token : write
13+ contents : write
814
915jobs :
16+ validate-udp-exporter-e2e-test :
17+ name : " Validate X-Ray UDP Exporter E2E Test Succeeds"
18+ uses : ./.github/workflows/udp-exporter-e2e-test.yml
19+ secrets : inherit
20+ permissions :
21+ id-token : write
22+
1023 build :
1124 environment : Release
1225 runs-on : ubuntu-latest
26+ needs : validate-udp-exporter-e2e-test
1327 steps :
1428 - name : Checkout Contrib Repo @ SHA - ${{ github.sha }}
1529 uses : actions/checkout@v4
1832 uses : ./.github/actions/set_up
1933 with :
2034 node_version : " 20"
21- package_name : " @aws/aws-otel-otlp-udp- exporter"
35+ package_name : " @aws/aws-distro-opentelemetry- exporter-xray-udp "
2236 os : ubuntu-latest
2337 run_unit_tests : true
2438
@@ -27,57 +41,33 @@ jobs:
2741 id : staging_tarball_build
2842 shell : bash
2943 run : |
30- cd exporters/aws-otel-otlp-udp- exporter
44+ cd exporters/aws-distro-opentelemetry- exporter-xray-udp
3145 npm pack
3246
33- - name : Download and run X-Ray Daemon
34- run : |
35- mkdir xray-daemon
36- cd xray-daemon
37- wget https://s3.us-west-2.amazonaws.com/aws-xray-assets.us-west-2/xray-daemon/aws-xray-daemon-linux-3.x.zip
38- unzip aws-xray-daemon-linux-3.x.zip
39- ./xray -o -n us-west-2 -f ./daemon-logs.log --log-level debug &
40-
41- - name : Setup Sample App
42- run : |
43- cd sample-applications/integ-test-http-server
44- npm install
45- npm install ../../exporters/aws-otel-otlp-udp-exporter/aws-aws-otel-otlp-udp-exporter-*.tgz
46-
47- - name : Run Sample App in Background
47+ - name : Validate project version matches workflow input
4848 run : |
49- cd sample-applications/integ-test-http-server
50- node udp-exporter-test-server.js &
51- # Wait for test server to initialize
52- sleep 5
53-
54- - name : Call Sample App Endpoint
55- id : call-endpoint
56- run : |
57- echo "traceId=$(curl localhost:8080/test)" >> $GITHUB_OUTPUT
58-
59- - name : Verify X-Ray daemon received traces
60- run : |
61- sleep 10
62- echo "X-Ray daemon logs:"
63- cat xray-daemon/daemon-logs.log
64- # Check if the daemon received and processed some data
65- if grep -q "sending.*batch" xray-daemon/daemon-logs.log; then
66- echo "✅ X-Ray daemon processed trace data (AWS upload errors are expected)"
67- exit 0
68- elif grep -q "processor:.*segment" xray-daemon/daemon-logs.log; then
69- echo "✅ X-Ray daemon processed segment data (AWS upload errors are expected)"
70- exit 0
71- else
72- echo "❌ No evidence of traces being received by X-Ray daemon"
49+ xrayUdpSpanExporterVersion=$(node -p "require('./exporters/aws-distro-opentelemetry-exporter-xray-udp/package.json').version")
50+ if [[ ! "$xrayUdpSpanExporterVersion" == "${{ inputs.udp-exporter-version }}" ]]; then
51+ echo "Input version '${{ inputs.udp-exporter-version }}' does not match with the UDP Exporter project version '$xrayUdpSpanExporterVersion'"
7352 exit 1
7453 fi
7554
76- # TODO: Uncomment when we make the first release
77- # # Publish OTLP UDP Exporter to npm
78- # - name: Publish to npm
79- # working-directory: exporters/aws-otel-otlp-udp-exporter
80- # env:
81- # NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
82- # NPM_CONFIG_PROVENANCE: true
83- # run: npx publish
55+ # Publish OTLP UDP Exporter to npm
56+ - name : Publish to npm
57+ working-directory : exporters/aws-distro-opentelemetry-exporter-xray-udp
58+ env :
59+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
60+ NPM_CONFIG_PROVENANCE : true
61+ run : npx publish
62+
63+ # Publish to GitHub releases
64+ - name : Create GH release
65+ id : create_release
66+ env :
67+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
68+ run : |
69+ gh release create --target "$GITHUB_REF_NAME" \
70+ --title "Release aws-distro-opentelemetry-exporter-xray-udp v${{ inputs.udp-exporter-version }}" \
71+ --notes "Please refer to the [Changelog](https://github.com/aws-observability/aws-otel-js-instrumentation/blob/main/exporters/aws-distro-opentelemetry-exporter-xray-udp/CHANGELOG.md) for more details" \
72+ --draft \
73+ "aws-distro-opentelemetry-exporter-xray-udp/v${{ inputs.udp-exporter-version }}"
0 commit comments