asafm commented on code in PR #10156:
URL: https://github.com/apache/pulsar/pull/10156#discussion_r1100153930
##########
pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/RuntimeUtils.java:
##########
@@ -464,4 +475,20 @@ public static <T> T getRuntimeFunctionConfig(Map<String,
Object> configMap, Clas
return ObjectMapperFactory.getThreadLocal().convertValue(configMap,
functionRuntimeConfigClass);
}
+ public static void registerDefaultCollectors(CollectorRegistry registry) {
+ // Add the JMX exporter for functionality similar to the kafka connect
JMX metrics
+ try {
+ new JmxCollector("{}").register(registry);
Review Comment:
@jerrypeng @srkukarni Isn't that line is a duplicate of all other exporters
written below but with other names?
For example, `JmxCollector` create
```
# HELP java_lang_OperatingSystem_ProcessCpuTime
java.lang:name=null,type=OperatingSystem,attribute=ProcessCpuTime
# TYPE java_lang_OperatingSystem_ProcessCpuTime untyped
java_lang_OperatingSystem_ProcessCpuTime 5.28804E8
```
and `StandardExports` creates:
`process_cpu_seconds_total`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]