open-telemetry / open-telemetry/opentelemetry-cpp
Move the embedded HTTP server headers out of ext/include
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 632
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 75
Description
ext/include/opentelemetry/ext/http/server/http_server.h and socket_tools.h are an embedded HTTP server used by tests and by the http example. They sit under ext/include beside the user facing client headers, which makes them look like part of the public surface even though nothing supported points at them.
#4327 replaced the *.h glob in the ext_common component with an explicit manifest and left both out, so the package no longer installs them. That fixes the packaging side. The files are still in a public looking location, and @dbarker asked for a follow up so the move itself does not get lost.
What uses them today
ext/test/http/socket_tools_test.ccext/test/http/curl_http_test.ccext/test/w3c_tracecontext_http_test_server/main.ccexporters/otlp/test/otlp_http_exporter_test.ccexporters/otlp/test/otlp_http_log_record_exporter_test.ccexporters/zipkin/test/zipkin_exporter_test.ccexamples/http/server.h
Everything except the example is a test. That list is the full transitive closure over the include graph on main, so nothing under functional/ is involved.
What a move would settle
Each of those targets now links ws2_32 on Windows for itself, because #4327 took that link off the opentelemetry_ext interface once the headers stopped shipping. On the Bazel side //ext:headers still globs the whole include tree, so its -DEFAULTLIB:Ws2_32.lib linkopt is still load bearing and stays. Moving the files gives both build systems the same story: a server target that owns its own Winsock dependency, and an ext target that is only the HTTP client.
test_common is one candidate, though the http example is not a test, so a small dedicated target may fit better. Happy to take this on once there is a preferred destination.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the includes from ext/test/http/socket_tools_test.cc, the listed exporter tests, and examples/http/server.h, then inspect the test_common and ext targets. The destination is not yet settled: compare test_common with a dedicated server target. Done means the headers move out of ext/include, all listed targets still build, and Winsock ownership remains correct for both build systems.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100