Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Golang runtime incomplete metrics due to proxy utils #1020

@marlongehringer

Description

@marlongehringer

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 the init() 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions