You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2023/02/08 07:13:38 UTC

[pulsar] branch branch-2.11 updated: [fix][function] Fix invalid metric type `gauge ` (#18129)

This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch branch-2.11
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-2.11 by this push:
     new f7087f0dbd1 [fix][function] Fix invalid metric type `gauge ` (#18129)
f7087f0dbd1 is described below

commit f7087f0dbd168d779aa01fa00c875096b15cfb8f
Author: Cong Zhao <zh...@apache.org>
AuthorDate: Mon Oct 24 13:11:24 2022 +0800

    [fix][function] Fix invalid metric type `gauge ` (#18129)
---
 .../java/org/apache/pulsar/functions/worker/WorkerStatsManager.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/WorkerStatsManager.java b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/WorkerStatsManager.java
index c9b7c1da8db..4c7d28cc70d 100644
--- a/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/WorkerStatsManager.java
+++ b/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/WorkerStatsManager.java
@@ -329,7 +329,8 @@ public class WorkerStatsManager {
     stream.write("# TYPE ");
     stream.write(PULSAR_FUNCTION_WORKER_METRICS_PREFIX);
     stream.write(metricName);
-    stream.write(" gauge \n");
+    stream.write(" gauge");
+    stream.write("\n");
 
     stream.write(PULSAR_FUNCTION_WORKER_METRICS_PREFIX);
     stream.write(metricName);