File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,10 @@ int main(int argc, char *argv[]) {
1818 // myMetric is the name of the metric
1919 //
2020 // 1. by copying values
21- Monitoring::Get ().send (10 , " myMetric" );
21+ Monitoring::Get ().send (10 , " myMetricInt" );
22+ Monitoring::Get ().send (10.10 , " myMetricFloat" );
2223
2324 // 2. by creating and moving metric object
24- Monitoring::Get ().send ({10 , " myMetric" });
25+ Monitoring::Get ().send ({10 , " myMetricInt" });
26+ Monitoring::Get ().send ({10.10 , " myMetricFloat" });
2527}
Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ void InfluxDB::send(const Metric& metric)
6262 value.insert (value.begin (), ' "' );
6363 value.insert (value.end (), ' "' );
6464 }
65+
66+ if (metric.getType () == MetricType::INT) {
67+ value.insert (value.end (), ' i' );
68+ }
6569 std::string name = metric.getName ();
6670 escape (name);
6771
You can’t perform that action at this time.
0 commit comments