Prevent empty tag names and values for InfluxDB
Change-Id: Ide0a52d63f5e6385997455e81899f76f8b5a0829 Closes-Bug: #1572631
This commit is contained in:
parent
a8162054ba
commit
76ff4b7dcd
|
@ -169,7 +169,10 @@ function encode_datapoint(name, value, tags)
|
||||||
|
|
||||||
local tags_array = {}
|
local tags_array = {}
|
||||||
for k,v in pairs(tags) do
|
for k,v in pairs(tags) do
|
||||||
table.insert(tags_array, escape_string(k) .. '=' .. escape_string(v))
|
if k ~= '' and v ~= '' then
|
||||||
|
-- empty tag name and value aren't allowed
|
||||||
|
table.insert(tags_array, escape_string(k) .. '=' .. escape_string(v))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- for performance reasons, it is recommended to always send the tags
|
-- for performance reasons, it is recommended to always send the tags
|
||||||
-- in the same order.
|
-- in the same order.
|
||||||
|
|
Loading…
Reference in New Issue