You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of now, otel-cpp use Curl as the default HTTP Client, and is set here for CMake. It should be instead possible for users to bring their own HTTP Client library. Proposed solution could be:
Add cmake option (say WITH_CUSTOM_HTTP_CLIENT). And then WITH_HTTP_CLIENT_CURL shouldn't be set if the new option is enabled.
User need to provide following as part of their application code -
Implementation for opentelemetry::ext::http::client::HttpClientFactory::Create() and opentelemetry::ext::http::client::HttpClientFactory::CreateSync(). These two methods should return instances for custom implementation for HttpClient (async http client) and HttpClientSync (sync http client) as mentioned in step below.
Custom implementation for ext::http::client::HttpClientSync and :ext::http::client::HttpClient classes.
(Open Issue) opentelemetry_http_client_curl shouldn't be directly linked with other targets, probably some way to ensure that custom client library get's used at all the places.
This will ensure that only one definition/symbol for HttpClient and HttpClientSync is exposed (either from Custom http client, or the Curl http client) and would be invoked at run-time.
Also changes would be required in bazel build.
We can use this issue to finalize solution before implementation.
As of now, otel-cpp use Curl as the default HTTP Client, and is set here for CMake. It should be instead possible for users to bring their own HTTP Client library. Proposed solution could be:
opentelemetry::ext::http::client::HttpClientFactory::Create()
andopentelemetry::ext::http::client::HttpClientFactory::CreateSync()
. These two methods should return instances for custom implementation for HttpClient (async http client) and HttpClientSync (sync http client) as mentioned in step below.ext::http::client::HttpClientSync
and:ext::http::client::HttpClient
classes.opentelemetry_http_client_curl
shouldn't be directly linked with other targets, probably some way to ensure that custom client library get's used at all the places.This will ensure that only one definition/symbol for HttpClient and HttpClientSync is exposed (either from Custom http client, or the Curl http client) and would be invoked at run-time.
Also changes would be required in bazel build.
We can use this issue to finalize solution before implementation.
Related issue : #1145 #1146
The text was updated successfully, but these errors were encountered: