Update doc comment of NewProcessCollector

- Now also works on MS Windows.
- The hints for updating from older versions is obsolete by now.

Signed-off-by: beorn7 <beorn@grafana.com>
This commit is contained in:
beorn7 2019-06-14 12:31:33 +02:00
parent c5f4190338
commit f61dbeaded
1 changed files with 3 additions and 14 deletions

View File

@ -57,20 +57,9 @@ type ProcessCollectorOpts struct {
// collector for the current process with an empty namespace string and no error // collector for the current process with an empty namespace string and no error
// reporting. // reporting.
// //
// Currently, the collector depends on a Linux-style proc filesystem and // The collector only works on operating systems with a Linux-style proc
// therefore only exports metrics for Linux. // filesystem and on Microsoft Windows. On other operating systems, it will not
// // collect any metrics.
// Note: An older version of this function had the following signature:
//
// NewProcessCollector(pid int, namespace string) Collector
//
// Most commonly, it was called as
//
// NewProcessCollector(os.Getpid(), "")
//
// The following call of the current version is equivalent to the above:
//
// NewProcessCollector(ProcessCollectorOpts{})
func NewProcessCollector(opts ProcessCollectorOpts) Collector { func NewProcessCollector(opts ProcessCollectorOpts) Collector {
ns := "" ns := ""
if len(opts.Namespace) > 0 { if len(opts.Namespace) > 0 {