Skip to content

Commit 9adef62

Browse files
authored
Allow adding per metrics tags in sendGrouped (#180)
1 parent 0994e0b commit 9adef62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Backends/InfluxDB.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ void InfluxDB::sendMultiple(std::string measurement, std::vector<Metric>&& metri
6767
{
6868
escape(measurement);
6969
std::stringstream convert;
70-
convert << measurement << "," << tagSet << " ";
70+
convert << measurement << "," << tagSet;
71+
for (const auto& [key, value] : metrics.front().getTags()) {
72+
convert << "," << tags::TAG_KEY[key] << "=" << tags::GetValue(value);
73+
}
74+
convert << " ";
7175

7276
for (const auto& metric : metrics) {
7377
convert << metric.getName() << "=";

0 commit comments

Comments
 (0)