This is an automated email from the ASF dual-hosted git repository.
harshitha pushed a commit to branch harshithasudhakar-eventmesh#4254
in repository https://gitbox.apache.org/repos/asf/eventmesh.git
The following commit(s) were added to
refs/heads/harshithasudhakar-eventmesh#4254 by this push:
new f05a339de Update PrometheusExporterUtils.java
f05a339de is described below
commit f05a339ded63a960384085b1bd34df2945479259
Author: Harshitha Sudhakar
<[email protected]>
AuthorDate: Mon Aug 21 14:51:07 2023 +0530
Update PrometheusExporterUtils.java
---
.../eventmesh/metrics/prometheus/utils/PrometheusExporterUtils.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/eventmesh-metrics-plugin/eventmesh-metrics-prometheus/src/main/java/org/apache/eventmesh/metrics/prometheus/utils/PrometheusExporterUtils.java
b/eventmesh-metrics-plugin/eventmesh-metrics-prometheus/src/main/java/org/apache/eventmesh/metrics/prometheus/utils/PrometheusExporterUtils.java
index e387e0d2f..cf997829f 100644
---
a/eventmesh-metrics-plugin/eventmesh-metrics-prometheus/src/main/java/org/apache/eventmesh/metrics/prometheus/utils/PrometheusExporterUtils.java
+++
b/eventmesh-metrics-plugin/eventmesh-metrics-prometheus/src/main/java/org/apache/eventmesh/metrics/prometheus/utils/PrometheusExporterUtils.java
@@ -26,10 +26,12 @@ import io.opentelemetry.api.metrics.Meter;
import io.opentelemetry.api.metrics.common.Labels;
import lombok.SneakyThrows;
+import lombok.experimental.UtilityClass;
/**
* Utils for metrics-prometheus module
*/
+@UtilityClass
public class PrometheusExporterUtils {
/**
@@ -43,7 +45,7 @@ public class PrometheusExporterUtils {
* @param getMetric
*/
@SneakyThrows
- public static void observeOfValue(Meter meter, String metricName, String
metricDesc, String protocol,
+ public void observeOfValue(Meter meter, String metricName, String
metricDesc, String protocol,
Metric summaryMetrics, Function getMetric) {
Method method = getMetric.getClass().getMethod("apply", Object.class);
Class metricType = (Class) method.getGenericReturnType();
@@ -69,7 +71,7 @@ public class PrometheusExporterUtils {
* @param desc the description of metric
* @return
*/
- public static String[] join(String metricName, String desc) {
+ public String[] join(String metricName, String desc) {
String[] array = {metricName, desc};
return array;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]