Chore(deps): Bump github.com/elazarl/goproxy from 1.8.1 to 1.8.2
Bumps github.com/elazarl/goproxy from 1.8.1 to 1.8.2.
updated-dependencies:
- dependency-name: github.com/elazarl/goproxy dependency-version: 1.8.2 dependency-type: direct:production update-type: version-update:semver-patch …
Signed-off-by: dependabot[bot] support@github.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
NOAA
noaa is a client library to consume metric and log messages from Doppler.
If you have any questions, or want to get attention for a PR or issue please reach out on the #logging-and-metrics channel in the cloudfoundry slack
Get the Code
This Go project is designed to be imported into
$GOPATH, rather than being cloned into any working directory. There are two ways to do this.The easiest way with with
go get. This will import the project, along with all dependencies, into your$ GOPATH.You can also manually clone the repo into your
$GOPATH, but you then have to manually import dependencies.Updates
Reconnecting to Traffic Controller
noaa has recently updated its reconnect strategy from trying to reconnect five times in quick succession to a back-off strategy. The back-off strategy can be configured by setting the SetMinRetryDelay() and the SetMaxRetryDelay().
During reconnection, noaa will wait initially at the
MinRetryDelayinterval and double until it reachesMaxRetryDelaywhere it will try reconnecting indefinitely at theMaxRetryDelayinterval.This behavior will affect functions like
consumer.Firehose(),consumer.Stream()andconsumer.TailingLogs().Sample Applications
Prerequisites
In order to use the sample applications below, you will have to export the following environment variables:
CF_ACCESS_TOKEN- You can get this value by executing ($ cf oauth-token). Example:DOPPLER_ADDR- It is based on your environment. Example:Application logs
The
samples/app_logs/main.goapplication streams logs for a particular app. The following environment variable needs to be set:APP_GUID- You can get this value from running$ cf app APP --guid. Example:Then you can run the sample app like this:
Logs and metrics firehose
The
samples/firehose/main.goapplication streams metrics data and logs for all apps.You can run the firehose sample app like this:
Multiple subscribers may connect to the firehose endpoint, each with a unique subscription_id (configurable in
main.go). Each subscriber (in practice, a pool of clients with a common subscription_id) receives the entire stream. For each subscription_id, all data will be distributed evenly among that subscriber’s client pool.Container metrics
The
samples/container_metrics/consumer/main.goapplication streams container metrics for the specified appId.You can run the container metrics sample app like this:
For more information to setup a test environment in order to pull container metrics look at the README.md in the container_metrics sample.
Development
Use
go get -d -v -t ./... && ginkgo --race --randomizeAllSpecs --failOnPending --skipMeasurements --coverto run the tests.