Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
|
62ba4dea5b |
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -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. */
|
||||
|
|
|
@ -58,6 +58,10 @@ public:
|
|||
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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -57,6 +57,10 @@ public:
|
|||
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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -55,6 +55,10 @@ public:
|
|||
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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -159,6 +159,10 @@ public:
|
|||
explicit OtlpHttpClient(OtlpHttpClientOptions &&options);
|
||||
|
||||
~OtlpHttpClient();
|
||||
OtlpHttpClient(const OtlpHttpClient &) = delete;
|
||||
OtlpHttpClient &operator=(const OtlpHttpClient &) = delete;
|
||||
OtlpHttpClient(OtlpHttpClient &&) = delete;
|
||||
OtlpHttpClient &operator=(OtlpHttpClient &&) = delete;
|
||||
|
||||
/**
|
||||
* Sync export
|
||||
|
@ -230,28 +234,13 @@ private:
|
|||
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))
|
||||
{}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -72,7 +72,7 @@ private:
|
|||
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_;
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -27,6 +27,8 @@ OtlpFileExporterOptions::OtlpFileExporterOptions()
|
|||
backend_options = fs_options;
|
||||
}
|
||||
|
||||
OtlpFileExporterOptions::~OtlpFileExporterOptions() {}
|
||||
|
||||
} // namespace otlp
|
||||
} // namespace exporter
|
||||
OPENTELEMETRY_END_NAMESPACE
|
||||
|
|
|
@ -27,6 +27,8 @@ OtlpFileLogRecordExporterOptions::OtlpFileLogRecordExporterOptions()
|
|||
backend_options = fs_options;
|
||||
}
|
||||
|
||||
OtlpFileLogRecordExporterOptions::~OtlpFileLogRecordExporterOptions() {}
|
||||
|
||||
} // namespace otlp
|
||||
} // namespace exporter
|
||||
OPENTELEMETRY_END_NAMESPACE
|
||||
|
|
|
@ -28,6 +28,8 @@ OtlpFileMetricExporterOptions::OtlpFileMetricExporterOptions()
|
|||
backend_options = fs_options;
|
||||
}
|
||||
|
||||
OtlpFileMetricExporterOptions::~OtlpFileMetricExporterOptions() {}
|
||||
|
||||
} // namespace otlp
|
||||
} // namespace exporter
|
||||
OPENTELEMETRY_END_NAMESPACE
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue