Skip to content

Commit

Permalink
Allow adding per metrics tags in sendGrouped (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
awegrzyn authored Mar 24, 2020
1 parent 0994e0b commit 9adef62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Backends/InfluxDB.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ void InfluxDB::sendMultiple(std::string measurement, std::vector<Metric>&& metri
{
escape(measurement);
std::stringstream convert;
convert << measurement << "," << tagSet << " ";
convert << measurement << "," << tagSet;
for (const auto& [key, value] : metrics.front().getTags()) {
convert << "," << tags::TAG_KEY[key] << "=" << tags::GetValue(value);
}
convert << " ";

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

0 comments on commit 9adef62

Please sign in to comment.