Use stricter wording for Gather returning a non-nil error

Signed-off-by: beorn7 <beorn@soundcloud.com>
This commit is contained in:
beorn7 2018-06-07 14:35:06 +02:00
parent c06fb788be
commit f6b1978ed4
1 changed files with 5 additions and 3 deletions

View File

@ -138,9 +138,11 @@ type Gatherer interface {
// prevented any meaningful metric collection) or contain a number of // prevented any meaningful metric collection) or contain a number of
// MetricFamily protobufs, some of which might be incomplete, and some // MetricFamily protobufs, some of which might be incomplete, and some
// might be missing altogether. The returned error (which might be a // might be missing altogether. The returned error (which might be a
// MultiError) explains the details. In scenarios where complete // MultiError) explains the details. Note that this is mostly useful for
// collection is critical, the returned MetricFamily protobufs should be // debugging purposes. If the gathered protobufs are to be used for
// disregarded if the returned error is non-nil. // exposition in actual monitoring, it is almost always better to not
// expose an incomplete result and instead disregard the returned
// MetricFamily protobufs in case the returned error is non-nil.
Gather() ([]*dto.MetricFamily, error) Gather() ([]*dto.MetricFamily, error)
} }