You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
Thanks @marlongehringer for the issue, I was able to reproduce it. Actually the init() function is always executed when you import a Go package so the issue should be a different one. I think that the problem is that the two packages are instantiating a different prometheus client (one is using prometheus and the other promhttp) so that's probably the issue.
What may fix the issue is to either use the prometheus package in the Go runtime or expose it in the proxy-utils package with a function so the Go runtime doesn't need to import it. Would you be able to give it that try?
Is this a BUG REPORT or FEATURE REQUEST?:
FEATURE REQUEST
What happened:
Metrics like "function_calls_total" are missing in the prometheus endpoint in the golang runtime.
What you expected to happen:
Metrics in the golang runtime should be complete.
How to reproduce it (as minimally and precisely as possible):
curl http://127.0.0.1:8080/metrics
Anything else we need to know?:
https://github.com/kubeless/kubeless/blob/84fa853fa04bf69fe22326729fddfa95b0a0e9e4/pkg/function-proxy/utils/proxy-utils.go#L61
The proxy utils are executing the
MustRegister
only in theinit()
function which is not called in the golang runtime.https://github.com/kubeless/runtimes/blob/bdee7792a6d265a719a75e886071cbc4fb5f7295/stable/golang/kubeless.tpl.go#L81
Easiest solution would be to move the
MustRegister
to a public function which we can call in the runtime. What do you think?The text was updated successfully, but these errors were encountered: