From 17e5124e8033431e670f77a92a3c6df4dc4fa860 Mon Sep 17 00:00:00 2001 From: Pranav Sharma Date: Wed, 6 Nov 2024 21:42:45 +0000 Subject: [PATCH 1/4] Rename w3c_tracecontext_test -> w3c_tracecontext_test_server --- ext/test/CMakeLists.txt | 2 +- .../BUILD | 2 +- .../CMakeLists.txt | 6 +++--- .../Dockerfile | 0 .../README.md | 4 ++-- .../main.cc | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename ext/test/{w3c_tracecontext_test => w3c_tracecontext_test_server}/BUILD (93%) rename ext/test/{w3c_tracecontext_test => w3c_tracecontext_test_server}/CMakeLists.txt (70%) rename ext/test/{w3c_tracecontext_test => w3c_tracecontext_test_server}/Dockerfile (100%) rename ext/test/{w3c_tracecontext_test => w3c_tracecontext_test_server}/README.md (95%) rename ext/test/{w3c_tracecontext_test => w3c_tracecontext_test_server}/main.cc (99%) diff --git a/ext/test/CMakeLists.txt b/ext/test/CMakeLists.txt index cc3d4cd1e1..8987822645 100644 --- a/ext/test/CMakeLists.txt +++ b/ext/test/CMakeLists.txt @@ -3,5 +3,5 @@ add_subdirectory(http) if(BUILD_W3CTRACECONTEXT_TEST) - add_subdirectory(w3c_tracecontext_test) + add_subdirectory(w3c_tracecontext_test_server) endif() diff --git a/ext/test/w3c_tracecontext_test/BUILD b/ext/test/w3c_tracecontext_test_server/BUILD similarity index 93% rename from ext/test/w3c_tracecontext_test/BUILD rename to ext/test/w3c_tracecontext_test_server/BUILD index c67ab11a9c..9f5d5d61b4 100644 --- a/ext/test/w3c_tracecontext_test/BUILD +++ b/ext/test/w3c_tracecontext_test_server/BUILD @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 cc_binary( - name = "w3c_tracecontext_test", + name = "w3c_tracecontext_test_server", srcs = [ "main.cc", ], diff --git a/ext/test/w3c_tracecontext_test/CMakeLists.txt b/ext/test/w3c_tracecontext_test_server/CMakeLists.txt similarity index 70% rename from ext/test/w3c_tracecontext_test/CMakeLists.txt rename to ext/test/w3c_tracecontext_test_server/CMakeLists.txt index cc2ae43b1c..226da8f289 100644 --- a/ext/test/w3c_tracecontext_test/CMakeLists.txt +++ b/ext/test/w3c_tracecontext_test_server/CMakeLists.txt @@ -3,12 +3,12 @@ include_directories(${CMAKE_SOURCE_DIR}/exporters/ostream/include) -add_executable(w3c_tracecontext_test main.cc) +add_executable(w3c_tracecontext_test_server main.cc) target_link_libraries( - w3c_tracecontext_test + w3c_tracecontext_test_server PRIVATE ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace opentelemetry_http_client_curl opentelemetry_exporter_ostream_span ${CURL_LIBRARIES} nlohmann_json::nlohmann_json) if(nlohmann_json_clone) - add_dependencies(w3c_tracecontext_test nlohmann_json::nlohmann_json) + add_dependencies(w3c_tracecontext_test_server nlohmann_json::nlohmann_json) endif() diff --git a/ext/test/w3c_tracecontext_test/Dockerfile b/ext/test/w3c_tracecontext_test_server/Dockerfile similarity index 100% rename from ext/test/w3c_tracecontext_test/Dockerfile rename to ext/test/w3c_tracecontext_test_server/Dockerfile diff --git a/ext/test/w3c_tracecontext_test/README.md b/ext/test/w3c_tracecontext_test_server/README.md similarity index 95% rename from ext/test/w3c_tracecontext_test/README.md rename to ext/test/w3c_tracecontext_test_server/README.md index 6f4db4513d..286704f7c3 100644 --- a/ext/test/w3c_tracecontext_test/README.md +++ b/ext/test/w3c_tracecontext_test_server/README.md @@ -11,7 +11,7 @@ instructions](https://github.com/w3c/trace-context/tree/master/test#implement-te 1: Build and start the test service endpoint: ```sh -./w3c_tracecontext_test +./w3c_tracecontext_test_server Listening to http://localhost:30000/test ``` @@ -19,7 +19,7 @@ Listening to http://localhost:30000/test A custom port number for the test service to listen to can be specified: ```sh -./w3c_tracecontext_test 31339 +./w3c_tracecontext_test_server 31339 Listening to http://localhost:31339/test ``` diff --git a/ext/test/w3c_tracecontext_test/main.cc b/ext/test/w3c_tracecontext_test_server/main.cc similarity index 99% rename from ext/test/w3c_tracecontext_test/main.cc rename to ext/test/w3c_tracecontext_test_server/main.cc index d2ed772510..c5fd697037 100644 --- a/ext/test/w3c_tracecontext_test/main.cc +++ b/ext/test/w3c_tracecontext_test_server/main.cc @@ -98,7 +98,7 @@ void initTracer() nostd::shared_ptr get_tracer() { auto provider = trace_api::Provider::GetTracerProvider(); - return provider->GetTracer("w3c_tracecontext_test"); + return provider->GetTracer("w3c_tracecontext_test_server"); } struct Uri From d5bacbefb458ba38d91172cd0ddb0876f0c77554 Mon Sep 17 00:00:00 2001 From: Pranav Sharma Date: Wed, 6 Nov 2024 21:52:17 +0000 Subject: [PATCH 2/4] Udpate CI to accomodate the rename --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26dda5449c..3715de5805 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -946,8 +946,8 @@ jobs: CXX_STANDARD: '14' run: | ./ci/do_ci.sh cmake.w3c.trace-context.build-server - cd $HOME/build/ext/test/w3c_tracecontext_test - ./w3c_tracecontext_test & + cd $HOME/build/ext/test/w3c_tracecontext_test_server + ./w3c_tracecontext_test_server & - name: Checkout w3c/trace-context repo uses: actions/checkout@v4 with: From a48838bd697c4b84f4e0f729eb5ad1c5827e80aa Mon Sep 17 00:00:00 2001 From: Pranav Sharma Date: Fri, 8 Nov 2024 17:06:50 +0000 Subject: [PATCH 3/4] Update name to w3c_tracecontext_http_test_server --- .github/workflows/ci.yml | 4 ++-- ext/test/CMakeLists.txt | 2 +- .../BUILD | 2 +- .../CMakeLists.txt | 6 +++--- .../Dockerfile | 0 .../README.md | 4 ++-- .../main.cc | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) rename ext/test/{w3c_tracecontext_test_server => w3c_tracecontext_http_test_server}/BUILD (92%) rename ext/test/{w3c_tracecontext_test_server => w3c_tracecontext_http_test_server}/CMakeLists.txt (68%) rename ext/test/{w3c_tracecontext_test_server => w3c_tracecontext_http_test_server}/Dockerfile (100%) rename ext/test/{w3c_tracecontext_test_server => w3c_tracecontext_http_test_server}/README.md (94%) rename ext/test/{w3c_tracecontext_test_server => w3c_tracecontext_http_test_server}/main.cc (99%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3715de5805..f3a214ecde 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -946,8 +946,8 @@ jobs: CXX_STANDARD: '14' run: | ./ci/do_ci.sh cmake.w3c.trace-context.build-server - cd $HOME/build/ext/test/w3c_tracecontext_test_server - ./w3c_tracecontext_test_server & + cd $HOME/build/ext/test/w3c_tracecontext_http_test_server + ./w3c_tracecontext_http_test_server & - name: Checkout w3c/trace-context repo uses: actions/checkout@v4 with: diff --git a/ext/test/CMakeLists.txt b/ext/test/CMakeLists.txt index 8987822645..4dabab3821 100644 --- a/ext/test/CMakeLists.txt +++ b/ext/test/CMakeLists.txt @@ -3,5 +3,5 @@ add_subdirectory(http) if(BUILD_W3CTRACECONTEXT_TEST) - add_subdirectory(w3c_tracecontext_test_server) + add_subdirectory(w3c_tracecontext_http_test_server) endif() diff --git a/ext/test/w3c_tracecontext_test_server/BUILD b/ext/test/w3c_tracecontext_http_test_server/BUILD similarity index 92% rename from ext/test/w3c_tracecontext_test_server/BUILD rename to ext/test/w3c_tracecontext_http_test_server/BUILD index 9f5d5d61b4..8c1c8c17e9 100644 --- a/ext/test/w3c_tracecontext_test_server/BUILD +++ b/ext/test/w3c_tracecontext_http_test_server/BUILD @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 cc_binary( - name = "w3c_tracecontext_test_server", + name = "w3c_tracecontext_http_test_server", srcs = [ "main.cc", ], diff --git a/ext/test/w3c_tracecontext_test_server/CMakeLists.txt b/ext/test/w3c_tracecontext_http_test_server/CMakeLists.txt similarity index 68% rename from ext/test/w3c_tracecontext_test_server/CMakeLists.txt rename to ext/test/w3c_tracecontext_http_test_server/CMakeLists.txt index 226da8f289..7a9677b9c5 100644 --- a/ext/test/w3c_tracecontext_test_server/CMakeLists.txt +++ b/ext/test/w3c_tracecontext_http_test_server/CMakeLists.txt @@ -3,12 +3,12 @@ include_directories(${CMAKE_SOURCE_DIR}/exporters/ostream/include) -add_executable(w3c_tracecontext_test_server main.cc) +add_executable(w3c_tracecontext_http_test_server main.cc) target_link_libraries( - w3c_tracecontext_test_server + w3c_tracecontext_http_test_server PRIVATE ${CMAKE_THREAD_LIBS_INIT} opentelemetry_trace opentelemetry_http_client_curl opentelemetry_exporter_ostream_span ${CURL_LIBRARIES} nlohmann_json::nlohmann_json) if(nlohmann_json_clone) - add_dependencies(w3c_tracecontext_test_server nlohmann_json::nlohmann_json) + add_dependencies(w3c_tracecontext_http_test_server nlohmann_json::nlohmann_json) endif() diff --git a/ext/test/w3c_tracecontext_test_server/Dockerfile b/ext/test/w3c_tracecontext_http_test_server/Dockerfile similarity index 100% rename from ext/test/w3c_tracecontext_test_server/Dockerfile rename to ext/test/w3c_tracecontext_http_test_server/Dockerfile diff --git a/ext/test/w3c_tracecontext_test_server/README.md b/ext/test/w3c_tracecontext_http_test_server/README.md similarity index 94% rename from ext/test/w3c_tracecontext_test_server/README.md rename to ext/test/w3c_tracecontext_http_test_server/README.md index 286704f7c3..afe2a68638 100644 --- a/ext/test/w3c_tracecontext_test_server/README.md +++ b/ext/test/w3c_tracecontext_http_test_server/README.md @@ -11,7 +11,7 @@ instructions](https://github.com/w3c/trace-context/tree/master/test#implement-te 1: Build and start the test service endpoint: ```sh -./w3c_tracecontext_test_server +./w3c_tracecontext_http_test_server Listening to http://localhost:30000/test ``` @@ -19,7 +19,7 @@ Listening to http://localhost:30000/test A custom port number for the test service to listen to can be specified: ```sh -./w3c_tracecontext_test_server 31339 +./w3c_tracecontext_http_test_server 31339 Listening to http://localhost:31339/test ``` diff --git a/ext/test/w3c_tracecontext_test_server/main.cc b/ext/test/w3c_tracecontext_http_test_server/main.cc similarity index 99% rename from ext/test/w3c_tracecontext_test_server/main.cc rename to ext/test/w3c_tracecontext_http_test_server/main.cc index c5fd697037..5af8c141de 100644 --- a/ext/test/w3c_tracecontext_test_server/main.cc +++ b/ext/test/w3c_tracecontext_http_test_server/main.cc @@ -98,7 +98,7 @@ void initTracer() nostd::shared_ptr get_tracer() { auto provider = trace_api::Provider::GetTracerProvider(); - return provider->GetTracer("w3c_tracecontext_test_server"); + return provider->GetTracer("w3c_tracecontext_http_test_server"); } struct Uri From ee5e9b94400f4fd2afcc2ddc3a963f737448ed46 Mon Sep 17 00:00:00 2001 From: Pranav Sharma Date: Fri, 8 Nov 2024 17:16:13 +0000 Subject: [PATCH 4/4] Fix formatting issues --- ext/test/w3c_tracecontext_http_test_server/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/test/w3c_tracecontext_http_test_server/CMakeLists.txt b/ext/test/w3c_tracecontext_http_test_server/CMakeLists.txt index 7a9677b9c5..85e3c3eea0 100644 --- a/ext/test/w3c_tracecontext_http_test_server/CMakeLists.txt +++ b/ext/test/w3c_tracecontext_http_test_server/CMakeLists.txt @@ -10,5 +10,6 @@ target_link_libraries( opentelemetry_http_client_curl opentelemetry_exporter_ostream_span ${CURL_LIBRARIES} nlohmann_json::nlohmann_json) if(nlohmann_json_clone) - add_dependencies(w3c_tracecontext_http_test_server nlohmann_json::nlohmann_json) + add_dependencies(w3c_tracecontext_http_test_server + nlohmann_json::nlohmann_json) endif()