Provides OpenCensus metrics export support for Prometheus.
$ go get -u github.com/hqt/opencensus-pushgateway-exporter
exporter, err := NewPushGatewayExporter(serviceName, getGatewayURL(), 300*time.Millisecond)
if err != nil {
panic(err)
}
exporter.Run()
defer exporter.Close()
- Run the pushgateway container:
docker run -d -p 9091:9091 prom/pushgateway
- Run tests using the local environment (start the pushgateway container first):
make test
- Run tests using the Docker environment:
make ci-test