forked from mirror/client_golang
a794f77b54
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 :( |
||
---|---|---|
Godeps | ||
examples | ||
extraction | ||
model | ||
prometheus | ||
text | ||
.gitignore | ||
.travis.yml | ||
AUTHORS.md | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
Makefile | ||
NOTICE | ||
README.md | ||
VERSION |
README.md
Prometheus Go client library
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.