Skip to content

Commit 24816a8

Browse files
committed
cleanup
1 parent 0214d95 commit 24816a8

19 files changed

+49
-32
lines changed

exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ struct OtlpHttpClientOptions
8585
std::string user_agent;
8686

8787
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
88-
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
88+
std::shared_ptr<sdk::common::ThreadInstrumentation>(nullptr);
8989

9090
inline OtlpHttpClientOptions(
9191
nostd::string_view input_url,

exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ struct OPENTELEMETRY_EXPORT OtlpHttpExporterOptions
105105
std::string compression;
106106

107107
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
108-
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
108+
std::shared_ptr<sdk::common::ThreadInstrumentation>(nullptr);
109109
};
110110

111111
} // namespace otlp

exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ struct OPENTELEMETRY_EXPORT OtlpHttpLogRecordExporterOptions
105105
std::string compression;
106106

107107
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
108-
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
108+
std::shared_ptr<sdk::common::ThreadInstrumentation>(nullptr);
109109
};
110110

111111
} // namespace otlp

exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_metric_exporter_options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ struct OPENTELEMETRY_EXPORT OtlpHttpMetricExporterOptions
108108
std::string compression;
109109

110110
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
111-
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
111+
std::shared_ptr<sdk::common::ThreadInstrumentation>(nullptr);
112112
};
113113

114114
} // namespace otlp

exporters/otlp/src/otlp_http_exporter.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ OtlpHttpExporter::OtlpHttpExporter(std::unique_ptr<OtlpHttpClient> http_client)
7878
options.console_debug = http_client_->GetOptions().console_debug;
7979
options.timeout = http_client_->GetOptions().timeout;
8080
options.http_headers = http_client_->GetOptions().http_headers;
81+
options.thread_instrumentation = http_client_->GetOptions().thread_instrumentation;
8182
#ifdef ENABLE_ASYNC_EXPORT
8283
options.max_concurrent_requests = http_client_->GetOptions().max_concurrent_requests;
8384
options.max_requests_per_connection = http_client_->GetOptions().max_requests_per_connection;

exporters/otlp/src/otlp_http_log_record_exporter.cc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,14 @@ OtlpHttpLogRecordExporter::OtlpHttpLogRecordExporter(std::unique_ptr<OtlpHttpCli
7575
{
7676
OtlpHttpLogRecordExporterOptions &options =
7777
const_cast<OtlpHttpLogRecordExporterOptions &>(options_);
78-
options.url = http_client_->GetOptions().url;
79-
options.content_type = http_client_->GetOptions().content_type;
80-
options.json_bytes_mapping = http_client_->GetOptions().json_bytes_mapping;
81-
options.use_json_name = http_client_->GetOptions().use_json_name;
82-
options.console_debug = http_client_->GetOptions().console_debug;
83-
options.timeout = http_client_->GetOptions().timeout;
84-
options.http_headers = http_client_->GetOptions().http_headers;
78+
options.url = http_client_->GetOptions().url;
79+
options.content_type = http_client_->GetOptions().content_type;
80+
options.json_bytes_mapping = http_client_->GetOptions().json_bytes_mapping;
81+
options.use_json_name = http_client_->GetOptions().use_json_name;
82+
options.console_debug = http_client_->GetOptions().console_debug;
83+
options.timeout = http_client_->GetOptions().timeout;
84+
options.http_headers = http_client_->GetOptions().http_headers;
85+
options.thread_instrumentation = http_client_->GetOptions().thread_instrumentation;
8586
#ifdef ENABLE_ASYNC_EXPORT
8687
options.max_concurrent_requests = http_client_->GetOptions().max_concurrent_requests;
8788
options.max_requests_per_connection = http_client_->GetOptions().max_requests_per_connection;

exporters/otlp/src/otlp_http_metric_exporter.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ OtlpHttpMetricExporter::OtlpHttpMetricExporter(std::unique_ptr<OtlpHttpClient> h
8585
options.console_debug = http_client_->GetOptions().console_debug;
8686
options.timeout = http_client_->GetOptions().timeout;
8787
options.http_headers = http_client_->GetOptions().http_headers;
88+
options.thread_instrumentation = http_client_->GetOptions().thread_instrumentation;
8889
#ifdef ENABLE_ASYNC_EXPORT
8990
options.max_concurrent_requests = http_client_->GetOptions().max_concurrent_requests;
9091
options.max_requests_per_connection = http_client_->GetOptions().max_requests_per_connection;

exporters/otlp/test/otlp_http_metric_exporter_test.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "opentelemetry/ext/http/client/http_client.h"
2929
#include "opentelemetry/nostd/string_view.h"
3030
#include "opentelemetry/sdk/common/exporter_utils.h"
31+
#include "opentelemetry/sdk/common/thread_instrumentation.h"
3132
#include "opentelemetry/sdk/instrumentationscope/instrumentation_scope.h"
3233
#include "opentelemetry/sdk/metrics/data/metric_data.h"
3334
#include "opentelemetry/sdk/metrics/data/point_data.h"

ext/src/http/client/curl/http_client_curl.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "opentelemetry/ext/http/common/url_parser.h"
2222
#include "opentelemetry/nostd/shared_ptr.h"
2323
#include "opentelemetry/nostd/string_view.h"
24+
#include "opentelemetry/sdk/common/thread_instrumentation.h"
2425
#include "opentelemetry/version.h"
2526

2627
#ifdef ENABLE_OTLP_COMPRESSION_PREVIEW

ext/src/http/client/curl/http_client_factory_curl.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "opentelemetry/ext/http/client/curl/http_client_curl.h"
77
#include "opentelemetry/ext/http/client/http_client.h"
88
#include "opentelemetry/ext/http/client/http_client_factory.h"
9+
#include "opentelemetry/sdk/common/thread_instrumentation.h"
910

1011
namespace http_client = opentelemetry::ext::http::client;
1112

0 commit comments

Comments
 (0)