client_golang/prometheus
beorn7 dd20712622 Allow currying of metric vec's
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.)
2017-12-22 15:56:11 +01:00
..
graphite graphite: Adjust ExtractSamples call to new interface 2017-01-08 20:55:34 +01:00
promhttp Allow currying of metric vec's 2017-12-22 15:56:11 +01:00
push Document the use of Go1.9+ for monotonic time where applicable 2017-06-29 16:07:12 +02:00
.gitignore Rearrange file and package per convention. 2013-04-04 15:27:09 +02:00
README.md Create a public registry interface and separate out HTTP exposition 2016-08-02 18:46:22 +02:00
benchmark_test.go Allow Summaries with empty objectives and deprecate DefObjectives 2016-11-23 18:35:02 +01:00
collector.go Fix a number of doc comments and similar nits 2016-08-03 12:23:37 +02:00
counter.go Allow currying of metric vec's 2017-12-22 15:56:11 +01:00
counter_test.go make code compatible with go 1.6 2017-08-20 00:53:55 +02:00
desc.go Allow currying of metric vec's 2017-12-22 15:56:11 +01:00
desc_test.go validate ConstLabels values in NewDesc 2017-08-20 00:09:51 +02:00
doc.go Correct DefaultRegistry to DefaultRegisterer 2017-09-05 01:08:40 +01:00
example_clustermanager_test.go Fix a number of doc comments and similar nits 2016-08-03 12:23:37 +02:00
example_timer_complex_test.go fix spelling typo 2017-08-28 08:57:51 +08:00
example_timer_gauge_test.go Fix invalid Timer (gauge) example 2017-02-28 11:13:17 -04:00
example_timer_test.go Change the Timer API 2016-11-18 20:32:18 +01:00
examples_test.go Allow Summaries with empty objectives and deprecate DefObjectives 2016-11-23 18:35:02 +01:00
expvar_collector.go Create a public registry interface and separate out HTTP exposition 2016-08-02 18:46:22 +02:00
expvar_collector_test.go Add goreport card and remove warnings where feasible 2016-09-16 19:59:04 +02:00
fnv.go use local fnv hash everywhere 2015-11-12 14:07:23 +01:00
gauge.go Allow currying of metric vec's 2017-12-22 15:56:11 +01:00
gauge_test.go - Point from Inc and Dec to Add and Sub in doc comments. 2016-11-18 19:32:10 +01:00
go_collector.go Add new default metric go_info 2017-07-23 23:36:09 +02:00
go_collector_test.go Add new default metric go_info 2017-07-23 23:36:09 +02:00
histogram.go Allow currying of metric vec's 2017-12-22 15:56:11 +01:00
histogram_test.go new handler instrumentation (#285) 2017-04-24 15:13:19 -04:00
http.go http.go: incorrect error message displayed when no metrics encoded error 2017-08-31 12:05:46 +10:00
http_test.go Allow currying of metric vec's 2017-12-22 15:56:11 +01:00
labels.go improve validation function naming 2017-08-25 17:58:59 +02:00
metric.go Allow currying of metric vec's 2017-12-22 15:56:11 +01:00
metric_test.go Change "Prometheus Team" to "The Prometheus Authors". 2015-02-02 15:14:36 +01:00
observer.go new handler instrumentation (#285) 2017-04-24 15:13:19 -04:00
process_collector.go Fix namespace of process collector metrics 2016-11-02 14:09:24 -04:00
process_collector_test.go Fix namespace of process collector metrics 2016-11-02 14:09:24 -04:00
registry.go Fix typo in comment 2017-10-04 17:44:49 +01:00
registry_test.go fail Gather'ing when label value is not utf8 2017-08-20 00:10:32 +02:00
summary.go Allow currying of metric vec's 2017-12-22 15:56:11 +01:00
summary_test.go new handler instrumentation (#285) 2017-04-24 15:13:19 -04:00
timer.go Document the use of Go1.9+ for monotonic time where applicable 2017-06-29 16:07:12 +02:00
timer_test.go new handler instrumentation (#285) 2017-04-24 15:13:19 -04:00
untyped.go Remove the deprecated uses of Untyped metrics 2017-08-29 17:31:45 +02:00
value.go improve validation function naming 2017-08-25 17:58:59 +02:00
value_test.go make code compatible with go 1.6 2017-08-20 00:53:55 +02:00
vec.go Allow currying of metric vec's 2017-12-22 15:56:11 +01:00
vec_test.go Allow currying of metric vec's 2017-12-22 15:56:11 +01:00

README.md

See go-doc.