This is an automated email from the ASF dual-hosted git repository.
jerrypeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 7b2bf95 For functions metrics in prometheus also remove TYPE (#4081)
7b2bf95 is described below
commit 7b2bf95cbd87515adb679323b05276ae6a335362
Author: Matteo Merli <[email protected]>
AuthorDate: Sat Apr 20 17:44:21 2019 -0700
For functions metrics in prometheus also remove TYPE (#4081)
---
.../instance/stats/PrometheusTextFormat.java | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git
a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/stats/PrometheusTextFormat.java
b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/stats/PrometheusTextFormat.java
index 52d756d..f7a205c 100644
---
a/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/stats/PrometheusTextFormat.java
+++
b/pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/stats/PrometheusTextFormat.java
@@ -37,12 +37,6 @@ public class PrometheusTextFormat {
*/
while (mfs.hasMoreElements()) {
Collector.MetricFamilySamples metricFamilySamples =
mfs.nextElement();
- writer.write("# TYPE ");
- writer.write(metricFamilySamples.name);
- writer.write(' ');
- writer.write(typeString(metricFamilySamples.type));
- writer.write('\n');
-
for (Collector.MetricFamilySamples.Sample sample :
metricFamilySamples.samples) {
writer.write(sample.name);
if (sample.labelNames.size() > 0) {
@@ -66,21 +60,6 @@ public class PrometheusTextFormat {
}
}
- private static String typeString(Collector.Type t) {
- switch (t) {
- case GAUGE:
- return "gauge";
- case COUNTER:
- return "counter";
- case SUMMARY:
- return "summary";
- case HISTOGRAM:
- return "histogram";
- default:
- return "untyped";
- }
- }
-
private static void writeEscapedLabelValue(Writer writer, String s) throws
IOException {
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);