Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/20990 )
Change subject: KUDU-3549 fix WriteAsPrometheus() for non-arithmetic gauges ...................................................................... KUDU-3549 fix WriteAsPrometheus() for non-arithmetic gauges This patch fixes WriteAsPrometheus() implementation for string-based gauges. The original changelist that introduced Prometheus metrics had a proper implementation of WriteAsPrometheus() only for StringGauge, but any FunctionGauge for a non-arithmetic type (e.g., for std::string) would still output a string value in Prometheus text format, and that could not be consumed by Prometheus. The patch also contains a test scenario that would fail without the fix. This is a follow-up to 00efc6826ac9a1f5d10750296c7357790a041fec. Change-Id: Ib7128f52729c7f984004811153a7eecc8ffe751b Reviewed-on: http://gerrit.cloudera.org:8080/20990 Tested-by: Alexey Serbin <[email protected]> Reviewed-by: Marton Greber <[email protected]> Reviewed-by: Attila Bukor <[email protected]> --- M src/kudu/util/metrics-test.cc M src/kudu/util/metrics.cc M src/kudu/util/metrics.h 3 files changed, 90 insertions(+), 63 deletions(-) Approvals: Alexey Serbin: Verified Marton Greber: Looks good to me, approved Attila Bukor: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/20990 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ib7128f52729c7f984004811153a7eecc8ffe751b Gerrit-Change-Number: 20990 Gerrit-PatchSet: 2 Gerrit-Owner: Alexey Serbin <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Yingchun Lai <[email protected]>
