Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/clang-tidy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
matrix:
include:
- cmake_options: all-options-abiv1-preview
warning_limit: 62
warning_limit: 61
- cmake_options: all-options-abiv2-preview
warning_limit: 62
warning_limit: 61
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpFileExporterOptions : public OtlpFileClientOptions
{
OtlpFileExporterOptions();
OtlpFileExporterOptions(const OtlpFileExporterOptions &) = default;
OtlpFileExporterOptions(OtlpFileExporterOptions &&) = default;
OtlpFileExporterOptions &operator=(const OtlpFileExporterOptions &) = default;
OtlpFileExporterOptions &operator=(OtlpFileExporterOptions &&) = default;
~OtlpFileExporterOptions() override;
};

} // namespace otlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpFileLogRecordExporterOptions : public OtlpFileClientOptions
{
OtlpFileLogRecordExporterOptions();
OtlpFileLogRecordExporterOptions(const OtlpFileLogRecordExporterOptions &) = default;
OtlpFileLogRecordExporterOptions(OtlpFileLogRecordExporterOptions &&) = default;
OtlpFileLogRecordExporterOptions &operator=(const OtlpFileLogRecordExporterOptions &) = default;
OtlpFileLogRecordExporterOptions &operator=(OtlpFileLogRecordExporterOptions &&) = default;
~OtlpFileLogRecordExporterOptions() override;
};

} // namespace otlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpFileMetricExporterOptions : public OtlpFileClientOptions
{
OtlpFileMetricExporterOptions();
OtlpFileMetricExporterOptions(const OtlpFileMetricExporterOptions &) = default;
OtlpFileMetricExporterOptions(OtlpFileMetricExporterOptions &&) = default;
OtlpFileMetricExporterOptions &operator=(const OtlpFileMetricExporterOptions &) = default;
OtlpFileMetricExporterOptions &operator=(OtlpFileMetricExporterOptions &&) = default;
~OtlpFileMetricExporterOptions() override;

PreferredAggregationTemporality aggregation_temporality;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,11 @@ class OtlpGrpcClient
{
public:
OtlpGrpcClient(const OtlpGrpcClientOptions &options);

~OtlpGrpcClient();
OtlpGrpcClient(const OtlpGrpcClient &) = delete;
OtlpGrpcClient(OtlpGrpcClient &&) = delete;
OtlpGrpcClient &operator=(const OtlpGrpcClient &) = delete;
OtlpGrpcClient &operator=(OtlpGrpcClient &&) = delete;

static std::string GetGrpcTarget(const std::string &endpoint);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,18 @@ namespace otlp

struct OtlpGrpcClientOptions
{
virtual ~OtlpGrpcClientOptions() = default;
OtlpGrpcClientOptions() = default;
OtlpGrpcClientOptions(const OtlpGrpcClientOptions &) = default;
OtlpGrpcClientOptions(OtlpGrpcClientOptions &&) = default;
OtlpGrpcClientOptions &operator=(const OtlpGrpcClientOptions &) = default;
OtlpGrpcClientOptions &operator=(OtlpGrpcClientOptions &&) = default;

/** The endpoint to export to. */
std::string endpoint;

/** Use SSL. */
bool use_ssl_credentials;
bool use_ssl_credentials{};

/** CA CERT, path to a file. */
std::string ssl_credentials_cacert_path;
Expand Down Expand Up @@ -64,14 +71,14 @@ struct OtlpGrpcClientOptions
std::string user_agent;

/** max number of threads that can be allocated from this */
std::size_t max_threads;
std::size_t max_threads{};

/** Compression type. */
std::string compression;

#ifdef ENABLE_ASYNC_EXPORT
// Concurrent requests
std::size_t max_concurrent_requests;
std::size_t max_concurrent_requests{};
#endif

/** The maximum number of call attempts, including the original attempt. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ class OtlpGrpcExporter final : public opentelemetry::sdk::trace::SpanExporter
explicit OtlpGrpcExporter(const OtlpGrpcExporterOptions &options);

~OtlpGrpcExporter() override;
OtlpGrpcExporter(const OtlpGrpcExporter &) = delete;
OtlpGrpcExporter(OtlpGrpcExporter &&) = delete;
OtlpGrpcExporter &operator=(const OtlpGrpcExporter &) = delete;
OtlpGrpcExporter &operator=(OtlpGrpcExporter &&) = delete;

/**
* Create a span recordable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpGrpcExporterOptions : public OtlpGrpcClientOptions
{
OtlpGrpcExporterOptions();
~OtlpGrpcExporterOptions();
OtlpGrpcExporterOptions(const OtlpGrpcExporterOptions &) = default;
OtlpGrpcExporterOptions(OtlpGrpcExporterOptions &&) = default;
OtlpGrpcExporterOptions &operator=(const OtlpGrpcExporterOptions &) = default;
OtlpGrpcExporterOptions &operator=(OtlpGrpcExporterOptions &&) = default;
~OtlpGrpcExporterOptions() override;
};

} // namespace otlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ class OtlpGrpcLogRecordExporter : public opentelemetry::sdk::logs::LogRecordExpo
OtlpGrpcLogRecordExporter(const OtlpGrpcLogRecordExporterOptions &options);

~OtlpGrpcLogRecordExporter() override;
OtlpGrpcLogRecordExporter(const OtlpGrpcLogRecordExporter &) = delete;
OtlpGrpcLogRecordExporter(OtlpGrpcLogRecordExporter &&) = delete;
OtlpGrpcLogRecordExporter &operator=(const OtlpGrpcLogRecordExporter &) = delete;
OtlpGrpcLogRecordExporter &operator=(OtlpGrpcLogRecordExporter &&) = delete;

/**
* Creates a recordable that stores the data in protobuf.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpGrpcLogRecordExporterOptions : public OtlpGrpcClientOptions
{
OtlpGrpcLogRecordExporterOptions();
~OtlpGrpcLogRecordExporterOptions();
OtlpGrpcLogRecordExporterOptions(const OtlpGrpcLogRecordExporterOptions &) = default;
OtlpGrpcLogRecordExporterOptions(OtlpGrpcLogRecordExporterOptions &&) = default;
OtlpGrpcLogRecordExporterOptions &operator=(const OtlpGrpcLogRecordExporterOptions &) = default;
OtlpGrpcLogRecordExporterOptions &operator=(OtlpGrpcLogRecordExporterOptions &&) = default;
~OtlpGrpcLogRecordExporterOptions() override;
};

} // namespace otlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ class OtlpGrpcMetricExporter : public opentelemetry::sdk::metrics::PushMetricExp
explicit OtlpGrpcMetricExporter(const OtlpGrpcMetricExporterOptions &options);

~OtlpGrpcMetricExporter() override;
OtlpGrpcMetricExporter(const OtlpGrpcMetricExporter &) = delete;
OtlpGrpcMetricExporter(OtlpGrpcMetricExporter &&) = delete;
OtlpGrpcMetricExporter &operator=(const OtlpGrpcMetricExporter &) = delete;
OtlpGrpcMetricExporter &operator=(OtlpGrpcMetricExporter &&) = delete;

/**
* Get the AggregationTemporality for exporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpGrpcMetricExporterOptions : public OtlpGrpcClientOptions
{
OtlpGrpcMetricExporterOptions();
~OtlpGrpcMetricExporterOptions();
OtlpGrpcMetricExporterOptions(const OtlpGrpcMetricExporterOptions &) = default;
OtlpGrpcMetricExporterOptions(OtlpGrpcMetricExporterOptions &&) = default;
OtlpGrpcMetricExporterOptions &operator=(const OtlpGrpcMetricExporterOptions &) = default;
OtlpGrpcMetricExporterOptions &operator=(OtlpGrpcMetricExporterOptions &&) = default;
~OtlpGrpcMetricExporterOptions() override;

/** Preferred Aggregation Temporality. */
PreferredAggregationTemporality aggregation_temporality;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ class OtlpHttpClient
explicit OtlpHttpClient(OtlpHttpClientOptions &&options);

~OtlpHttpClient();
OtlpHttpClient(const OtlpHttpClient &) = delete;
OtlpHttpClient &operator=(const OtlpHttpClient &) = delete;
OtlpHttpClient(OtlpHttpClient &&) = delete;
OtlpHttpClient &operator=(OtlpHttpClient &&) = delete;

/**
* Sync export
Expand Down Expand Up @@ -230,28 +234,13 @@ class OtlpHttpClient
std::shared_ptr<opentelemetry::ext::http::client::Session> session;
std::shared_ptr<opentelemetry::ext::http::client::EventHandler> event_handle;

inline HttpSessionData() = default;
HttpSessionData() = default;

inline explicit HttpSessionData(
explicit HttpSessionData(
std::shared_ptr<opentelemetry::ext::http::client::Session> &&input_session,
std::shared_ptr<opentelemetry::ext::http::client::EventHandler> &&input_handle)
{
session.swap(input_session);
event_handle.swap(input_handle);
}

inline HttpSessionData(HttpSessionData &&other)
{
session.swap(other.session);
event_handle.swap(other.event_handle);
}

inline HttpSessionData &operator=(HttpSessionData &&other) noexcept
{
session.swap(other.session);
event_handle.swap(other.event_handle);
return *this;
}
: session(std::move(input_session)), event_handle(std::move(input_handle))
{}
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpHttpExporterOptions
{
OtlpHttpExporterOptions();
OtlpHttpExporterOptions(const OtlpHttpExporterOptions &) = default;
OtlpHttpExporterOptions(OtlpHttpExporterOptions &&) = default;
OtlpHttpExporterOptions &operator=(const OtlpHttpExporterOptions &) = default;
OtlpHttpExporterOptions &operator=(OtlpHttpExporterOptions &&) = default;
~OtlpHttpExporterOptions();

/** The endpoint to export to. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ namespace otlp
*/
struct OPENTELEMETRY_EXPORT OtlpHttpExporterRuntimeOptions
{
OtlpHttpExporterRuntimeOptions() = default;
~OtlpHttpExporterRuntimeOptions() = default;
OtlpHttpExporterRuntimeOptions() = default;

std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
std::shared_ptr<sdk::common::ThreadInstrumentation>(nullptr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpHttpLogRecordExporterOptions
{
OtlpHttpLogRecordExporterOptions();
OtlpHttpLogRecordExporterOptions(const OtlpHttpLogRecordExporterOptions &) = default;
OtlpHttpLogRecordExporterOptions(OtlpHttpLogRecordExporterOptions &&) = default;
OtlpHttpLogRecordExporterOptions &operator=(const OtlpHttpLogRecordExporterOptions &) = default;
OtlpHttpLogRecordExporterOptions &operator=(OtlpHttpLogRecordExporterOptions &&) = default;
~OtlpHttpLogRecordExporterOptions();

/** The endpoint to export to. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ namespace otlp
*/
struct OPENTELEMETRY_EXPORT OtlpHttpLogRecordExporterRuntimeOptions
{
OtlpHttpLogRecordExporterRuntimeOptions() = default;
~OtlpHttpLogRecordExporterRuntimeOptions() = default;
OtlpHttpLogRecordExporterRuntimeOptions() = default;

std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
std::shared_ptr<sdk::common::ThreadInstrumentation>(nullptr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class OtlpHttpMetricExporter final : public opentelemetry::sdk::metrics::PushMet
OtlpHttpMetricExporterRuntimeOptions runtime_options_;

// Aggregation Temporality Selector
const sdk::metrics::AggregationTemporalitySelector aggregation_temporality_selector_;
sdk::metrics::AggregationTemporalitySelector aggregation_temporality_selector_;

// Object that stores the HTTP sessions that have been created
std::unique_ptr<OtlpHttpClient> http_client_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpHttpMetricExporterOptions
{
OtlpHttpMetricExporterOptions();
OtlpHttpMetricExporterOptions(const OtlpHttpMetricExporterOptions &) = default;
OtlpHttpMetricExporterOptions(OtlpHttpMetricExporterOptions &&) = default;
OtlpHttpMetricExporterOptions &operator=(const OtlpHttpMetricExporterOptions &) = default;
OtlpHttpMetricExporterOptions &operator=(OtlpHttpMetricExporterOptions &&) = default;
~OtlpHttpMetricExporterOptions();

/** The endpoint to export to. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ namespace otlp
*/
struct OPENTELEMETRY_EXPORT OtlpHttpMetricExporterRuntimeOptions
{
OtlpHttpMetricExporterRuntimeOptions() = default;
~OtlpHttpMetricExporterRuntimeOptions() = default;
OtlpHttpMetricExporterRuntimeOptions() = default;

std::shared_ptr<sdk::common::ThreadInstrumentation> thread_instrumentation =
std::shared_ptr<sdk::common::ThreadInstrumentation>(nullptr);
Expand Down
2 changes: 2 additions & 0 deletions exporters/otlp/src/otlp_file_exporter_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ OtlpFileExporterOptions::OtlpFileExporterOptions()
backend_options = fs_options;
}

OtlpFileExporterOptions::~OtlpFileExporterOptions() {}

} // namespace otlp
} // namespace exporter
OPENTELEMETRY_END_NAMESPACE
2 changes: 2 additions & 0 deletions exporters/otlp/src/otlp_file_log_record_exporter_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ OtlpFileLogRecordExporterOptions::OtlpFileLogRecordExporterOptions()
backend_options = fs_options;
}

OtlpFileLogRecordExporterOptions::~OtlpFileLogRecordExporterOptions() {}

} // namespace otlp
} // namespace exporter
OPENTELEMETRY_END_NAMESPACE
2 changes: 2 additions & 0 deletions exporters/otlp/src/otlp_file_metric_exporter_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ OtlpFileMetricExporterOptions::OtlpFileMetricExporterOptions()
backend_options = fs_options;
}

OtlpFileMetricExporterOptions::~OtlpFileMetricExporterOptions() {}

} // namespace otlp
} // namespace exporter
OPENTELEMETRY_END_NAMESPACE
2 changes: 1 addition & 1 deletion exporters/otlp/src/otlp_grpc_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static sdk::common::ExportResult InternalDelegateAsyncExport(
stub->experimental_async()
# endif
->Export(call_data->grpc_context.get(), call_data->request, call_data->response,
[call_data, async_data, export_data_name](::grpc::Status grpc_status) {
[call_data, async_data, export_data_name](const ::grpc::Status &grpc_status) {
{
std::lock_guard<std::mutex> lock{async_data->running_calls_lock};
async_data->running_calls.erase(
Expand Down
Loading