flowchartsman opened a new issue, #20020:
URL: https://github.com/apache/pulsar/issues/20020

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Version
   
   issuing a `pulsar-admin functions stats` check on a go function will cause 
it to crash if no user metrics are defined. This is because it makes a similar 
assumption to the other metrics calls that the result of 
`gi.getFilteredMetricFamilies` will have a `len` of at least 1. If there are no 
user metrics, it will not, and it will cause the agent to restart.
   
   PR incoming
   
   ### Minimal reproduce step
   
   1. create go function w/o user metrics
   2. `pulsar-admin functions stats --fqfn tenant/namespace/functionname`
   3. function will crash/restart
   
   
   ### What did you expect to see?
   
   Actual stats
   
   ### What did you see instead?
   
   stats of zero. function restart
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
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]

Reply via email to