Skip to content

Commit 88bd0bf

Browse files
committed
cleanup initializers in structs
1 parent b594ee0 commit 88bd0bf

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ struct OtlpHttpClientOptions
8484
// User agent
8585
std::string user_agent;
8686

87-
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation;
87+
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
88+
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
8889

8990
inline OtlpHttpClientOptions(
9091
nostd::string_view input_url,

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ struct OPENTELEMETRY_EXPORT OtlpHttpExporterOptions
104104
/** Compression type. */
105105
std::string compression;
106106

107-
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation;
107+
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
108+
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
108109
};
109110

110111
} // namespace otlp

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ struct OPENTELEMETRY_EXPORT OtlpHttpLogRecordExporterOptions
104104
/** Compression type. */
105105
std::string compression;
106106

107-
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation;
107+
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
108+
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
108109
};
109110

110111
} // namespace otlp

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ struct OPENTELEMETRY_EXPORT OtlpHttpMetricExporterOptions
107107
/** Compression type. */
108108
std::string compression;
109109

110-
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation;
110+
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
111+
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
111112
};
112113

113114
} // namespace otlp

sdk/include/opentelemetry/sdk/logs/batch_log_record_processor_options.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ struct BatchLogRecordProcessorOptions
3636
*/
3737
size_t max_export_batch_size = 512;
3838

39-
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation;
39+
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
40+
std::shared_ptr<sdk::common::ThreadInstrumentation>
41+
{}
4042
};
4143

4244
} // namespace logs

sdk/include/opentelemetry/sdk/metrics/export/periodic_exporting_metric_reader_options.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ struct PeriodicExportingMetricReaderOptions
3030
/* how long the export can run before it is cancelled. */
3131
std::chrono::milliseconds export_timeout_millis = std::chrono::milliseconds(kExportTimeOutMillis);
3232

33-
std::shared_ptr<sdk::common::ThreadInstrumentation> periodic_thread_instrumentation;
34-
std::shared_ptr<sdk::common::ThreadInstrumentation> collect_thread_instrumentation;
33+
std::shared_ptr<sdk::common::ThreadInstrumentation> periodic_thread_instrumentation =
34+
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
35+
std::shared_ptr<sdk::common::ThreadInstrumentation> collect_thread_instrumentation =
36+
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
3537
};
3638

3739
} // namespace metrics

sdk/include/opentelemetry/sdk/trace/batch_span_processor_options.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ struct BatchSpanProcessorOptions
3535
*/
3636
size_t max_export_batch_size = 512;
3737

38-
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation;
38+
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
39+
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
3940
};
4041

4142
} // namespace trace

0 commit comments

Comments
 (0)