From 336f68b615bf88f63abde7311d60da97859952ef Mon Sep 17 00:00:00 2001 From: Douglas Barker Date: Fri, 10 Jul 2026 15:26:29 -0400 Subject: [PATCH 1/9] fix missing initialization clang-tidy warnings. Assisted-by: Claude Sonnet 4.6 --- api/include/opentelemetry/trace/span_id.h | 4 ++-- api/include/opentelemetry/trace/trace_id.h | 4 ++-- .../exporters/otlp/otlp_grpc_client_options.h | 2 +- .../otlp/otlp_grpc_metric_exporter_options.h | 3 ++- .../exporters/otlp/otlp_http_client.h | 2 +- .../exporters/otlp/otlp_http_exporter_options.h | 12 ++++++------ .../otlp/otlp_http_log_record_exporter_options.h | 12 ++++++------ .../otlp/otlp_http_metric_exporter_options.h | 14 +++++++------- exporters/otlp/src/otlp_file_client.cc | 14 +++++++------- exporters/otlp/src/otlp_http_exporter_options.cc | 11 +++-------- .../src/otlp_http_log_record_exporter_options.cc | 11 +++-------- .../otlp/src/otlp_http_metric_exporter_options.cc | 11 +++-------- .../ext/http/client/curl/http_operation_curl.h | 4 ++-- .../opentelemetry/ext/http/server/http_server.h | 10 +++++----- .../opentelemetry/ext/http/server/socket_tools.h | 4 ++-- ext/src/http/client/curl/http_operation_curl.cc | 9 ++++++--- functional/otlp/func_grpc_main.cc | 2 +- functional/otlp/func_http_main.cc | 2 +- .../opentelemetry/sdk/metrics/data/metric_data.h | 2 +- .../exemplar/fixed_size_exemplar_reservoir.h | 2 +- .../opentelemetry/sdk/metrics/instruments.h | 4 ++-- sdk/include/opentelemetry/sdk/trace/sampler.h | 2 +- sdk/src/trace/samplers/ot_trace_state.cc | 4 ++-- sdk/test/logs/logger_sdk_test.cc | 2 +- ...ase2_exponential_histogram_indexer_benchmark.cc | 4 ++-- sdk/test/metrics/multi_metric_storage_test.cc | 4 ++-- 26 files changed, 72 insertions(+), 83 deletions(-) diff --git a/api/include/opentelemetry/trace/span_id.h b/api/include/opentelemetry/trace/span_id.h index 6537f77fc7..249150c2f4 100644 --- a/api/include/opentelemetry/trace/span_id.h +++ b/api/include/opentelemetry/trace/span_id.h @@ -20,7 +20,7 @@ class SpanId final static constexpr size_t kSize = 8; // An invalid SpanId (all zeros). - SpanId() noexcept : rep_{0} {} + SpanId() noexcept = default; // Creates a SpanId with the given ID. explicit SpanId(nostd::span id) noexcept { memcpy(rep_, id.data(), kSize); } @@ -60,7 +60,7 @@ class SpanId final } private: - uint8_t rep_[kSize]; + uint8_t rep_[kSize]{}; }; } // namespace trace diff --git a/api/include/opentelemetry/trace/trace_id.h b/api/include/opentelemetry/trace/trace_id.h index 533037123e..7992744bd2 100644 --- a/api/include/opentelemetry/trace/trace_id.h +++ b/api/include/opentelemetry/trace/trace_id.h @@ -23,7 +23,7 @@ class TraceId final static constexpr size_t kSize = 16; // An invalid TraceId (all zeros). - TraceId() noexcept : rep_{0} {} + TraceId() noexcept = default; // Creates a TraceId with the given ID. explicit TraceId(nostd::span id) noexcept @@ -65,7 +65,7 @@ class TraceId final } private: - uint8_t rep_[kSize]; + uint8_t rep_[kSize]{}; }; } // namespace trace diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_client_options.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_client_options.h index f524b27b9a..43d4435f54 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_client_options.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_client_options.h @@ -61,7 +61,7 @@ struct OtlpGrpcClientOptions #endif /** Export timeout. */ - std::chrono::system_clock::duration timeout; + std::chrono::system_clock::duration timeout{}; /** Additional HTTP headers. */ OtlpHeaders metadata; diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_options.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_options.h index ab6c8795f7..f5040b7fd5 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_options.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_options.h @@ -35,7 +35,8 @@ struct OPENTELEMETRY_EXPORT OtlpGrpcMetricExporterOptions : public OtlpGrpcClien ~OtlpGrpcMetricExporterOptions() override; /** Preferred Aggregation Temporality. */ - PreferredAggregationTemporality aggregation_temporality; + PreferredAggregationTemporality aggregation_temporality{ + PreferredAggregationTemporality::kUnspecified}; }; } // namespace otlp diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_client.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_client.h index 2d891f175b..da28fbfdec 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_client.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_client.h @@ -72,7 +72,7 @@ struct OtlpHttpClientOptions // Whether to print the status of the HTTP client in the console bool console_debug = false; - std::chrono::system_clock::duration timeout; + std::chrono::system_clock::duration timeout{}; // Additional HTTP headers OtlpHeaders http_headers; diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter_options.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter_options.h index b146fd3b0a..a881161b44 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter_options.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter_options.h @@ -60,27 +60,27 @@ struct OPENTELEMETRY_EXPORT OtlpHttpExporterOptions /** Use json names (true) or protobuf field names (false) to set the json key. */ - bool use_json_name; + bool use_json_name{false}; /** Print debug messages. */ - bool console_debug; + bool console_debug{false}; /** Export timeout. */ - std::chrono::system_clock::duration timeout; + std::chrono::system_clock::duration timeout{}; /** Additional HTTP headers. */ OtlpHeaders http_headers; #ifdef ENABLE_ASYNC_EXPORT /** Max number of concurrent requests. */ - std::size_t max_concurrent_requests; + std::size_t max_concurrent_requests{}; /** Max number of requests per connection. */ - std::size_t max_requests_per_connection; + std::size_t max_requests_per_connection{}; #endif /** True do disable SSL. */ - bool ssl_insecure_skip_verify; + bool ssl_insecure_skip_verify{}; /** CA CERT, path to a file. */ std::string ssl_ca_cert_path; diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter_options.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter_options.h index 60785ed9f8..e62057c172 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter_options.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter_options.h @@ -59,27 +59,27 @@ struct OPENTELEMETRY_EXPORT OtlpHttpLogRecordExporterOptions /** Use json names (true) or protobuf field names (false) to set the json key. */ - bool use_json_name; + bool use_json_name{false}; /** Print debug messages. */ - bool console_debug; + bool console_debug{false}; /** Export timeout. */ - std::chrono::system_clock::duration timeout; + std::chrono::system_clock::duration timeout{}; /** Additional HTTP headers. */ OtlpHeaders http_headers; #ifdef ENABLE_ASYNC_EXPORT /** Max number of concurrent requests. */ - std::size_t max_concurrent_requests; + std::size_t max_concurrent_requests{}; /** Max number of requests per connection. */ - std::size_t max_requests_per_connection; + std::size_t max_requests_per_connection{}; #endif /** True do disable SSL. */ - bool ssl_insecure_skip_verify; + bool ssl_insecure_skip_verify{}; /** CA CERT, path to a file. */ std::string ssl_ca_cert_path; diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_metric_exporter_options.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_metric_exporter_options.h index 76f2e9a513..12a475af99 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_metric_exporter_options.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_metric_exporter_options.h @@ -60,29 +60,29 @@ struct OPENTELEMETRY_EXPORT OtlpHttpMetricExporterOptions /** Use json names (true) or protobuf field names (false) to set the json key. */ - bool use_json_name; + bool use_json_name{false}; /** Print debug messages. */ - bool console_debug; + bool console_debug{false}; /** Export timeout. */ - std::chrono::system_clock::duration timeout; + std::chrono::system_clock::duration timeout{}; /** Additional HTTP headers. */ OtlpHeaders http_headers; - PreferredAggregationTemporality aggregation_temporality; + PreferredAggregationTemporality aggregation_temporality{}; #ifdef ENABLE_ASYNC_EXPORT /** Max number of concurrent requests. */ - std::size_t max_concurrent_requests; + std::size_t max_concurrent_requests{}; /** Max number of requests per connection. */ - std::size_t max_requests_per_connection; + std::size_t max_requests_per_connection{}; #endif /** True do disable SSL. */ - bool ssl_insecure_skip_verify; + bool ssl_insecure_skip_verify{}; /** CA CERT, path to a file. */ std::string ssl_ca_cert_path; diff --git a/exporters/otlp/src/otlp_file_client.cc b/exporters/otlp/src/otlp_file_client.cc index f7c757fe79..7cdc467e83 100644 --- a/exporters/otlp/src/otlp_file_client.cc +++ b/exporters/otlp/src/otlp_file_client.cc @@ -1569,16 +1569,16 @@ class OPENTELEMETRY_LOCAL_SYMBOL OtlpFileSystemBackend : public OtlpFileAppender struct FileStats { - std::atomic is_shutdown; - std::size_t rotate_index; - std::size_t written_size; - std::size_t left_flush_record_count; + std::atomic is_shutdown{false}; + std::size_t rotate_index{0}; + std::size_t written_size{0}; + std::size_t left_flush_record_count{0}; std::shared_ptr current_file; std::mutex file_lock; - std::time_t last_checkpoint; + std::time_t last_checkpoint{0}; std::string file_path; - std::atomic record_count; - std::atomic flushed_record_count; + std::atomic record_count{0}; + std::atomic flushed_record_count{0}; std::unique_ptr background_flush_thread; std::mutex background_thread_lock; diff --git a/exporters/otlp/src/otlp_http_exporter_options.cc b/exporters/otlp/src/otlp_http_exporter_options.cc index c7ac41afc4..2bb925bbfb 100644 --- a/exporters/otlp/src/otlp_http_exporter_options.cc +++ b/exporters/otlp/src/otlp_http_exporter_options.cc @@ -16,15 +16,12 @@ OtlpHttpExporterOptions::OtlpHttpExporterOptions() : url(GetOtlpDefaultHttpTracesEndpoint()), content_type(GetOtlpHttpProtocolFromString(GetOtlpDefaultHttpTracesProtocol())), json_bytes_mapping(JsonBytesMappingKind::kHexId), - use_json_name(false), - console_debug(false), timeout(GetOtlpDefaultTracesTimeout()), http_headers(GetOtlpDefaultTracesHeaders()), #ifdef ENABLE_ASYNC_EXPORT max_concurrent_requests{64}, max_requests_per_connection{8}, #endif - ssl_insecure_skip_verify(false), ssl_ca_cert_path(GetOtlpDefaultTracesSslCertificatePath()), ssl_ca_cert_string(GetOtlpDefaultTracesSslCertificateString()), ssl_client_key_path(GetOtlpDefaultTracesSslClientKeyPath()), @@ -45,14 +42,12 @@ OtlpHttpExporterOptions::OtlpHttpExporterOptions() OtlpHttpExporterOptions::OtlpHttpExporterOptions(void *) : url(), content_type(HttpRequestContentType::kBinary), - json_bytes_mapping(JsonBytesMappingKind::kHexId), - use_json_name(false), - console_debug(false), + json_bytes_mapping(JsonBytesMappingKind::kHexId) #ifdef ENABLE_ASYNC_EXPORT + , max_concurrent_requests{64}, - max_requests_per_connection{8}, + max_requests_per_connection{8} #endif - ssl_insecure_skip_verify(false) {} OtlpHttpExporterOptions::~OtlpHttpExporterOptions() {} diff --git a/exporters/otlp/src/otlp_http_log_record_exporter_options.cc b/exporters/otlp/src/otlp_http_log_record_exporter_options.cc index 1ff1c4354d..702a4580fa 100644 --- a/exporters/otlp/src/otlp_http_log_record_exporter_options.cc +++ b/exporters/otlp/src/otlp_http_log_record_exporter_options.cc @@ -16,15 +16,12 @@ OtlpHttpLogRecordExporterOptions::OtlpHttpLogRecordExporterOptions() : url(GetOtlpDefaultHttpLogsEndpoint()), content_type(GetOtlpHttpProtocolFromString(GetOtlpDefaultHttpLogsProtocol())), json_bytes_mapping(JsonBytesMappingKind::kHexId), - use_json_name(false), - console_debug(false), timeout(GetOtlpDefaultLogsTimeout()), http_headers(GetOtlpDefaultLogsHeaders()), #ifdef ENABLE_ASYNC_EXPORT max_concurrent_requests{64}, max_requests_per_connection{8}, #endif - ssl_insecure_skip_verify(false), ssl_ca_cert_path(GetOtlpDefaultLogsSslCertificatePath()), ssl_ca_cert_string(GetOtlpDefaultLogsSslCertificateString()), ssl_client_key_path(GetOtlpDefaultLogsSslClientKeyPath()), @@ -45,14 +42,12 @@ OtlpHttpLogRecordExporterOptions::OtlpHttpLogRecordExporterOptions() OtlpHttpLogRecordExporterOptions::OtlpHttpLogRecordExporterOptions(void *) : url(), content_type(exporter::otlp::HttpRequestContentType::kBinary), - json_bytes_mapping(JsonBytesMappingKind::kHexId), - use_json_name(false), - console_debug(false), + json_bytes_mapping(JsonBytesMappingKind::kHexId) #ifdef ENABLE_ASYNC_EXPORT + , max_concurrent_requests{64}, - max_requests_per_connection{8}, + max_requests_per_connection{8} #endif - ssl_insecure_skip_verify(false) {} OtlpHttpLogRecordExporterOptions::~OtlpHttpLogRecordExporterOptions() {} diff --git a/exporters/otlp/src/otlp_http_metric_exporter_options.cc b/exporters/otlp/src/otlp_http_metric_exporter_options.cc index 78f724301e..d3de263e7a 100644 --- a/exporters/otlp/src/otlp_http_metric_exporter_options.cc +++ b/exporters/otlp/src/otlp_http_metric_exporter_options.cc @@ -17,8 +17,6 @@ OtlpHttpMetricExporterOptions::OtlpHttpMetricExporterOptions() : url(GetOtlpDefaultMetricsEndpoint()), content_type(GetOtlpHttpProtocolFromString(GetOtlpDefaultHttpMetricsProtocol())), json_bytes_mapping(JsonBytesMappingKind::kHexId), - use_json_name(false), - console_debug(false), timeout(GetOtlpDefaultMetricsTimeout()), http_headers(GetOtlpDefaultMetricsHeaders()), aggregation_temporality(PreferredAggregationTemporality::kCumulative), @@ -26,7 +24,6 @@ OtlpHttpMetricExporterOptions::OtlpHttpMetricExporterOptions() max_concurrent_requests{64}, max_requests_per_connection{8}, #endif - ssl_insecure_skip_verify(false), ssl_ca_cert_path(GetOtlpDefaultMetricsSslCertificatePath()), ssl_ca_cert_string(GetOtlpDefaultMetricsSslCertificateString()), ssl_client_key_path(GetOtlpDefaultMetricsSslClientKeyPath()), @@ -48,14 +45,12 @@ OtlpHttpMetricExporterOptions::OtlpHttpMetricExporterOptions(void *) : url(), content_type(exporter::otlp::HttpRequestContentType::kBinary), json_bytes_mapping(JsonBytesMappingKind::kHexId), - use_json_name(false), - console_debug(false), - aggregation_temporality(PreferredAggregationTemporality::kCumulative), + aggregation_temporality(PreferredAggregationTemporality::kCumulative) #ifdef ENABLE_ASYNC_EXPORT + , max_concurrent_requests{64}, - max_requests_per_connection{8}, + max_requests_per_connection{8} #endif - ssl_insecure_skip_verify(false) {} OtlpHttpMetricExporterOptions::~OtlpHttpMetricExporterOptions() {} diff --git a/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h b/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h index 541b74a85c..38d026d07a 100644 --- a/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h +++ b/ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h @@ -323,7 +323,7 @@ class HttpOperation const bool reuse_connection_{false}; // Reuse connection const std::chrono::milliseconds http_conn_timeout_; // Timeout for connect. Default: 5000ms - char curl_error_message_[CURL_ERROR_SIZE]; + char curl_error_message_[CURL_ERROR_SIZE]{}; HttpCurlEasyResource curl_resource_; CURLcode last_curl_result_{CURLE_OK}; // Curl result OR HTTP status code if successful @@ -361,7 +361,7 @@ class HttpOperation struct AsyncData { - Session *session; // Owner Session + Session *session{nullptr}; // Owner Session std::thread::id callback_thread; std::function callback; diff --git a/ext/include/opentelemetry/ext/http/server/http_server.h b/ext/include/opentelemetry/ext/http/server/http_server.h index 2129c2b643..97e9e3705f 100644 --- a/ext/include/opentelemetry/ext/http/server/http_server.h +++ b/ext/include/opentelemetry/ext/http/server/http_server.h @@ -42,7 +42,7 @@ struct HttpRequest struct HttpResponse { - int code; + int code{0}; std::string message; std::map headers; std::string body; @@ -108,9 +108,9 @@ class HttpServer : private SocketTools::Reactor::SocketCallback SendingHeaders, SendingBody, Closing - } state; - size_t contentLength; - bool keepalive; + } state{Idle}; + size_t contentLength{0}; + bool keepalive{false}; HttpRequest request; HttpResponse response; }; @@ -783,7 +783,7 @@ class HttpServer : private SocketTools::Reactor::SocketCallback static std::string formatTimestamp(time_t time) { - tm tm; + tm tm{}; #ifdef _WIN32 gmtime_s(&tm, &time); #else diff --git a/ext/include/opentelemetry/ext/http/server/socket_tools.h b/ext/include/opentelemetry/ext/http/server/socket_tools.h index b2e3217818..6823fae35d 100644 --- a/ext/include/opentelemetry/ext/http/server/socket_tools.h +++ b/ext/include/opentelemetry/ext/http/server/socket_tools.h @@ -165,13 +165,13 @@ struct SocketAddr { static u_long const Loopback = 0x7F000001; - sockaddr m_data; + sockaddr m_data{}; /// /// SocketAddr constructor /// /// SocketAddr - SocketAddr() { memset(&m_data, 0, sizeof(m_data)); } + SocketAddr() {} SocketAddr(u_long addr, int port) { diff --git a/ext/src/http/client/curl/http_operation_curl.cc b/ext/src/http/client/curl/http_operation_curl.cc index abd8b3ea77..7a5a5a2f4b 100644 --- a/ext/src/http/client/curl/http_operation_curl.cc +++ b/ext/src/http/client/curl/http_operation_curl.cc @@ -856,7 +856,8 @@ CURLcode HttpOperation::Setup() const char *data = ssl_options_.ssl_ca_cert_string.c_str(); size_t data_len = ssl_options_.ssl_ca_cert_string.length(); - struct curl_blob stblob; + struct curl_blob stblob + {}; stblob.data = const_cast(data); stblob.len = data_len; stblob.flags = CURL_BLOB_COPY; @@ -897,7 +898,8 @@ CURLcode HttpOperation::Setup() const char *data = ssl_options_.ssl_client_key_string.c_str(); size_t data_len = ssl_options_.ssl_client_key_string.length(); - struct curl_blob stblob; + struct curl_blob stblob + {}; stblob.data = const_cast(data); stblob.len = data_len; stblob.flags = CURL_BLOB_COPY; @@ -944,7 +946,8 @@ CURLcode HttpOperation::Setup() const char *data = ssl_options_.ssl_client_cert_string.c_str(); size_t data_len = ssl_options_.ssl_client_cert_string.length(); - struct curl_blob stblob; + struct curl_blob stblob + {}; stblob.data = const_cast(data); stblob.len = data_len; stblob.flags = CURL_BLOB_COPY; diff --git a/functional/otlp/func_grpc_main.cc b/functional/otlp/func_grpc_main.cc index f53cde3f1b..0e71ef90dd 100644 --- a/functional/otlp/func_grpc_main.cc +++ b/functional/otlp/func_grpc_main.cc @@ -320,7 +320,7 @@ typedef int (*test_func_t)(); struct test_case { nostd::string_view m_name; - test_func_t m_func; + test_func_t m_func{nullptr}; }; } // namespace diff --git a/functional/otlp/func_http_main.cc b/functional/otlp/func_http_main.cc index ae7399f46d..6e68a52420 100644 --- a/functional/otlp/func_http_main.cc +++ b/functional/otlp/func_http_main.cc @@ -337,7 +337,7 @@ typedef int (*test_func_t)(); struct test_case { nostd::string_view m_name; - test_func_t m_func; + test_func_t m_func{nullptr}; }; } // namespace diff --git a/sdk/include/opentelemetry/sdk/metrics/data/metric_data.h b/sdk/include/opentelemetry/sdk/metrics/data/metric_data.h index 30fa04e47f..4be493c0ac 100644 --- a/sdk/include/opentelemetry/sdk/metrics/data/metric_data.h +++ b/sdk/include/opentelemetry/sdk/metrics/data/metric_data.h @@ -34,7 +34,7 @@ class MetricData { public: InstrumentDescriptor instrument_descriptor; - AggregationTemporality aggregation_temporality; + AggregationTemporality aggregation_temporality{AggregationTemporality::kUnspecified}; opentelemetry::common::SystemTimestamp start_ts; opentelemetry::common::SystemTimestamp end_ts; std::vector point_data_attr_; diff --git a/sdk/include/opentelemetry/sdk/metrics/exemplar/fixed_size_exemplar_reservoir.h b/sdk/include/opentelemetry/sdk/metrics/exemplar/fixed_size_exemplar_reservoir.h index d33c46a8db..5be8b2513e 100644 --- a/sdk/include/opentelemetry/sdk/metrics/exemplar/fixed_size_exemplar_reservoir.h +++ b/sdk/include/opentelemetry/sdk/metrics/exemplar/fixed_size_exemplar_reservoir.h @@ -98,7 +98,7 @@ class FixedSizeExemplarReservoir : public ExemplarReservoir explicit FixedSizeExemplarReservoir() = default; std::vector storage_; std::shared_ptr reservoir_cell_selector_; - MapAndResetCellType map_and_reset_cell_; + MapAndResetCellType map_and_reset_cell_{nullptr}; }; } // namespace metrics diff --git a/sdk/include/opentelemetry/sdk/metrics/instruments.h b/sdk/include/opentelemetry/sdk/metrics/instruments.h index 5b5278fb2e..938d87fd8a 100644 --- a/sdk/include/opentelemetry/sdk/metrics/instruments.h +++ b/sdk/include/opentelemetry/sdk/metrics/instruments.h @@ -64,8 +64,8 @@ struct InstrumentDescriptor std::string name_; std::string description_; std::string unit_; - InstrumentType type_; - InstrumentValueType value_type_; + InstrumentType type_{InstrumentType::kCounter}; + InstrumentValueType value_type_{InstrumentValueType::kInt}; }; struct InstrumentDescriptorUtil diff --git a/sdk/include/opentelemetry/sdk/trace/sampler.h b/sdk/include/opentelemetry/sdk/trace/sampler.h index 888a44383b..1973db431a 100644 --- a/sdk/include/opentelemetry/sdk/trace/sampler.h +++ b/sdk/include/opentelemetry/sdk/trace/sampler.h @@ -52,7 +52,7 @@ enum class Decision : std::uint8_t */ struct SamplingResult { - Decision decision; + Decision decision{Decision::DROP}; // A set of span Attributes that will also be added to the Span. Can be nullptr. std::unique_ptr> attributes; // The tracestate used by the span. diff --git a/sdk/src/trace/samplers/ot_trace_state.cc b/sdk/src/trace/samplers/ot_trace_state.cc index edf4d060d2..756dab7841 100644 --- a/sdk/src/trace/samplers/ot_trace_state.cc +++ b/sdk/src/trace/samplers/ot_trace_state.cc @@ -139,7 +139,7 @@ OtelTraceState OtelTraceState::Parse(const std::string &ot_value) noexcept std::size_t value_len = end - value_start; if (ot_value.compare(pos, colon - pos, "th") == 0) { - uint64_t threshold_value; + uint64_t threshold_value{0}; if (value_len <= 14 && ParseHex(ot_value, value_start, value_len, threshold_value)) { state.has_threshold = true; @@ -148,7 +148,7 @@ OtelTraceState OtelTraceState::Parse(const std::string &ot_value) noexcept } else if (ot_value.compare(pos, colon - pos, "rv") == 0) { - uint64_t random_value; + uint64_t random_value{0}; if (value_len == 14 && ParseHex(ot_value, value_start, value_len, random_value)) { state.has_random_value = true; diff --git a/sdk/test/logs/logger_sdk_test.cc b/sdk/test/logs/logger_sdk_test.cc index 70d34004af..f85b7ef0d7 100644 --- a/sdk/test/logs/logger_sdk_test.cc +++ b/sdk/test/logs/logger_sdk_test.cc @@ -230,7 +230,7 @@ class MockLogRecordable final : public opentelemetry::sdk::logs::Recordable private: opentelemetry::logs::Severity severity_ = opentelemetry::logs::Severity::kInvalid; std::string body_; - int64_t event_id_; + int64_t event_id_{0}; std::string log_record_event_name_; opentelemetry::trace::TraceId trace_id_; opentelemetry::trace::SpanId span_id_; diff --git a/sdk/test/metrics/base2_exponential_histogram_indexer_benchmark.cc b/sdk/test/metrics/base2_exponential_histogram_indexer_benchmark.cc index 40ea14d575..9eb6471fcd 100644 --- a/sdk/test/metrics/base2_exponential_histogram_indexer_benchmark.cc +++ b/sdk/test/metrics/base2_exponential_histogram_indexer_benchmark.cc @@ -14,7 +14,7 @@ namespace void BM_NewIndexer(benchmark::State &state) { - std::array batch; + std::array batch{}; std::default_random_engine generator; std::uniform_int_distribution distribution(1, 32); @@ -38,7 +38,7 @@ BENCHMARK(BM_NewIndexer); void BM_ComputeIndex(benchmark::State &state) { - std::array batch; + std::array batch{}; std::default_random_engine generator; std::uniform_real_distribution distribution(0, 1000); Base2ExponentialHistogramIndexer indexer(static_cast(state.range(0))); diff --git a/sdk/test/metrics/multi_metric_storage_test.cc b/sdk/test/metrics/multi_metric_storage_test.cc index 3168f54c1d..8da13f0d8a 100644 --- a/sdk/test/metrics/multi_metric_storage_test.cc +++ b/sdk/test/metrics/multi_metric_storage_test.cc @@ -46,8 +46,8 @@ class TestMetricStorage : public SyncWritableMetricStorage num_calls_double++; } - size_t num_calls_long; - size_t num_calls_double; + size_t num_calls_long{0}; + size_t num_calls_double{0}; }; TEST(MultiMetricStorageTest, BasicTests) From 5c7e26cdc6221343aa7e5b11f6749266e450b16e Mon Sep 17 00:00:00 2001 From: Douglas Barker Date: Mon, 20 Jul 2026 13:41:43 -0400 Subject: [PATCH 2/9] fix performance-unnecessary-value-param warning --- sdk/test/trace/composable_sampler_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/test/trace/composable_sampler_test.cc b/sdk/test/trace/composable_sampler_test.cc index e5885e7ab7..13a4415393 100644 --- a/sdk/test/trace/composable_sampler_test.cc +++ b/sdk/test/trace/composable_sampler_test.cc @@ -172,7 +172,7 @@ class AnnotatingSampler : public ComposableSampler return attrs; }; intent.trace_state_provider = - [](opentelemetry::nostd::shared_ptr trace_state) { + [](const opentelemetry::nostd::shared_ptr &trace_state) { return trace_state->Set("p", "1"); }; return intent; From e7368717ec0a27c35e56b3adaba7ad5c5bf19484 Mon Sep 17 00:00:00 2001 From: Douglas Barker Date: Mon, 20 Jul 2026 13:42:10 -0400 Subject: [PATCH 3/9] fix performance-enum-size warning --- sdk/test/configuration/yaml_resource_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/test/configuration/yaml_resource_test.cc b/sdk/test/configuration/yaml_resource_test.cc index c5a91b5e7d..8686e15867 100644 --- a/sdk/test/configuration/yaml_resource_test.cc +++ b/sdk/test/configuration/yaml_resource_test.cc @@ -30,7 +30,7 @@ static std::unique_ptr DoParse namespace { -enum class DetectorType +enum class DetectorType : std::uint8_t { kNone, kContainer, From 677662a4ecaf9d8604e4507a68262d379a7c0f06 Mon Sep 17 00:00:00 2001 From: Douglas Barker Date: Mon, 20 Jul 2026 13:42:39 -0400 Subject: [PATCH 4/9] fix modernize-use-nullptr warning --- ext/src/http/client/curl/http_operation_curl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/src/http/client/curl/http_operation_curl.cc b/ext/src/http/client/curl/http_operation_curl.cc index 7a5a5a2f4b..9ee0917b2f 100644 --- a/ext/src/http/client/curl/http_operation_curl.cc +++ b/ext/src/http/client/curl/http_operation_curl.cc @@ -1255,7 +1255,7 @@ CURLcode HttpOperation::Setup() return rc; } - rc = SetCurlStrOption(CURLOPT_POSTFIELDS, NULL); + rc = SetCurlStrOption(CURLOPT_POSTFIELDS, nullptr); if (rc != CURLE_OK) { return rc; From 24edb0a74311feb2b44aea51d0c55f5f0f91db0a Mon Sep 17 00:00:00 2001 From: Douglas Barker Date: Mon, 20 Jul 2026 13:46:09 -0400 Subject: [PATCH 5/9] fix modernize-use-bool-literals warnings --- api/include/opentelemetry/baggage/baggage.h | 6 +++--- examples/http/server.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/include/opentelemetry/baggage/baggage.h b/api/include/opentelemetry/baggage/baggage.h index 0dbf21281a..2ee9f8ec6d 100644 --- a/api/include/opentelemetry/baggage/baggage.h +++ b/api/include/opentelemetry/baggage/baggage.h @@ -142,7 +142,7 @@ class OPENTELEMETRY_EXPORT Baggage value = value.substr(0, metadata_separator); } - bool err = 0; + bool err = false; auto key_str = UrlDecode(common::StringUtil::Trim(key), err); auto value_str = UrlDecode(common::StringUtil::Trim(value), err); @@ -264,7 +264,7 @@ class OPENTELEMETRY_EXPORT Baggage { if (i + 2 >= str.size() || !IsHex(str[i + 1]) || !IsHex(str[i + 2])) { - err = 1; + err = true; return ""; } ret.push_back(static_cast(from_hex(str[i + 1]) << 4 | from_hex(str[i + 2]))); @@ -286,7 +286,7 @@ class OPENTELEMETRY_EXPORT Baggage } else { - err = 1; + err = true; return ""; } } diff --git a/examples/http/server.cc b/examples/http/server.cc index 3452e7a495..267dd20343 100644 --- a/examples/http/server.cc +++ b/examples/http/server.cc @@ -107,7 +107,7 @@ int main(int argc, char *argv[]) Scope scope(root_span); http_server.Start(); std::cout << "Server is running..Press ctrl-c to exit...\n"; - while (1) + while (true) { std::this_thread::sleep_for(std::chrono::seconds(100)); } From eafb00de1b36f8b9f93f8d7b08b3aaedd54e64df Mon Sep 17 00:00:00 2001 From: Douglas Barker Date: Mon, 20 Jul 2026 14:25:16 -0400 Subject: [PATCH 6/9] clean up otlp options member initlaization. review and fix default values --- .../otlp/otlp_grpc_metric_exporter_options.h | 2 +- .../otlp/otlp_http_exporter_options.h | 8 ++++---- .../otlp_http_log_record_exporter_options.h | 8 ++++---- .../otlp/otlp_http_metric_exporter_options.h | 11 ++++++----- .../src/otlp_grpc_metric_exporter_options.cc | 2 -- .../otlp/src/otlp_http_exporter_options.cc | 16 +--------------- .../otlp_http_log_record_exporter_options.cc | 16 +--------------- .../src/otlp_http_metric_exporter_options.cc | 18 +----------------- 8 files changed, 18 insertions(+), 63 deletions(-) diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_options.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_options.h index f5040b7fd5..0ead376fae 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_options.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_options.h @@ -36,7 +36,7 @@ struct OPENTELEMETRY_EXPORT OtlpGrpcMetricExporterOptions : public OtlpGrpcClien /** Preferred Aggregation Temporality. */ PreferredAggregationTemporality aggregation_temporality{ - PreferredAggregationTemporality::kUnspecified}; + PreferredAggregationTemporality::kCumulative}; }; } // namespace otlp diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter_options.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter_options.h index a881161b44..56750015a4 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter_options.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter_options.h @@ -47,7 +47,7 @@ struct OPENTELEMETRY_EXPORT OtlpHttpExporterOptions std::string url; /** HTTP content type. */ - HttpRequestContentType content_type; + HttpRequestContentType content_type{HttpRequestContentType::kBinary}; /** Json byte mapping. @@ -55,7 +55,7 @@ struct OPENTELEMETRY_EXPORT OtlpHttpExporterOptions Used only for HttpRequestContentType::kJson. Convert bytes to hex / base64. */ - JsonBytesMappingKind json_bytes_mapping; + JsonBytesMappingKind json_bytes_mapping{JsonBytesMappingKind::kHexId}; /** Use json names (true) or protobuf field names (false) to set the json key. @@ -73,10 +73,10 @@ struct OPENTELEMETRY_EXPORT OtlpHttpExporterOptions #ifdef ENABLE_ASYNC_EXPORT /** Max number of concurrent requests. */ - std::size_t max_concurrent_requests{}; + std::size_t max_concurrent_requests{64}; /** Max number of requests per connection. */ - std::size_t max_requests_per_connection{}; + std::size_t max_requests_per_connection{8}; #endif /** True do disable SSL. */ diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter_options.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter_options.h index e62057c172..6f176a4fd1 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter_options.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter_options.h @@ -46,7 +46,7 @@ struct OPENTELEMETRY_EXPORT OtlpHttpLogRecordExporterOptions std::string url; /** HTTP content type. */ - HttpRequestContentType content_type; + HttpRequestContentType content_type{HttpRequestContentType::kBinary}; /** Json byte mapping. @@ -54,7 +54,7 @@ struct OPENTELEMETRY_EXPORT OtlpHttpLogRecordExporterOptions Used only for HttpRequestContentType::kJson. Convert bytes to hex / base64. */ - JsonBytesMappingKind json_bytes_mapping; + JsonBytesMappingKind json_bytes_mapping{JsonBytesMappingKind::kHexId}; /** Use json names (true) or protobuf field names (false) to set the json key. @@ -72,10 +72,10 @@ struct OPENTELEMETRY_EXPORT OtlpHttpLogRecordExporterOptions #ifdef ENABLE_ASYNC_EXPORT /** Max number of concurrent requests. */ - std::size_t max_concurrent_requests{}; + std::size_t max_concurrent_requests{64}; /** Max number of requests per connection. */ - std::size_t max_requests_per_connection{}; + std::size_t max_requests_per_connection{8}; #endif /** True do disable SSL. */ diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_metric_exporter_options.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_metric_exporter_options.h index 12a475af99..3d872d638e 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_metric_exporter_options.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_metric_exporter_options.h @@ -47,7 +47,7 @@ struct OPENTELEMETRY_EXPORT OtlpHttpMetricExporterOptions std::string url; /** HTTP content type. */ - HttpRequestContentType content_type; + HttpRequestContentType content_type{HttpRequestContentType::kBinary}; /** Json byte mapping. @@ -55,7 +55,7 @@ struct OPENTELEMETRY_EXPORT OtlpHttpMetricExporterOptions Used only for HttpRequestContentType::kJson. Convert bytes to hex / base64. */ - JsonBytesMappingKind json_bytes_mapping; + JsonBytesMappingKind json_bytes_mapping{JsonBytesMappingKind::kHexId}; /** Use json names (true) or protobuf field names (false) to set the json key. @@ -71,14 +71,15 @@ struct OPENTELEMETRY_EXPORT OtlpHttpMetricExporterOptions /** Additional HTTP headers. */ OtlpHeaders http_headers; - PreferredAggregationTemporality aggregation_temporality{}; + PreferredAggregationTemporality aggregation_temporality{ + PreferredAggregationTemporality::kCumulative}; #ifdef ENABLE_ASYNC_EXPORT /** Max number of concurrent requests. */ - std::size_t max_concurrent_requests{}; + std::size_t max_concurrent_requests{64}; /** Max number of requests per connection. */ - std::size_t max_requests_per_connection{}; + std::size_t max_requests_per_connection{8}; #endif /** True do disable SSL. */ diff --git a/exporters/otlp/src/otlp_grpc_metric_exporter_options.cc b/exporters/otlp/src/otlp_grpc_metric_exporter_options.cc index 540357ff9c..f44a4a22f9 100644 --- a/exporters/otlp/src/otlp_grpc_metric_exporter_options.cc +++ b/exporters/otlp/src/otlp_grpc_metric_exporter_options.cc @@ -16,7 +16,6 @@ namespace otlp { OtlpGrpcMetricExporterOptions::OtlpGrpcMetricExporterOptions() - : aggregation_temporality(PreferredAggregationTemporality::kCumulative) { endpoint = GetOtlpDefaultGrpcMetricsEndpoint(); use_ssl_credentials = !GetOtlpDefaultGrpcMetricsIsInsecure(); /* negation intended. */ @@ -48,7 +47,6 @@ OtlpGrpcMetricExporterOptions::OtlpGrpcMetricExporterOptions() } OtlpGrpcMetricExporterOptions::OtlpGrpcMetricExporterOptions(void *) - : aggregation_temporality(PreferredAggregationTemporality::kCumulative) { use_ssl_credentials = true; max_threads = 0; diff --git a/exporters/otlp/src/otlp_http_exporter_options.cc b/exporters/otlp/src/otlp_http_exporter_options.cc index 2bb925bbfb..05be6a0140 100644 --- a/exporters/otlp/src/otlp_http_exporter_options.cc +++ b/exporters/otlp/src/otlp_http_exporter_options.cc @@ -15,13 +15,8 @@ namespace otlp OtlpHttpExporterOptions::OtlpHttpExporterOptions() : url(GetOtlpDefaultHttpTracesEndpoint()), content_type(GetOtlpHttpProtocolFromString(GetOtlpDefaultHttpTracesProtocol())), - json_bytes_mapping(JsonBytesMappingKind::kHexId), timeout(GetOtlpDefaultTracesTimeout()), http_headers(GetOtlpDefaultTracesHeaders()), -#ifdef ENABLE_ASYNC_EXPORT - max_concurrent_requests{64}, - max_requests_per_connection{8}, -#endif ssl_ca_cert_path(GetOtlpDefaultTracesSslCertificatePath()), ssl_ca_cert_string(GetOtlpDefaultTracesSslCertificateString()), ssl_client_key_path(GetOtlpDefaultTracesSslClientKeyPath()), @@ -39,16 +34,7 @@ OtlpHttpExporterOptions::OtlpHttpExporterOptions() retry_policy_backoff_multiplier(GetOtlpDefaultTracesRetryBackoffMultiplier()) {} -OtlpHttpExporterOptions::OtlpHttpExporterOptions(void *) - : url(), - content_type(HttpRequestContentType::kBinary), - json_bytes_mapping(JsonBytesMappingKind::kHexId) -#ifdef ENABLE_ASYNC_EXPORT - , - max_concurrent_requests{64}, - max_requests_per_connection{8} -#endif -{} +OtlpHttpExporterOptions::OtlpHttpExporterOptions(void *) {} OtlpHttpExporterOptions::~OtlpHttpExporterOptions() {} diff --git a/exporters/otlp/src/otlp_http_log_record_exporter_options.cc b/exporters/otlp/src/otlp_http_log_record_exporter_options.cc index 702a4580fa..9698836976 100644 --- a/exporters/otlp/src/otlp_http_log_record_exporter_options.cc +++ b/exporters/otlp/src/otlp_http_log_record_exporter_options.cc @@ -15,13 +15,8 @@ namespace otlp OtlpHttpLogRecordExporterOptions::OtlpHttpLogRecordExporterOptions() : url(GetOtlpDefaultHttpLogsEndpoint()), content_type(GetOtlpHttpProtocolFromString(GetOtlpDefaultHttpLogsProtocol())), - json_bytes_mapping(JsonBytesMappingKind::kHexId), timeout(GetOtlpDefaultLogsTimeout()), http_headers(GetOtlpDefaultLogsHeaders()), -#ifdef ENABLE_ASYNC_EXPORT - max_concurrent_requests{64}, - max_requests_per_connection{8}, -#endif ssl_ca_cert_path(GetOtlpDefaultLogsSslCertificatePath()), ssl_ca_cert_string(GetOtlpDefaultLogsSslCertificateString()), ssl_client_key_path(GetOtlpDefaultLogsSslClientKeyPath()), @@ -39,16 +34,7 @@ OtlpHttpLogRecordExporterOptions::OtlpHttpLogRecordExporterOptions() retry_policy_backoff_multiplier(GetOtlpDefaultLogsRetryBackoffMultiplier()) {} -OtlpHttpLogRecordExporterOptions::OtlpHttpLogRecordExporterOptions(void *) - : url(), - content_type(exporter::otlp::HttpRequestContentType::kBinary), - json_bytes_mapping(JsonBytesMappingKind::kHexId) -#ifdef ENABLE_ASYNC_EXPORT - , - max_concurrent_requests{64}, - max_requests_per_connection{8} -#endif -{} +OtlpHttpLogRecordExporterOptions::OtlpHttpLogRecordExporterOptions(void *) {} OtlpHttpLogRecordExporterOptions::~OtlpHttpLogRecordExporterOptions() {} diff --git a/exporters/otlp/src/otlp_http_metric_exporter_options.cc b/exporters/otlp/src/otlp_http_metric_exporter_options.cc index d3de263e7a..f9a6513f86 100644 --- a/exporters/otlp/src/otlp_http_metric_exporter_options.cc +++ b/exporters/otlp/src/otlp_http_metric_exporter_options.cc @@ -16,14 +16,8 @@ namespace otlp OtlpHttpMetricExporterOptions::OtlpHttpMetricExporterOptions() : url(GetOtlpDefaultMetricsEndpoint()), content_type(GetOtlpHttpProtocolFromString(GetOtlpDefaultHttpMetricsProtocol())), - json_bytes_mapping(JsonBytesMappingKind::kHexId), timeout(GetOtlpDefaultMetricsTimeout()), http_headers(GetOtlpDefaultMetricsHeaders()), - aggregation_temporality(PreferredAggregationTemporality::kCumulative), -#ifdef ENABLE_ASYNC_EXPORT - max_concurrent_requests{64}, - max_requests_per_connection{8}, -#endif ssl_ca_cert_path(GetOtlpDefaultMetricsSslCertificatePath()), ssl_ca_cert_string(GetOtlpDefaultMetricsSslCertificateString()), ssl_client_key_path(GetOtlpDefaultMetricsSslClientKeyPath()), @@ -41,17 +35,7 @@ OtlpHttpMetricExporterOptions::OtlpHttpMetricExporterOptions() retry_policy_backoff_multiplier(GetOtlpDefaultMetricsRetryBackoffMultiplier()) {} -OtlpHttpMetricExporterOptions::OtlpHttpMetricExporterOptions(void *) - : url(), - content_type(exporter::otlp::HttpRequestContentType::kBinary), - json_bytes_mapping(JsonBytesMappingKind::kHexId), - aggregation_temporality(PreferredAggregationTemporality::kCumulative) -#ifdef ENABLE_ASYNC_EXPORT - , - max_concurrent_requests{64}, - max_requests_per_connection{8} -#endif -{} +OtlpHttpMetricExporterOptions::OtlpHttpMetricExporterOptions(void *) {} OtlpHttpMetricExporterOptions::~OtlpHttpMetricExporterOptions() {} From 3506b1c4f2d99acc9edbae81ea223661c07a4a63 Mon Sep 17 00:00:00 2001 From: Douglas Barker Date: Mon, 20 Jul 2026 17:43:14 -0400 Subject: [PATCH 7/9] update warning limits --- .github/workflows/clang-tidy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clang-tidy.yaml b/.github/workflows/clang-tidy.yaml index 08b66a0699..d667747b93 100644 --- a/.github/workflows/clang-tidy.yaml +++ b/.github/workflows/clang-tidy.yaml @@ -17,9 +17,9 @@ jobs: matrix: include: - cmake_options: all-options-abiv1-preview - warning_limit: 216 + warning_limit: 163 - cmake_options: all-options-abiv2-preview - warning_limit: 226 + warning_limit: 173 env: CC: /usr/bin/clang-22 CXX: /usr/bin/clang++-22 From 5c49dd0669fdc37b9017c3f3a84743a560d3c707 Mon Sep 17 00:00:00 2001 From: Douglas Barker Date: Mon, 20 Jul 2026 17:43:26 -0400 Subject: [PATCH 8/9] fix iwyu warnings --- exporters/otlp/src/otlp_grpc_metric_exporter_options.cc | 1 - exporters/otlp/src/otlp_http_metric_exporter_options.cc | 1 - sdk/test/configuration/yaml_resource_test.cc | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/exporters/otlp/src/otlp_grpc_metric_exporter_options.cc b/exporters/otlp/src/otlp_grpc_metric_exporter_options.cc index f44a4a22f9..1c00faefcd 100644 --- a/exporters/otlp/src/otlp_grpc_metric_exporter_options.cc +++ b/exporters/otlp/src/otlp_grpc_metric_exporter_options.cc @@ -6,7 +6,6 @@ #include "opentelemetry/exporters/otlp/otlp_environment.h" #include "opentelemetry/exporters/otlp/otlp_grpc_metric_exporter_options.h" -#include "opentelemetry/exporters/otlp/otlp_preferred_temporality.h" #include "opentelemetry/version.h" OPENTELEMETRY_BEGIN_NAMESPACE diff --git a/exporters/otlp/src/otlp_http_metric_exporter_options.cc b/exporters/otlp/src/otlp_http_metric_exporter_options.cc index f9a6513f86..9cbac492e3 100644 --- a/exporters/otlp/src/otlp_http_metric_exporter_options.cc +++ b/exporters/otlp/src/otlp_http_metric_exporter_options.cc @@ -4,7 +4,6 @@ #include "opentelemetry/exporters/otlp/otlp_http_metric_exporter_options.h" #include "opentelemetry/exporters/otlp/otlp_environment.h" #include "opentelemetry/exporters/otlp/otlp_http.h" -#include "opentelemetry/exporters/otlp/otlp_preferred_temporality.h" #include "opentelemetry/version.h" OPENTELEMETRY_BEGIN_NAMESPACE diff --git a/sdk/test/configuration/yaml_resource_test.cc b/sdk/test/configuration/yaml_resource_test.cc index 8686e15867..fed0fc7a6f 100644 --- a/sdk/test/configuration/yaml_resource_test.cc +++ b/sdk/test/configuration/yaml_resource_test.cc @@ -3,6 +3,7 @@ #include #include +#include #include #include #include From 16c23984c0450b8da6cf91003940355aa217192c Mon Sep 17 00:00:00 2001 From: Douglas Barker Date: Mon, 20 Jul 2026 21:45:08 +0000 Subject: [PATCH 9/9] add changelog entry --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19e3c1d41a..9db9ca2636 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ Increment the: ## [Unreleased] +* [CODE HEALTH] Fix more clang tidy warnings (member initialization) + [#4270](https://github.com/open-telemetry/opentelemetry-cpp/pull/4270) + * docs: update supported development platforms [#4260](https://github.com/open-telemetry/opentelemetry-cpp/pull/4260)