prometheus / client_golang

Prometheus instrumentation library for Go applications
https://pkg.go.dev/github.com/prometheus/client_golang
Apache License 2.0
5.4k stars 1.18k forks source link

Add test tools based on the new type structure #230

Open beorn7 opened 8 years ago

beorn7 commented 8 years ago

Once #223 is done, we can make use of it for better testing tools (like mocking helpers for the various interfaces we end up with).

marco-m commented 5 years ago

Hello @beorn7 , I stumbled upon this ticket investigating about testability of Prometheus instrumentation. Are there any news/plans related to this ticket and #223 ? Thanks.

beorn7 commented 5 years ago

This is all planned for the v0.10 (soon to be renamed v2) milestone. I still need to finalize the grand design of it to enable detailed work like this one.

Have you looked at https://godoc.org/github.com/prometheus/client_golang/prometheus/testutil ? It should satisfy most of the current needs.

marco-m commented 5 years ago

I will look at testutil, thanks for the prompt answer!