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

Fix prometheus metric in proxy utils #1021

Closed
wants to merge 2 commits into from

Conversation

marlongehringer
Copy link

@marlongehringer marlongehringer commented Apr 12, 2019

Issue Ref:
#1020

Description:
I changed prometheus.NewHistogramVec to promauto.NewHistogramVec.
I also removed the MustRegister as it's not needed anymore.

I tested it and now I see all the function's metrics additionally to the Golang internal metrics.

Documentation of promauto:
https://godoc.org/github.com/prometheus/client_golang/prometheus/promauto

With that it should be ensured that the metrics are added everywhere.

TODOs:

  • Ready to review
  • Automated Tests
  • Docs

@marlongehringer
Copy link
Author

marlongehringer commented Apr 12, 2019

Seems like promauto was added in version 0.9.0 of client_golang.
https://github.com/prometheus/client_golang/releases/tag/v0.9.0

I will bump the version from 0.8.0 to 0.9.2.
Do we need additional testing here? The client_golang is only used in the proxy.

@marlongehringer
Copy link
Author

Something went wrong... I did dep ensure after upgrading the version. Do you have an idea what is wrong? @andresmgot

@andresmgot
Copy link
Contributor

It seems that when you ran dep ensure the Kubeless package got somehow downgraded. If you are only interested on updating prometheus/client_golang you can update that single package executing dep ensure -update github.com/prometheus/client_golang@0.9.2

@Shashankft9
Copy link
Contributor

Shashankft9 commented Mar 24, 2020

Hey @marlongehringer was this merged into the master?
Because I still don't see the the metrics for the go runtime while it is working swiftly for python runtime.

@marlongehringer
Copy link
Author

Hi @Shashankft9, sorry for the inconvenience. It was not merged into master. I had some trouble with the dependencies and then totally forgot about it as the priority for me was gone.

You can check my changes in pkg/function-proxy/utils/proxy-utils.go and maybe create your own pull request. I will close my PR because I'm not using this anymore.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants