forked from mirror/client_golang
dd20712622
The idea behind it is described in detail in https://github.com/prometheus/client_golang/issues/320 . This commit also updates the example given in promhttp/instrument_server_test.go , which nicely illustrates the benefit of this change. So far, currying could be emulated by creating different metric vec's with different values in their ConstLabels. This was quite difficult to grasp - which is essentially what was done in the example mentioned above. Now that this use case can be solved without ConstLabels, we can safely declare ConstLabels as rarely used. (Perhaps we can deprecate them entirely one day, but I'll take a raincheck on that when the changes of v0.10 have materialized.) This commit thus also updates the ConstLabel doc comments in the various Opts. (It contained fairly outdated stuff anyway.) |
||
---|---|---|
.. | ||
delegator.go | ||
delegator_1_8.go | ||
delegator_pre_1_8.go | ||
http.go | ||
http_test.go | ||
instrument_client.go | ||
instrument_client_1_8.go | ||
instrument_client_1_8_test.go | ||
instrument_server.go | ||
instrument_server_test.go |