2020#include " opentelemetry/nostd/string_view.h"
2121#include " opentelemetry/nostd/variant.h"
2222#include " opentelemetry/sdk/common/exporter_utils.h"
23+ #include " opentelemetry/sdk/common/thread_instrumentation.h"
2324#include " opentelemetry/version.h"
2425
2526// forward declare google::protobuf::Message
@@ -83,28 +84,32 @@ struct OtlpHttpClientOptions
8384 // User agent
8485 std::string user_agent;
8586
86- inline OtlpHttpClientOptions (nostd::string_view input_url,
87- bool input_ssl_insecure_skip_verify,
88- nostd::string_view input_ssl_ca_cert_path,
89- nostd::string_view input_ssl_ca_cert_string,
90- nostd::string_view input_ssl_client_key_path,
91- nostd::string_view input_ssl_client_key_string,
92- nostd::string_view input_ssl_client_cert_path,
93- nostd::string_view input_ssl_client_cert_string,
94- nostd::string_view input_ssl_min_tls,
95- nostd::string_view input_ssl_max_tls,
96- nostd::string_view input_ssl_cipher,
97- nostd::string_view input_ssl_cipher_suite,
98- HttpRequestContentType input_content_type,
99- JsonBytesMappingKind input_json_bytes_mapping,
100- nostd::string_view input_compression,
101- bool input_use_json_name,
102- bool input_console_debug,
103- std::chrono::system_clock::duration input_timeout,
104- const OtlpHeaders &input_http_headers,
105- std::size_t input_concurrent_sessions = 64 ,
106- std::size_t input_max_requests_per_connection = 8 ,
107- nostd::string_view input_user_agent = GetOtlpDefaultUserAgent())
87+ std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation;
88+
89+ inline OtlpHttpClientOptions (
90+ nostd::string_view input_url,
91+ bool input_ssl_insecure_skip_verify,
92+ nostd::string_view input_ssl_ca_cert_path,
93+ nostd::string_view input_ssl_ca_cert_string,
94+ nostd::string_view input_ssl_client_key_path,
95+ nostd::string_view input_ssl_client_key_string,
96+ nostd::string_view input_ssl_client_cert_path,
97+ nostd::string_view input_ssl_client_cert_string,
98+ nostd::string_view input_ssl_min_tls,
99+ nostd::string_view input_ssl_max_tls,
100+ nostd::string_view input_ssl_cipher,
101+ nostd::string_view input_ssl_cipher_suite,
102+ HttpRequestContentType input_content_type,
103+ JsonBytesMappingKind input_json_bytes_mapping,
104+ nostd::string_view input_compression,
105+ bool input_use_json_name,
106+ bool input_console_debug,
107+ std::chrono::system_clock::duration input_timeout,
108+ const OtlpHeaders &input_http_headers,
109+ const std::shared_ptr<sdk::common::ThreadInstrumentation> &input_thread_instrumentation,
110+ std::size_t input_concurrent_sessions = 64 ,
111+ std::size_t input_max_requests_per_connection = 8 ,
112+ nostd::string_view input_user_agent = GetOtlpDefaultUserAgent())
108113 : url(input_url),
109114 ssl_options(input_url,
110115 input_ssl_insecure_skip_verify,
@@ -127,7 +132,8 @@ struct OtlpHttpClientOptions
127132 http_headers(input_http_headers),
128133 max_concurrent_requests(input_concurrent_sessions),
129134 max_requests_per_connection(input_max_requests_per_connection),
130- user_agent(input_user_agent)
135+ user_agent(input_user_agent),
136+ thread_instrumentation(input_thread_instrumentation)
131137 {}
132138};
133139
0 commit comments