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
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ class OtlpFileClient
OtlpFileClientRuntimeOptions &&runtime_options);

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

/**
* Sync export
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct OtlpFileClientFileSystemOptions
// Maximum file count
std::size_t rotate_size = 3;

inline OtlpFileClientFileSystemOptions() noexcept {}
OtlpFileClientFileSystemOptions() = default;
};

/**
Expand All @@ -77,7 +77,12 @@ struct OtlpFileClientFileSystemOptions
class OtlpFileAppender
{
public:
virtual ~OtlpFileAppender() = default;
OtlpFileAppender() = default;
virtual ~OtlpFileAppender() = default;
OtlpFileAppender(const OtlpFileAppender &) = default;
OtlpFileAppender &operator=(const OtlpFileAppender &) = default;
OtlpFileAppender(OtlpFileAppender &&) = default;
OtlpFileAppender &operator=(OtlpFileAppender &&) = default;

virtual void Export(opentelemetry::nostd::string_view data, std::size_t record_count) = 0;

Expand All @@ -96,12 +101,17 @@ using OtlpFileClientBackendOptions =
*/
struct OtlpFileClientOptions
{
OtlpFileClientOptions() = default;
virtual ~OtlpFileClientOptions() = default;
OtlpFileClientOptions(const OtlpFileClientOptions &) = default;
OtlpFileClientOptions &operator=(const OtlpFileClientOptions &) = default;
OtlpFileClientOptions(OtlpFileClientOptions &&) = default;
OtlpFileClientOptions &operator=(OtlpFileClientOptions &&) = default;

// Whether to print the status of the FILE client in the console
bool console_debug = false;

OtlpFileClientBackendOptions backend_options;

inline OtlpFileClientOptions() noexcept {}
};
} // namespace otlp
} // namespace exporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ namespace otlp
*/
struct OtlpFileClientRuntimeOptions
{
OtlpFileClientRuntimeOptions() = default;
virtual ~OtlpFileClientRuntimeOptions() = default;
OtlpFileClientRuntimeOptions(const OtlpFileClientRuntimeOptions &) = default;
OtlpFileClientRuntimeOptions &operator=(const OtlpFileClientRuntimeOptions &) = default;
OtlpFileClientRuntimeOptions(OtlpFileClientRuntimeOptions &&) = default;
OtlpFileClientRuntimeOptions &operator=(OtlpFileClientRuntimeOptions &&) = 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 @@ -76,9 +76,9 @@ class OPENTELEMETRY_EXPORT OtlpFileExporter final : public opentelemetry::sdk::t

private:
// The configuration options associated with this exporter.
const OtlpFileExporterOptions options_;
OtlpFileExporterOptions options_;
// The runtime options associated with this exporter.
const OtlpFileExporterRuntimeOptions runtime_options_;
OtlpFileExporterRuntimeOptions runtime_options_;

// Object that stores the file context.
std::unique_ptr<OtlpFileClient> file_client_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpFileExporterOptions : public OtlpFileClientOptions
{
OtlpFileExporterOptions();
~OtlpFileExporterOptions();
};

} // namespace otlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ namespace otlp
*/
struct OPENTELEMETRY_EXPORT OtlpFileExporterRuntimeOptions : public OtlpFileClientRuntimeOptions
{
OtlpFileExporterRuntimeOptions() = default;
~OtlpFileExporterRuntimeOptions() = default;
OtlpFileExporterRuntimeOptions() = default;
};

} // namespace otlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ class OtlpFileLogRecordExporter final : public opentelemetry::sdk::logs::LogReco

private:
// Configuration options for the exporter
const OtlpFileLogRecordExporterOptions options_;
OtlpFileLogRecordExporterOptions options_;
// Runtime options for the exporter
const OtlpFileLogRecordExporterRuntimeOptions runtime_options_;
OtlpFileLogRecordExporterRuntimeOptions runtime_options_;

// Object that stores the file context.
std::unique_ptr<OtlpFileClient> file_client_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpFileLogRecordExporterOptions : public OtlpFileClientOptions
{
OtlpFileLogRecordExporterOptions();
~OtlpFileLogRecordExporterOptions();
};

} // namespace otlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpFileLogRecordExporterRuntimeOptions
: public OtlpFileClientRuntimeOptions
{
OtlpFileLogRecordExporterRuntimeOptions() = default;
~OtlpFileLogRecordExporterRuntimeOptions() = default;
OtlpFileLogRecordExporterRuntimeOptions() = default;
};

} // namespace otlp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ class OtlpFileMetricExporter final : public opentelemetry::sdk::metrics::PushMet
friend class OtlpFileMetricExporterTestPeer;

// Configuration options for the exporter
const OtlpFileMetricExporterOptions options_;
OtlpFileMetricExporterOptions options_;
// Runtime options for the exporter
const OtlpFileMetricExporterRuntimeOptions runtime_options_;
OtlpFileMetricExporterRuntimeOptions runtime_options_;

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

// Object that stores the file context.
std::unique_ptr<OtlpFileClient> file_client_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpFileMetricExporterOptions : public OtlpFileClientOptions
{
OtlpFileMetricExporterOptions();
~OtlpFileMetricExporterOptions();

PreferredAggregationTemporality aggregation_temporality;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ namespace otlp
struct OPENTELEMETRY_EXPORT OtlpFileMetricExporterRuntimeOptions
: public OtlpFileClientRuntimeOptions
{
OtlpFileMetricExporterRuntimeOptions() = default;
~OtlpFileMetricExporterRuntimeOptions() = default;
OtlpFileMetricExporterRuntimeOptions() = default;
};

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

OtlpFileExporterOptions::~OtlpFileExporterOptions() {}

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

OtlpFileLogRecordExporterOptions::~OtlpFileLogRecordExporterOptions() {}

} // namespace otlp
} // namespace exporter
OPENTELEMETRY_END_NAMESPACE
5 changes: 3 additions & 2 deletions exporters/otlp/src/otlp_file_metric_exporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ OtlpFileMetricExporter::OtlpFileMetricExporter(
runtime_options_(runtime_options),
aggregation_temporality_selector_{
OtlpMetricUtils::ChooseTemporalitySelector(options_.aggregation_temporality)},
file_client_(new OtlpFileClient(OtlpFileClientOptions(options),
OtlpFileClientRuntimeOptions(runtime_options)))
file_client_(new OtlpFileClient(
OtlpFileClientOptions(static_cast<const OtlpFileClientOptions &>(options)),
OtlpFileClientRuntimeOptions(runtime_options)))
{}

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

OtlpFileMetricExporterOptions::~OtlpFileMetricExporterOptions() {}

} // namespace otlp
} // namespace exporter
OPENTELEMETRY_END_NAMESPACE
Loading