Skip to content

Commit c69ffe2

Browse files
committed
Add CI for trace context validation
1 parent 06283f7 commit c69ffe2

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,3 +923,36 @@ jobs:
923923
- name: run ./ci/docfx.cmd
924924
shell: cmd
925925
run: ./ci/docfx.cmd
926+
927+
w3c_trace_context_compliance_v1:
928+
name: W3C Distributed Tracing Validation V1
929+
runs-on: ubuntu-24.04
930+
steps:
931+
- name: Checkout w3c/trace-context repo
932+
uses: actions/checkout@v4
933+
with:
934+
repository: w3c/trace-context
935+
path: trace-context
936+
- name: Checkout open-telemetry/opentelemetry-cpp
937+
uses: actions/checkout@v4
938+
with:
939+
submodules: 'recursive'
940+
- name: setup
941+
env:
942+
CC: /usr/bin/gcc-14
943+
CXX: /usr/bin/g++-14
944+
PROTOBUF_VERSION: 21.12
945+
run: |
946+
sudo -E ./ci/setup_googletest.sh
947+
sudo -E ./ci/setup_ci_environment.sh
948+
- name: run w3c trace-context test server (background)
949+
env:
950+
CXX_STANDARD: '14'
951+
run: |
952+
./ci/do_ci.sh cmake.w3c.trace-context.build-server
953+
.${HOME}/build/ext/test/w3c_tracecontext_test/w3c_tracecontext_test &
954+
sleep 10
955+
- name: run w3c trace-context test suite
956+
run:
957+
|
958+
python ${GITHUB_WORKSPACE}/trace-context/test/test.py http://locahost:30000/test

ci/do_ci.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,16 @@ elif [[ "$1" == "cmake.exporter.otprotocol.with_async_export.test" ]]; then
393393
make -j $(nproc)
394394
cd exporters/otlp && make test
395395
exit 0
396+
elif [[ "$1" == "cmake.w3c.trace-context.build-server" ]]; then
397+
echo "Building w3c trace context test server"
398+
cd "${BUILD_DIR}"
399+
rm -rf *
400+
cmake "${CMAKE_OPTIONS[@]}" \
401+
-DBUILD_W3CTRACECONTEXT_TEST=ON \
402+
-DCMAKE_CXX_STANDARD=${CXX_STANDARD} \
403+
"${SRC_DIR}"
404+
eval "$MAKE_COMMAND"
405+
exit 0
396406
elif [[ "$1" == "cmake.do_not_install.test" ]]; then
397407
cd "${BUILD_DIR}"
398408
rm -rf *

0 commit comments

Comments
 (0)