Skip to content

Commit 251bb5a

Browse files
authored
Fix sending tags over Kafka (#163)
1 parent 54612ba commit 251bb5a

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/Backends/Kafka.cxx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,7 @@ void Kafka::send(const Metric& metric)
7777

7878
void Kafka::addGlobalTag(std::string_view name, std::string_view value)
7979
{
80-
std::string sName = name.data();
81-
std::string sValue = value.data();
82-
if (!tagSet.empty())
83-
tagSet += ",";
84-
tagSet += sName + "=" + sValue;
80+
mInfluxDB.addGlobalTag(name, value);
8581
}
8682

8783
} // namespace backends

src/Backends/Kafka.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ class Kafka final : public Backend
5959

6060
private:
6161
RdKafka::Producer* producer; ///< Kafka producer instance
62-
std::string tagSet; ///< Global tagset (common for each metric)
6362
InfluxDB mInfluxDB; ///< InfluxDB instance
6463
std::string mTopic; ///< Kafka topic
6564
};

0 commit comments

Comments
 (0)