bool is subclass of int and will match against a check in
utils.is_numeric(). This commit checks if v is bool before anything
else, so we catch it early.
Previous behaviour was that jolokia tried to send True for booleans as
a value to opentsdb, which isn't allowed, and caused
java.lang.NumberFormatException: For input string: "True" in
application logs.
Piggy-backing another fix into this PR to fix invalid metric names generated from jolokia. No use in having separate PRs as this one hasn't been reviewed yet anyway.
bool is subclass of int and will match against a check in
utils.is_numeric()
. This commit checks ifv
is bool before anything else, so we catch it early.Previous behaviour was that jolokia tried to send
True
for booleans as a value to opentsdb, which isn't allowed, and causedjava.lang.NumberFormatException: For input string: "True"
in application logs.