[ https://issues.apache.org/jira/browse/KUDU-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17814875#comment-17814875 ]
ASF subversion and git services commented on KUDU-3549: ------------------------------------------------------- Commit 6b1c1eb0c97a2349e0b3fa098bf40f8147b43a60 in kudu's branch refs/heads/master from Alexey Serbin [ https://gitbox.apache.org/repos/asf?p=kudu.git;h=6b1c1eb0c ] 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 <ale...@apache.org> Reviewed-by: Marton Greber <greber...@gmail.com> Reviewed-by: Attila Bukor <abu...@apache.org> > String gauge exposed in prometheus format > ----------------------------------------- > > Key: KUDU-3549 > URL: https://issues.apache.org/jira/browse/KUDU-3549 > Project: Kudu > Issue Type: Bug > Components: metrics > Affects Versions: 1.17.0 > Reporter: YUBI LEE > Assignee: Alexey Serbin > Priority: Major > > According to KUDU-3375, "Kudu now exposes all its metrics except for string > gauges in Prometheus format via the embedded webserver's > `/metrics_prometheus` endpoint". > > * > [https://github.com/apache/kudu/blob/89e2715faf96afe0b67482166fda9c8699e8052f/docs/prior_release_notes.adoc?plain=1#L143-L145] > * https://issues.apache.org/jira/browse/KUDU-3375 > > However, with this commit > ([https://github.com/apache/kudu/commit/e65ea38a4860c007d93ada9c991bccec903a80b1)] > , string gauge related to clock_ntp_status is exposed. > > {code:java} > # HELP kudu_master_clock_ntp_status Output of ntp_adjtime()/ntp_gettime() > kernel API call > # TYPE kudu_master_clock_ntp_status gauge > kudu_master_clock_ntp_status{unit_type="state"} now:1706665936956760 > maxerror:70013 status:ok {code} > It prevents prometheus operators from collecting prometheus metrics for kudu. -- This message was sent by Atlassian Jira (v8.20.10#820010)