Skip to content

Commit b3e9155

Browse files
committed
Refresh code from PR #2518, to fix review comments.
1 parent 8fd4374 commit b3e9155

7 files changed

+24
-9
lines changed

examples/configuration/custom_log_record_exporter.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class CustomLogRecordExporter : public opentelemetry::sdk::logs::LogRecordExporter
1616
{
1717
public:
18-
CustomLogRecordExporter(const std::string & /* comment */) {}
18+
CustomLogRecordExporter(const std::string &comment) : comment_(comment) {}
1919
CustomLogRecordExporter(CustomLogRecordExporter &&) = delete;
2020
CustomLogRecordExporter(const CustomLogRecordExporter &) = delete;
2121
CustomLogRecordExporter &operator=(CustomLogRecordExporter &&) = delete;
@@ -31,4 +31,7 @@ class CustomLogRecordExporter : public opentelemetry::sdk::logs::LogRecordExport
3131
bool ForceFlush(std::chrono::microseconds timeout) noexcept override;
3232

3333
bool Shutdown(std::chrono::microseconds timeout) noexcept override;
34+
35+
private:
36+
std::string comment_;
3437
};

examples/configuration/custom_log_record_processor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class CustomLogRecordProcessor : public opentelemetry::sdk::logs::LogRecordProcessor
1414
{
1515
public:
16-
CustomLogRecordProcessor(const std::string &comment) : m_comment(comment) {}
16+
CustomLogRecordProcessor(const std::string &comment) : comment_(comment) {}
1717
CustomLogRecordProcessor(CustomLogRecordProcessor &&) = delete;
1818
CustomLogRecordProcessor(const CustomLogRecordProcessor &) = delete;
1919
CustomLogRecordProcessor &operator=(CustomLogRecordProcessor &&) = delete;
@@ -29,5 +29,5 @@ class CustomLogRecordProcessor : public opentelemetry::sdk::logs::LogRecordProce
2929
bool Shutdown(std::chrono::microseconds timeout) noexcept override;
3030

3131
private:
32-
std::string m_comment;
32+
std::string comment_;
3333
};

examples/configuration/custom_pull_metric_exporter.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class CustomPullMetricExporter : public opentelemetry::sdk::metrics::MetricReader
1313
{
1414
public:
15-
CustomPullMetricExporter(const std::string & /* comment */) {}
15+
CustomPullMetricExporter(const std::string &comment) : comment_(comment) {}
1616
CustomPullMetricExporter(CustomPullMetricExporter &&) = delete;
1717
CustomPullMetricExporter(const CustomPullMetricExporter &) = delete;
1818
CustomPullMetricExporter &operator=(CustomPullMetricExporter &&) = delete;
@@ -27,4 +27,7 @@ class CustomPullMetricExporter : public opentelemetry::sdk::metrics::MetricReade
2727
bool OnShutDown(std::chrono::microseconds timeout) noexcept override;
2828

2929
void OnInitialized() noexcept override;
30+
31+
private:
32+
std::string comment_;
3033
};

examples/configuration/custom_push_metric_exporter.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
class CustomPushMetricExporter : public opentelemetry::sdk::metrics::PushMetricExporter
1414
{
1515
public:
16-
CustomPushMetricExporter(const std::string & /* comment */) {}
16+
CustomPushMetricExporter(const std::string &comment) : comment_(comment) {}
1717
CustomPushMetricExporter(CustomPushMetricExporter &&) = delete;
1818
CustomPushMetricExporter(const CustomPushMetricExporter &) = delete;
1919
CustomPushMetricExporter &operator=(CustomPushMetricExporter &&) = delete;
@@ -29,4 +29,7 @@ class CustomPushMetricExporter : public opentelemetry::sdk::metrics::PushMetricE
2929
bool ForceFlush(std::chrono::microseconds timeout) noexcept override;
3030

3131
bool Shutdown(std::chrono::microseconds timeout) noexcept override;
32+
33+
private:
34+
std::string comment_;
3235
};

examples/configuration/custom_sampler.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class CustomSampler : public opentelemetry::sdk::trace::Sampler
1717
{
1818
public:
19-
CustomSampler(const std::string & /* comment */) {}
19+
CustomSampler(const std::string &comment) : comment_(comment) {}
2020
CustomSampler(CustomSampler &&) = delete;
2121
CustomSampler(const CustomSampler &) = delete;
2222
CustomSampler &operator=(CustomSampler &&) = delete;
@@ -32,4 +32,7 @@ class CustomSampler : public opentelemetry::sdk::trace::Sampler
3232
const opentelemetry::trace::SpanContextKeyValueIterable &links) noexcept override;
3333

3434
opentelemetry::nostd::string_view GetDescription() const noexcept override;
35+
36+
private:
37+
std::string comment_;
3538
};

examples/configuration/custom_span_exporter.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class CustomSpanExporter : public opentelemetry::sdk::trace::SpanExporter
1616
{
1717
public:
18-
CustomSpanExporter(const std::string & /* comment */) {}
18+
CustomSpanExporter(const std::string &comment) : comment_(comment) {}
1919
CustomSpanExporter(CustomSpanExporter &&) = delete;
2020
CustomSpanExporter(const CustomSpanExporter &) = delete;
2121
CustomSpanExporter &operator=(CustomSpanExporter &&) = delete;
@@ -31,4 +31,7 @@ class CustomSpanExporter : public opentelemetry::sdk::trace::SpanExporter
3131
bool ForceFlush(std::chrono::microseconds timeout) noexcept override;
3232

3333
bool Shutdown(std::chrono::microseconds timeout) noexcept override;
34+
35+
private:
36+
std::string comment_;
3437
};

examples/configuration/custom_span_processor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
class CustomSpanProcessor : public opentelemetry::sdk::trace::SpanProcessor
1515
{
1616
public:
17-
CustomSpanProcessor(const std::string &comment) : m_comment(comment) {}
17+
CustomSpanProcessor(const std::string &comment) : comment_(comment) {}
1818
CustomSpanProcessor(CustomSpanProcessor &&) = delete;
1919
CustomSpanProcessor(const CustomSpanProcessor &) = delete;
2020
CustomSpanProcessor &operator=(CustomSpanProcessor &&) = delete;
@@ -33,5 +33,5 @@ class CustomSpanProcessor : public opentelemetry::sdk::trace::SpanProcessor
3333
bool Shutdown(std::chrono::microseconds timeout) noexcept override;
3434

3535
private:
36-
std::string m_comment;
36+
std::string comment_;
3737
};

0 commit comments

Comments
 (0)