{"id":19040734,"url":"https://github.com/cloudfoundry/noaa","last_synced_at":"2025-04-12T06:07:06.395Z","repository":{"id":21121378,"uuid":"24422129","full_name":"cloudfoundry/noaa","owner":"cloudfoundry","description":"NOAA is a client library to consume metric and log messages from Doppler.","archived":false,"fork":false,"pushed_at":"2025-04-03T09:21:27.000Z","size":2784,"stargazers_count":23,"open_issues_count":0,"forks_count":23,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-04-12T06:06:59.309Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudfoundry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-24T16:07:19.000Z","updated_at":"2025-04-03T09:21:23.000Z","dependencies_parsed_at":"2023-02-16T11:45:56.205Z","dependency_job_id":"29e4d333-51a8-4e64-9828-bf2afa4edcfb","html_url":"https://github.com/cloudfoundry/noaa","commit_stats":{"total_commits":219,"total_committers":52,"mean_commits":4.211538461538462,"dds":0.7442922374429224,"last_synced_commit":"fd7e0ddc38d1405e289d39a76c079087c8c31858"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry%2Fnoaa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry%2Fnoaa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry%2Fnoaa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudfoundry%2Fnoaa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudfoundry","download_url":"https://codeload.github.com/cloudfoundry/noaa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525144,"owners_count":21118618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T22:24:48.323Z","updated_at":"2025-04-12T06:07:06.364Z","avatar_url":"https://github.com/cloudfoundry.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NOAA\n\n[![Coverage Status](https://coveralls.io/repos/cloudfoundry/noaa/badge.png)](https://coveralls.io/r/cloudfoundry/noaa)\n[![GoDoc](https://godoc.org/github.com/cloudfoundry/noaa?status.png)](https://godoc.org/github.com/cloudfoundry/noaa)\n\nnoaa is a client library to consume metric and log messages from Doppler.\n\nIf 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](https://cloudfoundry.slack.com/archives/CUW93AF3M)\n\n## Get the Code\n\nThis Go project is designed to be imported into `$GOPATH`, rather than being cloned into any working directory. There are two ways to do this.\n\n- The easiest way with with `go get`. This will import the project, along with all dependencies, into your `$ GOPATH`.\n  ```\n  $ echo $GOPATH\n  /Users/myuser/go\n\n  $ go get github.com/cloudfoundry/noaa\n\n  $ ls ~/go/src/github.com/cloudfoundry/\n  noaa/         sonde-go/\n  ```\n\n- You can also manually clone the repo into your `$GOPATH`, but you then have to manually import dependencies.\n  ```\n  $ echo $GOPATH\n  /Users/myuser/go\n\n  $ cd /Users/myuser/go/src/github.com/cloudfoundry\n  $ git clone git@github.com:cloudfoundry/noaa.git\n  $ cd noaa\n  $ go get ./...\n  ```\n\n## Updates\n\n### Reconnecting to Traffic Controller\n\nnoaa has recently updated its reconnect strategy from trying to reconnect five\ntimes in quick succession to a back-off strategy. The back-off strategy can be\nconfigured by setting the [SetMinRetryDelay()](https://godoc.org/github.com/cloudfoundry/noaa/consumer#Consumer.SetMinRetryDelay)\nand the [SetMaxRetryDelay()](https://godoc.org/github.com/cloudfoundry/noaa/consumer#Consumer.SetMaxRetryDelay).\n\nDuring reconnection, noaa will wait initially at the `MinRetryDelay` interval\nand double until it reaches `MaxRetryDelay` where it will try reconnecting\nindefinitely at the `MaxRetryDelay` interval.\n\nThis behavior will affect functions like `consumer.Firehose()`, `consumer.Stream()`\nand `consumer.TailingLogs()`.\n\n## Sample Applications\n\n### Prerequisites\n\nIn order to use the sample applications below, you will have to export the\nfollowing environment variables:\n\n* `CF_ACCESS_TOKEN` - You can get this value by executing (`$ cf oauth-token`).\n  Example:\n\n```bash\nexport CF_ACCESS_TOKEN=\"bearer eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI3YmM2MzllOC0wZGM0LTQ4YzItYTAzYS0xYjkyYzRhMWFlZTIiLCJzdWIiOiI5YTc5MTVkOS04MDc1LTQ3OTUtOTBmOS02MGM0MTU0YTJlMDkiLCJzY29wZSI6WyJzY2ltLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLmFkbWluIiwicGFzc3dvcmQud3JpdGUiLCJzY2ltLndyaXRlIiwib3BlbmlkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSIsImNsb3VkX2NvbnRyb2xsZXIucmVhZCJdLCJjbGllbnRfaWQiOiJjZiIsImNpZCI6ImNmIiwiZ3JhbnRfdHlwZSI6InBhc3N3b3JkIiwidXNlcl9pZCI6IjlhNzkxNWQ5LTgwNzUtNDc5NS05MGY5LTYwYzQxNTRhMmUwOSIsInVzZXJfbmFtZSI6ImFkbWluIiwiZW1haWwiOiJhZG1pbiIsImlhdCI6MTQwNDg0NzU3NywiZXhwIjoxNDA0ODQ4MTc3LCJpc3MiOiJodHRwczovL3VhYS4xMC4yNDQuMC4zNC54aXAuaW8vb2F1dGgvdG9rZW4iLCJhdWQiOlsic2NpbSIsIm9wZW5pZCIsImNsb3VkX2NvbnRyb2xsZXIiLCJwYXNzd29yZCJdfQ.mAaOJthCotW763lf9fysygqdES_Mz1KFQ3HneKbwY4VJx-ARuxxiLh8l_8Srx7NJBwGlyEtfYOCBcIdvyeDCiQ0wT78Zw7ZJYFjnJ5-ZkDy5NbMqHbImDFkHRnPzKFjJHip39jyjAZpkFcrZ8_pUD8XxZraqJ4zEf6LFdAHKFBM\"\n```\n\n* `DOPPLER_ADDR` - It is based on your environment. Example:\n\n```bash\nexport DOPPLER_ADDR=\"wss://doppler.10.244.0.34.xip.io:4443\"\n```\n\n\n### Application logs\n\nThe `samples/app_logs/main.go` application streams logs for a particular app.\nThe following environment variable needs to be set:\n\n* `APP_GUID` - You can get this value from running `$ cf app APP --guid`.\n  Example:\n\n```\nexport APP_GUID=55fdb274-d6c9-4b8c-9b1f-9b7e7f3a346c\n```\n\nThen you can run the sample app like this:\n\n```\ngo build -o bin/app_logs samples/app_logs/main.go\nbin/app_logs\n```\n\n### Logs and metrics firehose\n\nThe `samples/firehose/main.go` application streams metrics data and logs for\nall apps.\n\nYou can run the firehose sample app like this:\n\n```\ngo build -o bin/firehose samples/firehose/main.go\nbin/firehose\n```\n\nMultiple subscribers may connect to the firehose endpoint, each with a unique\nsubscription_id (configurable in `main.go`). Each subscriber (in practice, a\npool of clients with a common subscription_id) receives the entire stream. For\neach subscription_id, all data will be distributed evenly among that\nsubscriber's client pool.\n\n### Container metrics\n\nThe `samples/container_metrics/consumer/main.go` application streams container\nmetrics for the specified appId.\n\nYou can run the container metrics sample app like this:\n\n```\ngo build -o bin/container_metrics samples/container_metrics/consumer/main.go\nbin/container_metrics\n```\n\nFor more information to setup a test environment in order to pull container\nmetrics look at the README.md in the container_metrics sample.\n\n## Development\n\nUse `go get -d -v -t ./... \u0026\u0026 ginkgo --race --randomizeAllSpecs --failOnPending --skipMeasurements --cover` to\nrun the tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudfoundry%2Fnoaa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudfoundry%2Fnoaa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudfoundry%2Fnoaa/lists"}