Skip to content

Commit

Permalink
cleanup initializers in structs
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalff committed Nov 27, 2024
1 parent b594ee0 commit 88bd0bf
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ struct OtlpHttpClientOptions
// User agent
std::string user_agent;

std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation;
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
std::shared_ptr<sdk::common::ThreadInstrumentation>{};

inline OtlpHttpClientOptions(
nostd::string_view input_url,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ struct OPENTELEMETRY_EXPORT OtlpHttpExporterOptions
/** Compression type. */
std::string compression;

std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation;
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
};

} // namespace otlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ struct OPENTELEMETRY_EXPORT OtlpHttpLogRecordExporterOptions
/** Compression type. */
std::string compression;

std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation;
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
};

} // namespace otlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ struct OPENTELEMETRY_EXPORT OtlpHttpMetricExporterOptions
/** Compression type. */
std::string compression;

std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation;
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
};

} // namespace otlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ struct BatchLogRecordProcessorOptions
*/
size_t max_export_batch_size = 512;

std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation;
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
std::shared_ptr<sdk::common::ThreadInstrumentation>
{}
};

} // namespace logs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ struct PeriodicExportingMetricReaderOptions
/* how long the export can run before it is cancelled. */
std::chrono::milliseconds export_timeout_millis = std::chrono::milliseconds(kExportTimeOutMillis);

std::shared_ptr<sdk::common::ThreadInstrumentation> periodic_thread_instrumentation;
std::shared_ptr<sdk::common::ThreadInstrumentation> collect_thread_instrumentation;
std::shared_ptr<sdk::common::ThreadInstrumentation> periodic_thread_instrumentation =
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
std::shared_ptr<sdk::common::ThreadInstrumentation> collect_thread_instrumentation =
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
};

} // namespace metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ struct BatchSpanProcessorOptions
*/
size_t max_export_batch_size = 512;

std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation;
std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
std::shared_ptr<sdk::common::ThreadInstrumentation>{};
};

} // namespace trace
Expand Down

0 comments on commit 88bd0bf

Please sign in to comment.