From e91cd8163290fdc44fc984768703aa33a04ec6db Mon Sep 17 00:00:00 2001 From: beorn7 Date: Thu, 16 May 2019 11:23:48 +0200 Subject: [PATCH] Remove outdated use-case description from doc comment We stopped advertising binary-wide setting of a label quite a while ago. This doc comment was missed in the cleanup. Signed-off-by: beorn7 --- prometheus/examples_test.go | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/prometheus/examples_test.go b/prometheus/examples_test.go index a382479..91fef3d 100644 --- a/prometheus/examples_test.go +++ b/prometheus/examples_test.go @@ -232,16 +232,11 @@ func ExampleRegister() { // A different (and somewhat tricky) approach is to use // ConstLabels. ConstLabels are pairs of label names and label values - // that never change. You might ask what those labels are good for (and - // rightfully so - if they never change, they could as well be part of - // the metric name). There are essentially two use-cases: The first is - // if labels are constant throughout the lifetime of a binary execution, - // but they vary over time or between different instances of a running - // binary. The second is what we have here: Each worker creates and - // registers an own Counter instance where the only difference is in the - // value of the ConstLabels. Those Counters can all be registered - // because the different ConstLabel values guarantee that each worker - // will increment a different Counter metric. + // that never change. Each worker creates and registers an own Counter + // instance where the only difference is in the value of the + // ConstLabels. Those Counters can all be registered because the + // different ConstLabel values guarantee that each worker will increment + // a different Counter metric. counterOpts := prometheus.CounterOpts{ Subsystem: "worker_pool", Name: "completed_tasks",