Skip to content

Commit c7d8784

Browse files
committed
Fix the name of var
1 parent 7b6b1dc commit c7d8784

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exporters/statsd/src/exporter.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,18 @@ opentelemetry::sdk::common::ExportResult Exporter::Export(
148148
void Exporter::SendMetrics(std::string metric_name, MetricsEventType type, ValueType value) noexcept {
149149
std::string message;
150150

151-
std::string value;
151+
std::string value_str;
152152
if (nostd::holds_alternative<int64_t>(value)) {
153-
value = std::to_string(nostd::get<int64_t>(value));
153+
value_str = std::to_string(nostd::get<int64_t>(value));
154154
} else if (nostd::holds_alternative<double>(value)) {
155-
value = std::to_string(nostd::get<double>(value));
155+
value_str = std::to_string(nostd::get<double>(value));
156156
} else {
157157
LOG_ERROR("[Statsd Exporter] SendMetrics - "
158158
"Unsupported value type");
159159
return;
160160
}
161161

162-
message = metric_name + ":" + value + "|" +
162+
message = metric_name + ":" + value_str + "|" +
163163
MetricsEventTypeToString(type);
164164
data_transport_->Send(type, message.c_str(), message.size());
165165
}

0 commit comments

Comments
 (0)