teach influxpusher that nullptr fields can be ignored - good to programatically not send out some data
parent
2400a166f0
commit
c5a96a3e11
|
@ -40,6 +40,8 @@ void InfluxPusher::addValueObserver(int src, string_view name, const initializer
|
|||
buffer+= " ";
|
||||
bool lefirst=true;
|
||||
for(const auto& v : values) {
|
||||
if(!v.first) // trick to null out certain fields
|
||||
continue;
|
||||
d_numvalues++;
|
||||
if(!lefirst) {
|
||||
buffer +=",";
|
||||
|
@ -102,6 +104,9 @@ void InfluxPusher::addValue(const vector<pair<string,var_t>>& tags, string_view
|
|||
buffer+= " ";
|
||||
bool lefirst=true;
|
||||
for(const auto& v : values) {
|
||||
if(!v.first) // trick to null out certain fields
|
||||
continue;
|
||||
|
||||
d_numvalues++;
|
||||
if(!lefirst) {
|
||||
buffer +=",";
|
||||
|
|
Loading…
Reference in New Issue