Prometheus instrumentation library for Go applications
Go to file
William Kennedy a794f77b54 Update go_collector_test.go
We are running into a timeout with TestHistogramConcurrency on our Jenkins box. I noticed in the stack trace for the timeout this block.

goroutine 2348 [chan send]:
github.comcast.com/ventris/kober/vnd/github.com/prometheus/client_golang/prometheus.(*goCollector).Collect(0xc20801e8e0, 0xc20800a7e0)
	/var/lib/jenkins/jobs/Kober/workspace/src/github.comcast.com/ventris/kober/vnd/github.com/prometheus/client_golang/prometheus/go_collector.go:49 +0x6dd
github.comcast.com/ventris/kober/vnd/github.com/prometheus/client_golang/prometheus.func·028()
	/var/lib/jenkins/jobs/Kober/workspace/src/github.comcast.com/ventris/kober/vnd/github.com/prometheus/client_golang/prometheus/go_collector_test.go:27 +0x11a
created by github.comcast.com/ventris/kober/vnd/github.com/prometheus/client_golang/prometheus.TestGoCollector
	/var/lib/jenkins/jobs/Kober/workspace/src/github.comcast.com/ventris/kober/vnd/github.com/prometheus/client_golang/prometheus/go_collector_test.go:28 +0x35e

This suggested that even though the TestGoCollector test was finished, a goroutine was still hanging around. I traced it back to the call to c.Collect always sending twice of the provided channel. This change receives that second value and allows the goroutine to finish with the test.

Still can't figure out why TestHistogramConcurrency is timing out after 2 minutes :(
2015-08-12 15:23:41 -04:00
Godeps Godep: remove reference to matttproud/golang_protobuf_extensions/ext 2015-04-07 12:35:11 +02:00
examples Add a histogram to the random example. 2015-02-23 16:19:01 +01:00
extraction s/ext/pbutil/g 2015-04-07 10:33:04 +02:00
model Add scheme as label to allow relabelling in discovery 2015-08-06 11:25:04 +01:00
prometheus Update go_collector_test.go 2015-08-12 15:23:41 -04:00
text gofmt 2015-08-03 13:55:09 +02:00
.gitignore Enclose artifact generation process into Makefile. 2013-07-21 17:45:53 +02:00
.travis.yml Update used Go version from 1.2.1 to 1.4. 2014-12-19 14:18:46 +01:00
AUTHORS.md License cleanup 2015-01-22 16:13:15 +01:00
CHANGELOG.md Cut v0.7.0 2015-07-27 17:09:29 +02:00
CONTRIBUTING.md License cleanup 2015-01-22 16:13:15 +01:00
LICENSE License cleanup 2015-01-22 16:13:15 +01:00
Makefile Use spaces instead of tabs to align equals (=) 2015-08-03 11:34:44 -07:00
NOTICE Add newly vendored libraries to NOTICE file. 2015-02-26 14:04:24 +01:00
README.md Remove www subdomain from Prometheus link. 2015-06-15 22:26:46 -04:00
VERSION Cut v0.7.0 2015-07-27 17:09:29 +02:00

README.md

Prometheus Go client library

Build Status code-coverage go-doc

This is the Go client library for Prometheus.

Instrumenting applications

For instrumenting your Go application code with Prometheus metrics, see the documentation of the exposition client.

Consuming exported metrics

If you want to process metrics exported by a Prometheus client, see the consumption library documentation. (The Prometheus server is using that library.)

Testing

$ go test ./...

Contributing and community

See the contributing guidelines and the Community section of the homepage.