From dd4e57186a08baef85913a8ae1d98425d4a1d754 Mon Sep 17 00:00:00 2001 From: Bjoern Rabenstein Date: Tue, 13 Jan 2015 16:52:42 +0100 Subject: [PATCH] Improve doc comment for Describe. --- prometheus/collector.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/prometheus/collector.go b/prometheus/collector.go index f5cb2f6..3fc53a4 100644 --- a/prometheus/collector.go +++ b/prometheus/collector.go @@ -33,8 +33,9 @@ type Collector interface { // duplicate descriptors. Those duplicates are simply ignored. However, // two different Collectors must not send duplicate descriptors.) This // method idempotently sends the same descriptors throughout the - // lifetime of the Collector. A Collector unable to describe itself must - // send an invalid descriptor (created with NewInvalidDesc). + // lifetime of the Collector. If a Collector encounters an error while + // executing this method, it must send an invalid descriptor (created + // with NewInvalidDesc) to signal the error to the registry. Describe(chan<- *Desc) // Collect is called by Prometheus when collecting metrics. The // implementation sends each collected metric via the provided channel