docs icon indicating copy to clipboard operation
docs copied to clipboard

Replace(?) deprecated installation instructions in "Instrumenting a Go application for Prometheus" docs

Open atimeofday opened this issue 1 year ago • 4 comments

Hello,

As a new user of both Go and Prometheus, I ran into some issues and tentatively believe the instructions for installing the prometheus/client_golang libraries are outdated as of Go 1.17 in... August 2021. It appears go get was deprecated outside of Go Modules, and requires the creation of a Go Module first. Please let me know if this impression is incorrect, or if a small PR to adjust the instructions might be welcome.

Issue location: https://github.com/prometheus/docs/blob/main/content/docs/guides/go-application.md#installation Issue contents:

go get github.com/prometheus/client_golang/prometheus
go get github.com/prometheus/client_golang/prometheus/promauto
go get github.com/prometheus/client_golang/prometheus/promhttp

Potential solution: preface go get instructions with go mod init <module_name> and a link to Go Module documentation

atimeofday avatar Dec 12 '24 18:12 atimeofday

I guess you are right, these are outdated instruction to get Go packages. A PR fixing this would be very welcome.

beorn7 avatar Dec 17 '24 19:12 beorn7

Hello @beorn7,

I would gladly work on this. Would you please assign it to me ?

Thanks !

lhajouji avatar Dec 20 '24 10:12 lhajouji

any one did take a look please ?

lhajouji avatar Aug 11 '25 17:08 lhajouji

@lhajouji IIUC #2563 has been waiting for your response for quite some time.

beorn7 avatar Aug 12 '25 19:08 beorn7