Modify KvToString() Method in Instrument.h to Allow Valid Label Names in Records For Prometheus#298
Conversation
… allows for Prometheus to Collect() on records correctly
Codecov Report
@@ Coverage Diff @@
## master #298 +/- ##
==========================================
- Coverage 94.60% 94.59% -0.01%
==========================================
Files 146 146
Lines 6633 6629 -4
==========================================
- Hits 6275 6271 -4
Misses 358 358
|
|
The Bazel on MacOS test seems to be failing due to a missing dependency in zpages; not sure if this is related to this PR or not. |
|
@ankit-bhargava @Brandon-Kimberly Do you two have any insight on why a double quote character is needed in a label name? I'm not sure if I'm missing something in the specification or if there's another reason for this |
Ankit implemented the function but as far as I am aware there is no reason for it to be there. I imagine it was just added because it makes it look nicer when exported to stdout. But again, I'm not sure if there is a reason for it. |
update the INSTALL doc to referece the trace target instead of the in…
This PR is in reference to issue #297 and changes the
KvToString()method in Instrument.h. Additionally, there are changes to theprint_value()method becauseKvToString()calls this method for translating a label’s value. Finally, the booleanjsonTypesparameter inprint_value()is left unused; this PR does not remove it, though it does not see use anywhere else and has been left in as a precautionary measure.cc @alolita, @reyang, @pyohannes