pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] rdhabalia opened a new pull request #2296: REST and CLI to get function metrics in json for monitoring
Date Thu, 02 Aug 2018 22:27:17 GMT
rdhabalia opened a new pull request #2296: REST and CLI to get function metrics in json for
monitoring
URL: https://github.com/apache/incubator-pulsar/pull/2296
 
 
   ### Motivation
   
   right now, function metrics api returns metrics in prometheus format which is not user-friendly
and hard to parse. So, we need metrics in json format and cli to fetch metrics same as what
we have for broker.
   existing metrics:
   ```
   pulsar_function__total_processed__count{cluster="default", namespace="sample/ns1", name="demo1",
instanceId="0"} 0.0 1533172228038
   pulsar_function__total_processed__max{cluster="default", namespace="sample/ns1", name="demo1",
instanceId="0"} 0.0 1533172228039
   pulsar_function__total_processed__min{cluster="default", namespace="sample/ns1", name="demo1",
instanceId="0"} 0.0 1533172228039
   pulsar_function__total_processed__sum{cluster="default", namespace="sample/ns1", name="demo1",
instanceId="0"} 0.0 1533172228039
   pulsar_function__total_successfully_processed__count{cluster="default", namespace="sample/ns1",
name="demo1", instanceId="0"} 0.0 1533172228040
   pulsar_function__total_successfully_processed__max{cluster="default", namespace="sample/ns1",
name="demo1", instanceId="0"} 0.0 1533172228040
   pulsar_function__total_successfully_processed__min{cluster="default", namespace="sample/ns1",
name="demo1", instanceId="0"} 0.0 1533172228040
   pulsar_function__total_successfully_processed__sum{cluster="default", namespace="sample/ns1",
name="demo1", instanceId="0"} 0.0 1533172228040
   pulsar_function__total_system_exceptions__count{cluster="default", namespace="sample/ns1",
name="demo1", instanceId="0"} 0.0 1533172228040
   pulsar_function__total_system_exceptions__max{cluster="default", namespace="sample/ns1",
name="demo1", instanceId="0"} 0.0 1533172228041
   ```
   
   json metrics:
   ```
   ./pulsar-admin  functions metrics
   {
     "metrics": [
       {
         "name": "sample/ns1/demo3",
         "metricsData": {
           "metrics": {
             "__total_processed__": {},
             "__total_successfully_processed__": {},
             "__total_system_exceptions__": {},
             "__total_user_exceptions__": {},
             "__total_serialization_exceptions__": {},
             "__avg_latency_ms__": {}
           }
         }
       },
       {
         "name": "sample/ns1/demo1",
         "metricsData": {
           "metrics": {
             "__total_processed__": {},
             "__total_successfully_processed__": {},
             "__total_system_exceptions__": {},
             "__total_user_exceptions__": {},
             "__total_serialization_exceptions__": {},
             "__avg_latency_ms__": {}
           }
         }
       }
     ]
   }
   
   ```
   
   ### Modifications
   
   - add REST api for metrics
   - add cli to get metrics in json format

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message